Skip to content

Commit

Permalink
fix(repl): production assets should be set publicPath
Browse files Browse the repository at this point in the history
  • Loading branch information
axetroy committed Nov 24, 2020
1 parent 4253a69 commit 89ea856
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 3 deletions.
5 changes: 3 additions & 2 deletions repl/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
"name": "changelog-repl",
"version": "0.0.0",
"scripts": {
"dev": "vite",
"build": "vite build"
"dev": "cross-env NODE_ENV=development vite",
"build": "cross-env NODE_ENV=production vite build"
},
"dependencies": {
"ant-design-vue": "^2.0.0-rc.1",
Expand All @@ -13,6 +13,7 @@
"devDependencies": {
"@types/marked": "^1.2.0",
"@vue/compiler-sfc": "^3.0.2",
"cross-env": "^7.0.2",
"import-http": "^0.3.1",
"rollup-plugin-esm-import-to-url": "^2.1.0",
"sass": "^1.29.0",
Expand Down
1 change: 1 addition & 0 deletions repl/vite.config.ts → repl/vite.config.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import httpImport from "import-http/rollup";

export default {
base: process.env.NODE_ENV === "production" ? "/changelog" : "/",
rollupInputOptions: {
plugins: [httpImport()],
},
Expand Down
9 changes: 8 additions & 1 deletion repl/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -732,7 +732,14 @@ cosmiconfig@^7.0.0:
path-type "^4.0.0"
yaml "^1.10.0"

cross-spawn@^7.0.0:
cross-env@^7.0.2:
version "7.0.2"
resolved "https://registry.npmjs.org/cross-env/-/cross-env-7.0.2.tgz#bd5ed31339a93a3418ac4f3ca9ca3403082ae5f9"
integrity sha512-KZP/bMEOJEDCkDQAyRhu3RL2ZO/SUVrxQVI0G3YEQ+OLbRA3c6zgixe8Mq8a/z7+HKlNEjo8oiLUs8iRijY2Rw==
dependencies:
cross-spawn "^7.0.1"

cross-spawn@^7.0.0, cross-spawn@^7.0.1:
version "7.0.3"
resolved "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz#f73a85b9d5d41d045551c177e2882d4ac85728a6"
integrity sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==
Expand Down

0 comments on commit 89ea856

Please sign in to comment.