init
This commit is contained in:
52 files changed
+5299
No files matched your search
@@ -0,0 +1,36 @@
|
||||
import { defineConfig } from 'vite'
|
||||
import vue from '@vitejs/plugin-vue'
|
||||
import path from 'node:path'
|
||||
|
||||
export default defineConfig({
|
||||
plugins: [vue()],
|
||||
define: {
|
||||
'process.env.NODE_ENV': JSON.stringify('production'),
|
||||
},
|
||||
build: {
|
||||
outDir: 'dist',
|
||||
emptyOutDir: false,
|
||||
cssCodeSplit: true,
|
||||
lib: {
|
||||
entry: path.resolve(process.cwd(), 'resources/js/card.js'),
|
||||
name: 'NovaFormCard',
|
||||
formats: ['iife'],
|
||||
fileName: () => 'js/card.js',
|
||||
},
|
||||
rollupOptions: {
|
||||
external: ['vue'],
|
||||
output: {
|
||||
globals: {
|
||||
vue: 'Vue',
|
||||
},
|
||||
assetFileNames: assetInfo => {
|
||||
if (assetInfo.name && assetInfo.name.endsWith('.css')) {
|
||||
return 'css/card.css'
|
||||
}
|
||||
|
||||
return 'assets/[name][extname]'
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
})
|
||||
Reference in new issue
Block a user