fix: fix absolute path for outputDir option

This commit is contained in:
Evan You
2018-07-26 22:13:43 -04:00
parent e970b1afc3
commit e7602abf46
2 changed files with 2 additions and 2 deletions

View File

@@ -91,7 +91,7 @@ test('handle option baseUrl and outputDir correctly', () => {
})
const service = createMockService()
expect(service.projectOptions.baseUrl).toBe('https://foo.com/bar/')
expect(service.projectOptions.outputDir).toBe('public')
expect(service.projectOptions.outputDir).toBe('/public')
})
test('load project options from vue.config.js', () => {

View File

@@ -336,6 +336,6 @@ function ensureSlash (config, key) {
function removeSlash (config, key) {
if (typeof config[key] === 'string') {
config[key] = config[key].replace(/^\/|\/$/g, '')
config[key] = config[key].replace(/\/$/g, '')
}
}