mirror of
https://github.com/vuejs/vue-cli.git
synced 2026-01-19 13:50:11 -06:00
refactor: disable loading project config from rc
This commit is contained in:
@@ -59,14 +59,6 @@ test('load project options from vue.config.js', () => {
|
||||
fs.unlinkSync('/vue.config.js')
|
||||
})
|
||||
|
||||
test('load project options from .vuerc', () => {
|
||||
fs.writeFileSync('/.vuerc', JSON.stringify({ lintOnSave: false }))
|
||||
const service = createMockService()
|
||||
// vue.config.js has higher priority
|
||||
expect(service.projectOptions.lintOnSave).toBe(false)
|
||||
fs.unlinkSync('/.vuerc')
|
||||
})
|
||||
|
||||
test('package.json option should take priority', () => {
|
||||
fs.writeFileSync('/vue.config.js', `module.exports=${JSON.stringify({ lintOnSave: false })}`)
|
||||
mockPkg({
|
||||
|
||||
@@ -155,6 +155,7 @@ module.exports = class Service {
|
||||
resolved = this.pkg.vue
|
||||
} else {
|
||||
const explorer = cosmiconfig('vue', {
|
||||
rc: false,
|
||||
sync: true,
|
||||
stopDir: this.context
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user