Skip to content

Commit 8dfa290

Browse files
committed
refactor: generate postcss.config.js instead of .postcssrc.js
1 parent 8189f20 commit 8dfa290

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

packages/@vue/cli/__tests__/Generator.spec.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -649,7 +649,7 @@ test('extract config files', async () => {
649649
const js = v => `module.exports = ${stringifyJS(v, null, 2)}`
650650
expect(fs.readFileSync('/vue.config.js', 'utf-8')).toMatch(js(configs.vue))
651651
expect(fs.readFileSync('/babel.config.js', 'utf-8')).toMatch(js(configs.babel))
652-
expect(fs.readFileSync('/.postcssrc.js', 'utf-8')).toMatch(js(configs.postcss))
652+
expect(fs.readFileSync('/postcss.config.js', 'utf-8')).toMatch(js(configs.postcss))
653653
expect(fs.readFileSync('/.eslintrc.js', 'utf-8')).toMatch(js(configs.eslintConfig))
654654
expect(fs.readFileSync('/jest.config.js', 'utf-8')).toMatch(js(configs.jest))
655655
expect(fs.readFileSync('/.browserslistrc', 'utf-8')).toMatch('> 1%\nnot <= IE8')

packages/@vue/cli/lib/Generator.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ const defaultConfigTransforms = {
2626
}),
2727
postcss: new ConfigTransform({
2828
file: {
29-
js: ['.postcssrc.js'],
29+
js: ['postcss.config.js'],
3030
json: ['.postcssrc.json', '.postcssrc'],
3131
yaml: ['.postcssrc.yaml', '.postcssrc.yml']
3232
}

0 commit comments

Comments
 (0)