init
This commit is contained in:
44
app/frontend/vite.config.js
Normal file
44
app/frontend/vite.config.js
Normal file
@@ -0,0 +1,44 @@
|
||||
import {defineConfig, loadEnv} from "vite";
|
||||
import {resolve, join} from "path";
|
||||
|
||||
export default defineConfig((mode) => {
|
||||
const env = loadEnv(mode, "..", ""),
|
||||
SRC_DIR = resolve("./src"),
|
||||
OUT_DIR = resolve("./dist")
|
||||
|
||||
return {
|
||||
plugins: [
|
||||
|
||||
],
|
||||
resolve: {
|
||||
alias: {
|
||||
"@": resolve(SRC_DIR),
|
||||
"vue": "vue/dist/vue.esm-bundler.js"
|
||||
}
|
||||
},
|
||||
root: SRC_DIR,
|
||||
base: "/static/",
|
||||
css: {
|
||||
postcss: "./postcss.config.js"
|
||||
},
|
||||
server: {
|
||||
host: "0.0.0.0",
|
||||
port: env.DEV_SERVER_PORT,
|
||||
origin: `http://${env.DEV_SERVER_HOST}:${env.DEV_SERVER_PORT}`, // hotfix, webfont was loaded from wrong url
|
||||
watch: {
|
||||
usePolling: true,
|
||||
reloadDelay: 500,
|
||||
}
|
||||
},
|
||||
build: {
|
||||
manifest: "manifest.json",
|
||||
emptyOutDir: true,
|
||||
outDir: OUT_DIR,
|
||||
rollupOptions: {
|
||||
input: {
|
||||
// admin: join(SRC_DIR, "app/admin-entrypoint.js"),
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
Reference in New Issue
Block a user