import { defineConfig } from 'vite'
import uni from '@dcloudio/vite-plugin-uni'
import commonjs from '@rollup/plugin-commonjs'
import windiCSS from 'vite-plugin-windicss'
import miniProgramTailwind from '@dcasia/mini-program-tailwind-webpack-plugin/rollup'
export default defineConfig({
plugins: [
uni(),
commonjs(),
windiCSS({
scan: {
dirs: ['.'], // all files in the cwd
fileExtensions: ['vue', 'js', 'ts'] // also enabled scanning for js/ts
}
}),
miniProgramTailwind()
],
server: {
host: '0.0.0.0',
port: 8000
},
build: {
minify: 'terser',
terserOptions: {
compress: {
drop_console: true
}
}
}
})
1 个回复
DCloud_UNI_GSQ
https://github.com/dcloudio/uni-app/issues/3091