提交 eab4fecd 编写于 作者: zhangzhiwei's avatar zhangzhiwei

.

上级 a961eead
...@@ -2,29 +2,10 @@ import { defineConfig } from "vite"; ...@@ -2,29 +2,10 @@ import { defineConfig } from "vite";
import uni from "@dcloudio/vite-plugin-uni"; import uni from "@dcloudio/vite-plugin-uni";
// https://vitejs.dev/config/ // https://vitejs.dev/config/
let filePath = ''
let Timestamp = ''
filePath = 'assets/'; //打包文件存放文件夹路径
Timestamp = '.' + new Date().getTime();//时间戳
export default defineConfig({ export default defineConfig({
plugins: [ plugins: [
uni() uni()
], ],
build:{
rollupOptions: {
// dir: "dist",
//打包后文件名
// entryFileNames: `${filePath}[name]${Timestamp}.js`,
output:{ // 输出重构 打包编译后的 文件目录 文件名称 【模块名称.时间戳】
// 入口文件名
entryFileNames: `${filePath}[name]${Timestamp}.js`,
// 块文件名
chunkFileNames: `${filePath}[name]${Timestamp}.js`,
// 资源文件名 css 图片等等
assetFileNames: `${filePath}[name]${Timestamp}.[ext]`
}
}
},
server: { server: {
proxy: { proxy: {
'^/pre': { '^/pre': {
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册