41 lines
939 B
TypeScript
41 lines
939 B
TypeScript
import { defineConfig } from '@farmfe/core';
|
|
import path from 'path';
|
|
import AutoImport from 'unplugin-auto-import/vite'
|
|
|
|
export default defineConfig({
|
|
compilation: {
|
|
html: {
|
|
base: "./src/app.html",
|
|
},
|
|
input: {
|
|
index: "./src/pages/index.html",
|
|
dashboard: "./src/pages/dashboard.html",
|
|
"404": "./src/pages/error/404.html",
|
|
"500": "./src/pages/error/500.html",
|
|
},
|
|
output: {
|
|
path: 'build',
|
|
filename: 'assets/[name].[hash].[ext]',
|
|
assetsFilename: 'static/[resourceName].[ext]'
|
|
},
|
|
resolve: {
|
|
alias: {
|
|
"@/": path.join(process.cwd()),
|
|
"$/": path.join(process.cwd(), "src", "lib"),
|
|
},
|
|
},
|
|
},
|
|
plugins: [
|
|
'@farmfe/plugin-react',
|
|
'@farmfe/plugin-sass',
|
|
],
|
|
vitePlugins: [
|
|
AutoImport({
|
|
include: [/\.[jt]sx?$/],
|
|
imports: ['react'],
|
|
dirs: ['./src/**'],
|
|
dts: './src/auto-imports.d.ts'
|
|
}),
|
|
],
|
|
});
|