Merge pull request 'bugfix/31-env-js-linking-ci' (#41) from bugfix/31-env-js-linking-ci into dev
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
Reviewed-on: #41 close #31
This commit is contained in:
commit
75b4dac0fe
@ -3,6 +3,7 @@ WORKDIR /app
|
||||
COPY . .
|
||||
RUN yarn
|
||||
RUN yarn build
|
||||
RUN yarn postbuild
|
||||
# final image
|
||||
FROM fholzer/nginx-brotli:v1.19.1
|
||||
COPY --from=0 /app/dist /usr/share/nginx/html
|
||||
|
6
env_fix.js
Normal file
6
env_fix.js
Normal file
@ -0,0 +1,6 @@
|
||||
const fs = require('fs');
|
||||
if (fs.existsSync('./dist/index.html')) {
|
||||
const content = fs.readFileSync('./dist/index.html', { encoding: 'utf8' });
|
||||
const newcontent = content.replace(`"/env.js"`, `"./env.js"`);
|
||||
fs.writeFileSync('./dist/index.html', newcontent);
|
||||
}
|
13
package.json
13
package.json
@ -4,14 +4,15 @@
|
||||
"scripts": {
|
||||
"dev": "vite",
|
||||
"build": "vite build",
|
||||
"release": "release-it --only-version"
|
||||
"release": "release-it --only-version",
|
||||
"postbuild": "node env_fix.js"
|
||||
},
|
||||
"dependencies": {
|
||||
"marked": "2.0.1",
|
||||
"marked": "2.0.3",
|
||||
"redaxios": "0.4.1",
|
||||
"toastify-js": "1.10.0",
|
||||
"validator": "13.5.2",
|
||||
"vue-i18n": "9.0.0",
|
||||
"vue-i18n": "9.1.4",
|
||||
"vue-toastification": "2.0.0-rc.1",
|
||||
"vue": "3.0.9",
|
||||
"vue-router": "4.0.5"
|
||||
@ -23,10 +24,10 @@
|
||||
"@tailwindcss/line-clamp": "0.2.0",
|
||||
"@tailwindcss/typography": "0.4.0",
|
||||
"@vitejs/plugin-vue": "1.2.1",
|
||||
"@vue/compiler-sfc": "3.0.10",
|
||||
"@vue/compiler-sfc": "3.0.11",
|
||||
"autoprefixer": "10.2.5",
|
||||
"tailwindcss": "2.0.4",
|
||||
"release-it": "14.5.0",
|
||||
"tailwindcss": "2.1.1",
|
||||
"release-it": "14.6.1",
|
||||
"vite": "2.1.5"
|
||||
},
|
||||
"release-it": {
|
||||
|
Loading…
x
Reference in New Issue
Block a user