webpackでbuildする際に、下記のエラーが出るのですが、
適切なloaderを教えていただけないでしょうか。
You may need an appropriate loader to handle this file type. riot.tag2('counter', '<span>{time}</span>', '', '', function(opts) { setInterval(() => { this.time = new.Date(); this.update(); }, 1000);
下記がwebpackのriotの部分と.tagファイルになります。
// webpack module: { rules: [ { test: /\.tag$/, exclude: /node_modules/, use: 'riot-tag-loader' }, { test: /\.js$/, exclude: /node_modules/, use: 'babel-loader' }, { test: /\.(jpg|png|gif)$/, exclude: /node_modules/, use: 'file-loader' } ] }, resolve: { extensions: ['*', '.js', '.tag'] }, plugins: [ new webpack.ProvidePlugin({ riot: 'riot' }) ]
// counter.tag <counter> <span>{ time }</span> <script> setInterval(() => { this.time = new.Date(); this.update(); }, 1000); </script> </counter>
回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。