Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

useAltLoader doesn't work with MiniCssExtractPlugin's experimentalUseImportModule #727

Open
dreyks opened this issue Oct 4, 2021 · 0 comments

Comments

@dreyks
Copy link
Contributor

dreyks commented Oct 4, 2021

experimentalUseImportModule is a new option for MiniCssExtractPlugin to use importModule instead of a child compilation.

when calling importModule mini-css-extract-plugin prepends the request with the resource which as far as I understand adds the matchResource to the module.

this leads to astroturf not attaching its own matchResource here

this, in turn, leads to CSS not being processed as CSS modules and then astroturf can't find any CSS Module imports since there are none

my understanding of how things work (especially in the context of matchResource) is limited and mostly comes from the discussion in your PR to css-loader so I might be mistaken here :)

also, If I comment the conditional in astroturf and just reassign this._module.matchResource = style.absoluteFilePath unconditionally - everything seems to be working for me. I don't, however, fully understand the consequences of this action.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant