"You forgot to add the 'CompiledExtractPlugin'"
See original GitHub issueDescribe the bug
After upgrading from 0.8.0 of @compiled/webpack-loader to 0.8.3 or 0.8.4, I now receive this error
Failed to compile.
██████╗ ██████╗ ███╗ ███╗██████╗ ██╗██╗ ███████╗██████╗
██╔════╝██╔═══██╗████╗ ████║██╔══██╗██║██║ ██╔════╝██╔══██╗
██║ ██║ ██║██╔████╔██║██████╔╝██║██║ █████╗ ██║ ██║
██║ ██║ ██║██║╚██╔╝██║██╔═══╝ ██║██║ ██╔══╝ ██║ ██║
╚██████╗╚██████╔╝██║ ╚═╝ ██║██║ ██║███████╗███████╗██████╔╝
╚═════╝ ╚═════╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚══════╝╚═════╝
@compiled/webpack-loader
You forgot to add the 'CompiledExtractPlugin' plugin (i.e `{ plugins: [new CompiledExtractPlugin()] }`), please read https://compiledcssinjs.com/docs/css-extraction-webpack
My webpack.config.js does have the CompiledExtractPlugin. It’s essentially a standard react ejected webpack.config.js, plus compiled library, following your docs.
Expected behavior Should continue to work largely as before upgrading from 0.8.0


Issue Analytics
- State:
- Created 2 years ago
- Comments:11
Top Results From Across the Web
Atlassian-Labs Compiled Issues
"You forgot to add the 'CompiledExtractPlugin'", open, 10, 2022-03-07, 2022-11-17. Error thrown when evaluating function declarations, closed, 0, 2022-03-04 ...
Read more >A familiar and performant compile time CSS-in-JS library ...
"You forgot to add the 'CompiledExtractPlugin'". Describe the bug After upgrading from 0.8.0 of @compiled/webpack-loader to 0.8.3 or 0.8.4, I now receive ...
Read more >Issues · atlassian-labs/compiled · GitHub
A familiar and performant compile time CSS-in-JS library for React. - Issues · atlassian-labs/compiled.
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 Free
Top 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

Oh damn, sorry! It seems you have uncovered two bugs for us. I think there is another bug with how we check the loader is defined. We simply check if the loader property is equal to
@compiled/webpack-loaderbut since you are using require.resolve to load the @compiled/webpack-loader, the loader property will be equal to the path to the loader. I will need to update this check.@onionhammer I have found the issue. In version 0.8.1, we updated how we check whether the CompiledExtractPlugin is used, but we didn’t consider the case of nested rules - like you have here. Thanks for raising this bug, I am working on a fix right now.