Initial commit of some work creating RMO single-page app
Doesn't work yet, but they both start, so checkpoint.
This commit is contained in:
parent
54e77f72f4
commit
d7d6888f63
11 changed files with 229 additions and 5 deletions
71
vite/rmo.ts
Normal file
71
vite/rmo.ts
Normal file
|
|
@ -0,0 +1,71 @@
|
|||
import { defineConfig } from "vite";
|
||||
import vue from "@vitejs/plugin-vue";
|
||||
import checker from "vite-plugin-checker";
|
||||
import path from "path";
|
||||
|
||||
export default defineConfig({
|
||||
plugins: [
|
||||
vue(),
|
||||
checker({
|
||||
vueTsc: true,
|
||||
}),
|
||||
],
|
||||
|
||||
resolve: {
|
||||
alias: {
|
||||
"@": path.resolve(__dirname, "../ts"),
|
||||
},
|
||||
},
|
||||
|
||||
css: {
|
||||
preprocessorOptions: {
|
||||
scss: {
|
||||
additionalData: `@use "sass:map";\n@import "@/style/variables.scss";`,
|
||||
api: "modern-compiler",
|
||||
silenceDeprecations: [
|
||||
"import",
|
||||
"global-builtin",
|
||||
"if-function",
|
||||
"color-functions",
|
||||
],
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
build: {
|
||||
manifest: true,
|
||||
outDir: "static/gen",
|
||||
emptyOutDir: true,
|
||||
rollupOptions: {
|
||||
input: {
|
||||
main: path.resolve(__dirname, "../ts/main-rmo.ts"),
|
||||
},
|
||||
output: {
|
||||
entryFileNames: "js/bundle.[hash].js",
|
||||
chunkFileNames: "js/[name].[hash].js",
|
||||
assetFileNames: (assetInfo) => {
|
||||
if (/\.(woff2?|ttf|eot)$/.test(assetInfo.name || "")) {
|
||||
return "fonts/[name].[hash][extname]";
|
||||
}
|
||||
if (/\.css$/.test(assetInfo.name || "")) {
|
||||
return "css/style.[hash][extname]";
|
||||
}
|
||||
return "assets/[name].[hash][extname]";
|
||||
},
|
||||
},
|
||||
},
|
||||
sourcemap: true,
|
||||
},
|
||||
|
||||
server: {
|
||||
allowedHosts: ["poweredge.local", "dev-report.mosquitoes.online"],
|
||||
port: 9001,
|
||||
/*proxy: {
|
||||
"/api": {
|
||||
target: "http://127.0.0.1:9002",
|
||||
changeOrigin: false,
|
||||
},
|
||||
},*/
|
||||
strictPort: true,
|
||||
},
|
||||
});
|
||||
95
vite/sync.ts
Normal file
95
vite/sync.ts
Normal file
|
|
@ -0,0 +1,95 @@
|
|||
import { defineConfig } from "vite";
|
||||
import vue from "@vitejs/plugin-vue";
|
||||
import checker from "vite-plugin-checker";
|
||||
import path from "path";
|
||||
|
||||
export default defineConfig({
|
||||
plugins: [
|
||||
vue(),
|
||||
checker({
|
||||
vueTsc: true,
|
||||
}),
|
||||
],
|
||||
|
||||
resolve: {
|
||||
alias: {
|
||||
"@": path.resolve(__dirname, "../ts"),
|
||||
},
|
||||
},
|
||||
|
||||
css: {
|
||||
preprocessorOptions: {
|
||||
scss: {
|
||||
additionalData: `@use "sass:map";\n@import "@/style/variables.scss";`,
|
||||
api: "modern-compiler",
|
||||
silenceDeprecations: [
|
||||
"import",
|
||||
"global-builtin",
|
||||
"if-function",
|
||||
"color-functions",
|
||||
],
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
build: {
|
||||
manifest: true,
|
||||
outDir: "static/gen",
|
||||
emptyOutDir: true,
|
||||
rollupOptions: {
|
||||
input: {
|
||||
main: path.resolve(__dirname, "index-sync.html"),
|
||||
},
|
||||
output: {
|
||||
entryFileNames: "js/bundle.[hash].js",
|
||||
chunkFileNames: "js/[name].[hash].js",
|
||||
assetFileNames: (assetInfo) => {
|
||||
if (/\.(woff2?|ttf|eot)$/.test(assetInfo.name || "")) {
|
||||
return "fonts/[name].[hash][extname]";
|
||||
}
|
||||
if (/\.css$/.test(assetInfo.name || "")) {
|
||||
return "css/style.[hash][extname]";
|
||||
}
|
||||
return "assets/[name].[hash][extname]";
|
||||
},
|
||||
},
|
||||
},
|
||||
sourcemap: true,
|
||||
},
|
||||
|
||||
server: {
|
||||
allowedHosts: [
|
||||
"poweredge.local",
|
||||
"dev-report.mosquitoes.online",
|
||||
"dev-sync.nidus.cloud",
|
||||
],
|
||||
port: 9000,
|
||||
proxy: {
|
||||
"/api": {
|
||||
target: "http://127.0.0.1:9002",
|
||||
changeOrigin: false,
|
||||
},
|
||||
"/configuration/upload/pool/flyover": {
|
||||
target: "http://127.0.0.1:9002",
|
||||
changeOrigin: false,
|
||||
},
|
||||
"/mailer": {
|
||||
target: "http://127.0.0.1:9002",
|
||||
changeOrigin: false,
|
||||
},
|
||||
"/qr-code": {
|
||||
target: "http://127.0.0.1:9002",
|
||||
changeOrigin: false,
|
||||
},
|
||||
"/signin": {
|
||||
target: "http://localhost:9002",
|
||||
changeOrigin: false,
|
||||
},
|
||||
"/signup": {
|
||||
target: "http://localhost:9002",
|
||||
changeOrigin: false,
|
||||
},
|
||||
},
|
||||
strictPort: true,
|
||||
},
|
||||
});
|
||||
Loading…
Add table
Add a link
Reference in a new issue