What is the current behavior?
target: ‘node-webkit’ fails with Uncaught ReferenceError: require is not defined
If the current behavior is a bug, please provide the steps to reproduce.
Download the source code here : https://github.com/react-boilerplate/react-boilerplate/releases/tag/v3.4.0
change the line in internals/webpack/webpack.base.babel.js
target: ‘web’, // Make web variables accessible to webpack, e.g. window
target: ‘node-webkit’, // Make web variables accessible to webpack, e.g. window
target: ‘node’, // Make web variables accessible to webpack, e.g. window
and open http://localhost:3000 in your browser.
What is the expected behavior?
Code runs good with target:’web’ config. Expected behavior is not getting the “ReferenceError: require is not defined” error.
Please mention other relevant information such as the browser version, Node.js version, webpack version, and Operating System.
node Version : v9.7.1
Browser: Chrome 64 also the same result with nw.js
Webpack Version : “2.2.0-rc.3” and “3.0.0”
Operating System : Macos High Sierra (10.13.3)
Here package json