Uncaught Error: locals[0] does not appear to be a module
object with Hot Module replacement API enabled. You should disable react-transform-hmr in production by using env
section in Babel configuration. See the example in README: https://github.com/gaearon/react-transform-hmr
上記のエラーがでるのですが、解決方法がわかりません。
ノードモジュールにてバベルをダウンロードしwebpackにて実行しても同じエラーがでてしまいます。
どなたか、解決方法をご存知な方、いらっしゃいますでしょうか?
宜しくお願いいたします。
var ExtractTextPlugin = require('extract-text-webpack-plugin'); var webpack = require('webpack'); var path = require('path'); module.exports = { context: path.join(__dirname, 'assets/js'), entry: { react: './react.jsx'//ここを増やす }, output: { path: path.join(__dirname, 'public/js/react'), filename: 'react.js' }, module: { rules: [ { test: /.(js|jsx)$/, exclude: /node_modules/, loader: 'babel-loader', query: { presets: ['react', 'es2015', 'react-hmre'] }, } ], }, devServer: { port:8888, inline: true }, };
上記がwebpackの記述内容になります。
回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。