Skip to content

Commit 7d1818d

Browse files
committed
ci: fix css rules test
1 parent a2d1095 commit 7d1818d

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

packages/@vue/cli-service/__tests__/css.spec.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -133,8 +133,10 @@ test('css.extract', () => {
133133
// does not support mixing config files with loader options.
134134
expect(findLoaders(config2, lang)).toEqual(['vue-style', 'css', 'postcss', 'postcss'].concat(loader))
135135
expect(findOptions(config2, lang, 'css').importLoaders).toBe(3)
136-
// minification loader should be injected before the user-facing postcss-loader
137-
expect(findOptions(config2, lang, 'postcss').plugins).toBeTruthy()
136+
// minification loader should be injected after the user-facing postcss-loader
137+
const rule = findRule(config2, lang)
138+
const postcssUse = rule.use.slice().reverse().find(({ loader }) => loader === 'postcss-loader')
139+
expect(postcssUse.options.plugins).toBeTruthy()
138140
})
139141
})
140142

packages/@vue/cli-service/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@
6363
"thread-loader": "^1.1.5",
6464
"uglifyjs-webpack-plugin": "^1.2.7",
6565
"url-loader": "^1.1.0",
66-
"vue-loader": "^15.3.0",
66+
"vue-loader": "^15.4.2",
6767
"webpack": "^4.15.1",
6868
"webpack-bundle-analyzer": "^2.13.1",
6969
"webpack-chain": "^4.8.0",

0 commit comments

Comments
 (0)