Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

feat!: upgrade to css-loader 5; remove css.requireModuleExtension & css.modules options #6332

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

Merged
merged 11 commits into from
Mar 9, 2021
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix: only force auto option for CSS modules in SFCs
  • Loading branch information
haoqunjiang committed Mar 9, 2021
commit 4fd7ae2c71c0705b0b2398bc1b51e437a7b809f0
3 changes: 2 additions & 1 deletion 3 packages/@vue/cli-service/__tests__/css.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,8 @@ test('Customized CSS Modules rules', () => {
}
}
// vue-modules rules
expect(findOptions(config, lang, 'css', 0)).toEqual(expected)
expect(findOptions(config, lang, 'css', 0)).toMatchObject(expected)
expect(findOptions(config, lang, 'css', 0).modules.auto.toString()).toEqual('() => true')
// normal-modules rules
expect(findOptions(config, lang, 'css', 2)).toEqual(expected)
// normal rules
Expand Down
5 changes: 4 additions & 1 deletion 5 packages/@vue/cli-service/lib/config/css.js
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,10 @@ module.exports = (api, rootOptions) => {
typeof cssLoaderOptions.modules === 'object' &&
!cssLoaderOptions.modules.auto
) {
cssLoaderOptions.modules.auto = () => true
cssLoaderOptions.modules = {
...cssLoaderOptions.modules,
auto: () => true
}
}
}

Expand Down
Morty Proxy This is a proxified and sanitized view of the page, visit original site.