55 lines
1.6 KiB
JavaScript
55 lines
1.6 KiB
JavaScript
import { defineConfig } from 'vite';
|
|
import laravel from 'laravel-vite-plugin';
|
|
import tailwindcss from '@tailwindcss/vite';
|
|
import vue from '@vitejs/plugin-vue';
|
|
|
|
export default defineConfig({
|
|
plugins: [
|
|
laravel({
|
|
input: ['resources/css/app.css', 'resources/js/app.js'],
|
|
refresh: true,
|
|
}),
|
|
tailwindcss(),
|
|
vue({
|
|
template: {
|
|
compilerOptions: {
|
|
// 包含运行时模板编译器
|
|
isCustomElement: (tag) => false
|
|
}
|
|
}
|
|
}),
|
|
],
|
|
define: {
|
|
__VUE_OPTIONS_API__: true,
|
|
__VUE_PROD_DEVTOOLS__: false,
|
|
},
|
|
resolve: {
|
|
alias: {
|
|
'vue': 'vue/dist/vue.esm-bundler.js'
|
|
}
|
|
},
|
|
build: {
|
|
chunkSizeWarningLimit: 1000,
|
|
rollupOptions: {
|
|
output: {
|
|
manualChunks: {
|
|
'vue-vendor': ['vue'],
|
|
'codemirror-vendor': [
|
|
'codemirror',
|
|
'@codemirror/autocomplete',
|
|
'@codemirror/commands',
|
|
'@codemirror/lang-javascript',
|
|
'@codemirror/lang-php',
|
|
'@codemirror/language',
|
|
'@codemirror/search',
|
|
'@codemirror/state',
|
|
'@codemirror/theme-one-dark',
|
|
'@codemirror/view'
|
|
],
|
|
'utils-vendor': ['axios']
|
|
}
|
|
}
|
|
}
|
|
}
|
|
});
|