I want to process my jsx code, so I write webpakc.config.js as follows:
{ test: /\.js$/, loaders: ['react-hot', 'babel-loader?presets[]=es2015'], exclude: /node_modules/ }
But he did not process my jsx code and threw an error: Error in the terminal
Google, it seems to me, I need to add presets['react'] to my configuration file. Therefore, I update the configuration as follows:
{ test: /\.js$/, loaders: ['react-hot', 'babel'], query: { presets: ['react', 'es2015'] }, exclude: /node_modules/ }
But this is another mistake: A new error occurred after the update configuration file
I am better at webpack, what should I do?
webpack config react-jsx
wen
source share