Failed to configure webpack entry
See original GitHub issue// craco.config.js
const path = require('path');
const { env: { NODE_ENV } } = process;
module.exports = {
webpack: {
configure: {
entry: path.resolve(__dirname, './src/main.js'),
resolve: {
alias: {
'@': path.resolve(__dirname, './src'),
},
},
devtool: NODE_ENV === 'development' ? 'eval-source-map' : 'hidden-source-map',
},
},
}
// terminal
// -> yarn start
// <- $ craco start
// <- Could not find a required file.
// <- Name: index.js
// <- Searched in: E:\projects\react-doc\src
// <- error Command failed with exit code 1.
// <- info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
Issue Analytics
- State:
- Created 3 years ago
- Comments:6 (3 by maintainers)
Top Results From Across the Web
Unable to configure webpack.config file - Stack Overflow
Try this: update your package json to this: { "name": "react-todo", "version": "1.0.0", "description": "", "main": "index.js", ...
Read more >Entry Points - webpack
We will show you the ways you can configure the entry property, in addition to explaining why it may be useful to you....
Read more >ERROR in Entry module not found: Error: Cannot resolve 'file ...
This is my webpack.config.js : module.exports = { entry: './index.js', output: { filename: 'bundle.
Read more >IDE "failed to load" webpack config that exports function taking ...
IDE "failed to load" webpack config that exports function taking env and returning the config object · 1. Ensure that the Javascript language...
Read more >All You Need to Know about Webpack in Examples - Medium
Run npx webpack — config webpack.dev.js : As you can see, inject:true property will ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Hi @chentianxin
It doesn’t seem to be an error related to CRACO.
CRACO let you customize CRA config but it is your responsibility to provide valid config.
Patrick
Oh sorry I understand now.
Yes sadly in CRA they hardcoded a bunch of paths.