init
This commit is contained in:
8
app/frontend/jsconfig.json
Normal file
8
app/frontend/jsconfig.json
Normal file
@@ -0,0 +1,8 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"baseUrl": ".",
|
||||
"paths": {
|
||||
"@/*": ["./src/*"]
|
||||
}
|
||||
}
|
||||
}
|
||||
23
app/frontend/package.json
Normal file
23
app/frontend/package.json
Normal file
@@ -0,0 +1,23 @@
|
||||
{
|
||||
"name": "frontend",
|
||||
"private": true,
|
||||
"version": "0.0.0",
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
"dev": "vite",
|
||||
"build": "vite build",
|
||||
"preview": "vite preview"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@mdi/font": "^7.4.47",
|
||||
"autoprefixer": "^10.4.20",
|
||||
"postcss": "^8.5.2",
|
||||
"postcss-import": "^16.1.0",
|
||||
"postcss-simple-vars": "^7.0.1",
|
||||
"vite": "^6.1.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"events": "^3.3.0",
|
||||
"moment": "^2.30.1"
|
||||
}
|
||||
}
|
||||
7
app/frontend/postcss.config.js
Normal file
7
app/frontend/postcss.config.js
Normal file
@@ -0,0 +1,7 @@
|
||||
export default {
|
||||
plugins: {
|
||||
'postcss-import': {},
|
||||
'postcss-simple-vars': {},
|
||||
'autoprefixer': {}
|
||||
}
|
||||
}
|
||||
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