Preamble, CSS loaders in Webpack 2 have been configured before, but how incorrect
Error:
ERROR in ./~/convert-source-map/index.js
Module not found: Error: Can't resolve 'fs' in '/Users/ceshi/Desktop/webpack/node_modules/convert-source-map'
@ ./~/convert-source-map/index.js 2:9-22
@ ./~/css-loader/lib/css-base.js
@ ./~/css-loader!./app/style.css
@ ./app/style.css
@ ./app/main.js
Fix this by modifying the webPack configuration file to add a single line of code
node: {
fs: 'empty'
},
Test success
Read More:
- Webpack 4 : ERROR in Entry module not found: Error: Can’t resolve ‘./src’
- Webpack Upgrade Error: webpack.NamedModulesPlugin is not a constructor
- JavaScript / JS native dynamic introduction of external CSS files and dynamic insertion of CSS code fragments
- NPX webpack cannot find module’html webpack plugin’a bug causes headache
- You may need an appropriate loader to handle this file type, currently no loaders are configured to
- Error: unable to resolve dependency for… Could not resolve project
- Webpack multi version incompatibility error
- Run webpack error: Error: Cannot find module’webpack/lib/node/NodeTemplatePlugin’
- Has HTML webpack plugin been installed, or error: cannot find module ‘HTML webpack plugin’
- Webpack error module build failed: typeerror: fileSystem.statSync is not a function
- Error: Cannot find module’webpack/bin/config-yargs’ solution
- Nginx configures different domain names to access different projects
- Cannot read property ‘this compilation’ of undefined appears in copy webpack plugin
- Invalidation of margin top property of nested box in CSS style box
- BUG——Could not resolve placeholder ‘xxx‘ in value ‘${xxx}‘
- Module not found: Error: Can’t resolve ‘sass-loader’ in ‘F:\H5\project-h5’
- Pychar configures Anaconda environment
- Error in Babel configuration of webpack
- Syntax Error: SassError: Invalid CSS after “…-height: #{math“: expected expression (e.g. 1px, bold
- NPM compilation failed: can’t resolve ‘child_ process’