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
feat(webpack): options.build.loaders.vueStyle #4837
Conversation
Codecov Report
@@ Coverage Diff @@
## dev #4837 +/- ##
=======================================
Coverage 91.18% 91.18%
=======================================
Files 73 73
Lines 2360 2360
Branches 582 582
=======================================
Hits 2152 2152
Misses 190 190
Partials 18 18
Continue to review full report at Codecov.
|
@@ -11,6 +11,7 @@ export default class StyleLoader { | |||
this.perfLoader = perfLoader | |||
this.rootDir = options.rootDir | |||
this.loaders = { | |||
...options.build.loaders, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This will lead to all loaders which are not related to style like vue-loader
, file-loader
, ts-loader...
are wrapped on style-loader.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I suggest only add what's needed like loaders.vueStyle
in it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sounds much more efficient and safe 👍
I just pushed the change!
@clarkdo
Types of changes
Description
When I tried to apply options for vue-style-loader via build.loaders.vueStyle API on nuxt.config.js, it didn't go through correctly.
Checklist: