chenlei 11 mesiacov pred
rodič
commit
eb293f6dd3
2 zmenil súbory, kde vykonal 3 pridanie a 3 odobranie
  1. 1 1
      package.json
  2. 2 2
      vue.config.js

+ 1 - 1
package.json

@@ -4,7 +4,7 @@
   "private": true,
   "scripts": {
     "serve": "cross-env TITLE=大理洱海科普馆 HOT_DOMAIN=/hotspot.html vue-cli-service serve",
-    "build:test": "cross-env TITLE=大理洱海科普馆 HOT_DOMAIN=/hotspot.html vue-cli-service build",
+    "build:test": "cross-env TITLE=大理洱海科普馆 vue-cli-service build",
     "push:test": "cross-env node ./scripts/publish.js",
     "lint": "vue-cli-service lint",
     "prepare": "husky install"

+ 2 - 2
vue.config.js

@@ -26,13 +26,13 @@ module.exports = defineConfig({
     scene: {
       template: 'public/index.html',
       entry: 'src/main.ts',
-      filename: 'index.html',
+      filename: IS_PRODUCTION ? `${SCENE || 'index'}.html` : 'index.html',
       title: process.env.TITLE,
     },
     hotspot: {
       template: 'hotspot/hotspot.html',
       entry: 'hotspot/main.ts',
-      filename: 'hotspot.html',
+      filename: IS_PRODUCTION ? `${SCENE ? SCENE + '-hotspot' : 'hotspot'}.html` : 'hotspot.html',
       title: process.env.TITLE,
     },
   },