WebPack CSS import fails with production mode; ok with dev mode
See original GitHub issueWhen I compile (my ts) code in production mode
import 'react-toastify/dist/ReactToastify.min.css'
is ignored:
when I compile in development mode the css is successfully applied
Haven’t been able to find a workaround.
Worked fine in 4.x
in package.json:
"scripts": {
"dev": "webpack --mode development --config config/webpack.config.js",
"build": "webpack --mode production --config config/webpack.config.js",
Issue Analytics
- State:
- Created 4 years ago
- Reactions:9
- Comments:20 (8 by maintainers)
Top Results From Across the Web
when running npm run webpack for build for production mode ...
I have tried your code and it works fine, you only have a typo in first line (wrong spelling for npm ): const...
Read more >Production | webpack
In this guide, we'll dive into some of the best practices and utilities for building a production site or application.
Read more >The best webpack configurations for React applications
Go into the src/index.js and delete the imports of CSS and SVG files. ... And if we fail to pass an env to...
Read more >How I solved and debugged my Webpack issue through trial ...
scripts": { "build": "webpack --mode production", "dev": "webpack-dev-server --mode development"}... You have to add a development flag when ...
Read more >webpack Tutorial: How to Set Up webpack 5 From Scratch
the webpack-dev-server command is now webpack-serve ... create two config files: one with mode: production and one with mode: development .
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
Fix pushed !
@fkhadra just did, works now 👍