integrated vuejs with vitejs and hmr to drupal theme
This commit is contained in:
25
web/themes/custom/caravane/vite.config.js
Normal file
25
web/themes/custom/caravane/vite.config.js
Normal file
@@ -0,0 +1,25 @@
|
||||
import { defineConfig } from 'vite'
|
||||
import vue from '@vitejs/plugin-vue'
|
||||
|
||||
// https://vitejs.dev/config/
|
||||
export default defineConfig({
|
||||
plugins: [vue()],
|
||||
server: {
|
||||
hmr: {
|
||||
host: 'localhost',
|
||||
},
|
||||
watch: {
|
||||
usePolling: true,
|
||||
},
|
||||
},
|
||||
build: {
|
||||
outDir: 'assets/dist',
|
||||
rollupOptions: {
|
||||
input: 'assets/js/main.js',
|
||||
output: {
|
||||
entryFileNames: 'main.js',
|
||||
assetFileNames: 'main.css'
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
Reference in New Issue
Block a user