Closed boris-petrov closed 2 years ago
style-loader is not recommended for production, so our default setup follows the recommendation of using it in development and using MiniCssExtractPlugin in production. Maybe what you really need is more control over the MiniCssExtractPlugin options?
@ef4 thanks for taking a look into this. I didn't know that style-loader
is not supposed to be used in production. Not sure what the difference is with MiniCssExtractPlugin
but oh well. So yes, I do need what you suggest - more control over the MiniCssExtractPlugin
options.
hm, actually, you can pass options right now via miniCssExtractPluginOptions
. So all is fine. Thank you for the support!
If you can suggest a place where we could have documented this better for your use case, that would be helpful.
On Fri, Apr 22, 2022 at 5:32 AM Boris Petrov @.***> wrote:
Closed #514 https://github.com/ef4/ember-auto-import/issues/514.
— Reply to this email directly, view it on GitHub https://github.com/ef4/ember-auto-import/issues/514#event-6477157886, or unsubscribe https://github.com/notifications/unsubscribe-auth/AACN6MVWARZ4IIOD75BOUMDVGJWZTANCNFSM5SPGWVFA . You are receiving this because you were mentioned.Message ID: @.***>
Well, in this case this was my mistake - I hadn't read that style-loader
shouldn't be used in production. But perhaps all these options could be documented in the README, that's true.
In
ember-cli-build.js
inautoImport
I have:Which works great on
ember-auto-import
2.4.1 in development but in production this is not executed and hence all styles are inserted as links at the end ofhead
(which is the default behavior ofstyle-loader
- i.e. theinsert
option is not used at all). The same happens in 2.4.0 (it also had another issue). In 2.3.0 that is not the case and there all works fine.cc @ef4