Learn-Juzhen/vite.config.js

33 lines
589 B
JavaScript
Raw Normal View History

2022-04-28 10:17:01 +08:00
import {
defineConfig
} from 'vite'
import vue from '@vitejs/plugin-vue'
import glsl from 'vite-plugin-glsl'
import path from 'path'
const nodeResolve = (dir) => path.resolve(__dirname, '.', dir)
// https://vitejs.dev/config/
export default defineConfig({
resolve: {
alias: {
'@': nodeResolve('src')
},
},
server: {
host: '0.0.0.0',
port: 3000,
},
css: {
preprocessorOptions: {
scss: {
additionalData: `@import "@/style/variables.scss";`,
javascriptEnabled: true,
},
},
},
plugins: [
vue(),
glsl(),
]
})