Reputation: 89
I have webpack and it show entry error:
*ERROR in multi @babel/polyfill src/index.js Module not found: Error: Can't resolve 'src/index.js' in 'F:\webpack\webpack-st\src' @ multi @babel/polyfill src/index.js entry1
Here's my folder structure:
And webpack code that seems to be wrong:
context: path.resolve(__dirname, "src"),
entry: {
entry: ["@babel/polyfill", "src/index.js"],
},
I tried to change paths of context and entry but nothing happened except error
Upvotes: 1
Views: 2498
Reputation: 1045
You have set your context to src
, you don't need src/index.js
. Just do ./index.js
as entry base has been set to src
.
Upvotes: 1