I need to webpack all the js file in the script folder.I tried this
module.exports = {
module: {
loaders: [
{
test: /.js$/,
exclude: /node_modules/,
loaders: ["babel-loader"],
}
],
},
entry: "./src/scripts/*.js",
output: {
path: './src/build',
filename: '[name].js'
}
};
I am getting error like this,
ERROR in Entry module not found: Error: Cannot resolve 'file' or 'directory' ./s
rc/scripts/* in E:Web projectReactJS
eact-tutorial
resolve file
E:Web projectReactJS
eact-tutorialsrcscripts* doesn't exist
E:Web projectReactJS
eact-tutorialsrcscripts*.webpack.js doesn't exist
E:Web projectReactJS
eact-tutorialsrcscripts*.web.js doesn't exist
E:Web projectReactJS
eact-tutorialsrcscripts*.js doesn't exist
E:Web projectReactJS
eact-tutorialsrcscripts*.json doesn't exist
resolve directory
E:Web projectReactJS
eact-tutorialsrcscripts* doesn't exist (directory d
efault file)
E:Web projectReactJS
eact-tutorialsrcscripts*package.json doesn't exist
(directory description file)
It is not searching for all the js file instead it is searching for *.js like that.Help me out what I missed
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…