question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

"You forgot to add the 'CompiledExtractPlugin'"

See original GitHub issue

Describe 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

image

image

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:11

github_iconTop GitHub Comments

1reaction
hannahkmolloycommented, Mar 31, 2022

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-loader but 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.

1reaction
hannahkmolloycommented, Mar 16, 2022

@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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found