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

feat(webpack): options.build.loaders.vueStyle #4837

Merged
merged 4 commits into from Jan 23, 2019

Conversation

andoshin11
Copy link

Types of changes

  • Bug fix (a non-breaking change which fixes an issue)
  • New feature (a non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

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:

  • My change requires a change to the documentation.
  • I have updated the documentation accordingly. (PR: #)
  • I have added tests to cover my changes (if not applicable, please state why)
  • All new and existing tests are passing.

@pi0 pi0 requested a review from clarkdo January 23, 2019 12:58
@codecov-io
Copy link

codecov-io commented Jan 23, 2019

Codecov Report

Merging #4837 into dev will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           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
Impacted Files Coverage Δ
packages/webpack/src/utils/style-loader.js 100% <ø> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 89f097e...e53ce60. Read the comment docs.

@@ -11,6 +11,7 @@ export default class StyleLoader {
this.perfLoader = perfLoader
this.rootDir = options.rootDir
this.loaders = {
...options.build.loaders,
Copy link
Member

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.

Copy link
Member

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.

Copy link
Author

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

@clarkdo clarkdo changed the title Load loaders options correctly fix: Load loaders options correctly Jan 23, 2019
@pi0 pi0 changed the title fix: Load loaders options correctly feat(webpack): options.build.loaders.vueStyle Jan 23, 2019
@pi0 pi0 merged commit 762305b into nuxt:dev Jan 23, 2019
@danielroe danielroe added the 2.x label Jan 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants