プラグイン初期作成
This commit is contained in:
33
vue-project/my-kintone-plugin/vite.config.js
Normal file
33
vue-project/my-kintone-plugin/vite.config.js
Normal file
@@ -0,0 +1,33 @@
|
||||
import { defineConfig } from 'vite'
|
||||
import vue from '@vitejs/plugin-vue'
|
||||
import copy from "rollup-plugin-copy";
|
||||
import path from 'path';
|
||||
|
||||
// https://vite.dev/config/
|
||||
export default defineConfig({
|
||||
plugins: [
|
||||
vue(),
|
||||
copy({
|
||||
targets: [
|
||||
{ src: 'dist/index.html', dest: 'dist/src/html', rename: 'config.html' }
|
||||
],
|
||||
hook: 'writeBundle' // 指定在何时复制文件
|
||||
})
|
||||
],
|
||||
build:{
|
||||
rollupOptions:{
|
||||
input:{
|
||||
config:path.resolve(__dirname,'index.html'),
|
||||
desktop:path.resolve(__dirname,'src/js/desktop.js'),
|
||||
mobile:path.resolve(__dirname,'src/js/mobile.js'),
|
||||
},
|
||||
output:{
|
||||
entryFileNames: (chunkInfo) => {
|
||||
// console.log(chunkInfo);
|
||||
return 'src/js/[name].js'; // 默认处理为 JS 文件
|
||||
},
|
||||
assetFileNames:'src/[ext]/[name].[ext]'
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
Reference in New Issue
Block a user