1
0
mirror of https://gitee.com/bitdance-team/chrome-extension synced 2025-01-11 14:18:26 +08:00
Code Issues Projects Releases Wiki Activity GitHub Gitee
chrome-extension/packages/plugin-ui/vite.config.ts
2022-01-26 18:46:54 +08:00

25 lines
642 B
TypeScript

import { appRootPath } from '@nrwl/tao/src/utils/app-root';
import vue from '@vitejs/plugin-vue';
import { defineConfig } from 'vite';
import { join } from 'path';
import baseTsConfig from '../../tsconfig.base.json';
// https://vitejs.dev/config/
export default defineConfig({
plugins: [vue()],
root: __dirname,
build: {
outDir: '../../dist/packages/plugin-ui',
emptyOutDir: true,
},
resolve: {
alias: Object.entries(baseTsConfig.compilerOptions.paths).reduce(
(acc, [key, paths]) => ({
...acc,
[key]: (paths as string[]).map((path) => join(appRootPath, path)),
}),
{}
),
},
});