Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: display outdir correctly after build #1497

Closed
wants to merge 1 commit into from
Closed

fix: display outdir correctly after build #1497

wants to merge 1 commit into from

Conversation

CHOYSEN
Copy link
Contributor

@CHOYSEN CHOYSEN commented Jan 12, 2021

About 2da0f2f#diff-804926239ab7ce5dd12d3ba02244733917a7a54582b67c8212e130679aa00508R41

// default outDir = 'dist'
export default defineConfig({
  plugins: [vue()]
})
// ../dist/index.html
// I am not sure it is be allowed, but it work fine for me
export default defineConfig({
  plugins: [vue()],
  build: {
    outDir: '.\\dist'
  }
})
// ../.\dist/index.html
// Here are some tests after this fix
const outDirs = ['dist', 'dist/', './dist', './dist/', '../dist', '../dist/', '.\\dist']

outDirs.forEach(outDir => {
  outDir = outDir.replace(/\\/g, '/')
  !outDir.startsWith('.') && (outDir = './' + outDir)
  !outDir.endsWith('/') && (outDir += '/')
  console.log(outDir)
})

// ./dist/
// ./dist/
// ./dist/
// ./dist/
// ../dist/
// ../dist/
// ./dist/

@yyx990803 yyx990803 closed this in 50bff79 Jan 12, 2021
@yyx990803
Copy link
Member

Thanks, but outDir could also be an absolutely path. I pushed a different fix.

@CHOYSEN CHOYSEN deleted the fix_reporter_outdir branch January 14, 2021 15:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants