When I run webpack, I get this error:
ERROR in Entry module not found: Error: Cannot resolve module 'game'
in /Users/frederikcreemers/dev/dark_chess
(newline added for clarity.)
But I'm certain that game.js
exists.
Here's what my webpack.config.js
looks like:
module.exports = {
entry: "game.js",
output: {
path: __dirname + "build",
filename: "index.js"
},
module: {
loaders: [
{ test: /\.css$/, loader: "style!css" },
{ test: /\.jsx?$/, loader: "babel?presets[]=es2015", exclude: /(node_modules|bower_components)/}
]
}
};
I'm not sure how to further investigate the issue.
The webpack entry
option usually resolves to a File Module.
So, probably what you need is to indicate the relative path to your game.js
file module:
entry: "./game.js",
Otherwise webpack will try to load it as a core module or from node_modules
folder.
Without a leading '/', './', or '../' to indicate a file, the module must either be a core module or is loaded from a node_modules folder.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With