DEV Community

Discussion on: How-to Build Your Own React Boilerplate with webpack 4 & Babel 7

Collapse
 
rebrimhall profile image
Robert

Thanks for the setup. Had to make a slight adjustment for current Webpack to the config/common:

exclude: [path.resolve(__dirname, 'node_modules')] instead of exclude: ['node_modules')]

Thanks again! Super helpful!

Collapse
 
hdv profile image
Hussein Duvigneau

It turns out now with latest webpack you have to provide regex instead of strings:

exclude: [/node_modules/],

is a simple fix which works.