Skip to content

How to specify a directory #62

Answered by nonzzz
MangMax asked this question in Q&A
Discussion options

You must be logged in to vote

Plugin will automatically get your output directory. In fact only set build.outDir in your vite's config.

function handleOutputOption(conf: ResolvedConfig) {
// issue #39
// In some case like vite-plugin-legacy will set an empty output item
// we should skip it.
// Using full path. I find if we using like `dist` or others path it can't
// work on monorepo
// eg:
// yarn --cwd @pkg/website build
const outputs: Set<string> = new Set()
const prepareAbsPath = (root: string, sub: string) => slash(path.resolve(root, sub))
if (conf.build.rollupOptions?.output) {
c…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by nonzzz
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants