mirror of
https://gitee.com/bitdance-team/chrome-extension
synced 2025-10-07 16:35:15 +08:00
feat: add monorepo
This commit is contained in:
24
packages/plugin-ui/vite.config.ts
Normal file
24
packages/plugin-ui/vite.config.ts
Normal file
@@ -0,0 +1,24 @@
|
||||
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)),
|
||||
}),
|
||||
{}
|
||||
),
|
||||
},
|
||||
});
|
Reference in New Issue
Block a user