Skip to content

Instantly share code, notes, and snippets.

@kuc-arc-f
Created January 14, 2024 03:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kuc-arc-f/8c870c2844b1f34df43a1dab3ebe8f90 to your computer and use it in GitHub Desktop.
Save kuc-arc-f/8c870c2844b1f34df43a1dab3ebe8f90 to your computer and use it in GitHub Desktop.
Vue.js vite.config.ts, sample
import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'
// https://vitejs.dev/config/
export default defineConfig({
plugins: [vue()],
define: {
"process.env.NODE_ENV": '"production"',
},
build: {
lib: {
entry: [
'./src/main.ts',
],
formats: ['es'],
fileName: '[name]',
},
rollupOptions: {
output: {
dir: './dist/static'
}
},
emptyOutDir: false,
copyPublicDir: false
}
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment