mirror of
https://github.com/vuejs/vue-cli.git
synced 2026-01-19 05:40:13 -06:00
fix: fix absolute path for outputDir option
This commit is contained in:
@@ -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', () => {
|
||||
|
||||
@@ -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, '')
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user