Skip to content

Commit 64daeae

Browse files
committed
fix(ci) build options
1 parent f9e5c7a commit 64daeae

5 files changed

Lines changed: 17 additions & 4 deletions

File tree

.github/workflows/node.js.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ on:
77
branches: [ "main" ]
88

99
permissions:
10-
contents: write # cần quyền ghi để đẩy lên gh-pages
10+
contents: write
1111

1212
jobs:
1313
build-deploy:
@@ -33,7 +33,7 @@ jobs:
3333
run: npm ci
3434

3535
- name: Build all projects
36-
run: npm run build:all:gh-pages
36+
run: npm run build:all:demo
3737

3838
- name: Copy all built files to deploy folder
3939
run: |

angular.json

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,15 @@
2121
"production": {
2222
"target": "shell:esbuild:production"
2323
},
24+
"demo": {
25+
"target": "shell:esbuild:production",
26+
"fileReplacements": [
27+
{
28+
"replace": "projects/shell/src/environments/environment.ts",
29+
"with": "projects/shell/src/environments/environment.demo.ts"
30+
}
31+
]
32+
},
2433
"development": {
2534
"target": "shell:esbuild:development",
2635
"dev": true

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
"build:all": "concurrently \"npm run build:shell\" \"npm run build:first-mf\" \"npm run build:template-editor\"",
1818
"serve:all": "concurrently \"npm run serve:shell\" \"npm run serve:first-mf\" \"npm run serve:template-editor\"",
1919

20-
"build:all:gh-pages": "concurrently \"ng build shell --base-href /mfe-angular/shell/\" \"ng build first-mf --base-href /mfe-angular/first-mf/\" \"cd projects/template-editor && vite build --mode gh-pages\""
20+
"build:all:demo": "concurrently \"ng build shell --base-href /mfe-angular/shell/\" \"ng build first-mf --base-href /mfe-angular/first-mf/\" \"cd projects/template-editor && vite build --mode demo\""
2121
},
2222
"private": true,
2323
"dependencies": {
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
export const environment = {
2+
production: false,
3+
vueRemoteEntry: '/mfe-angular/template-editor/assets/remoteEntry.js',
4+
};

projects/template-editor/vite.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ const __dirname = path.dirname(__filename)
1111

1212
// https://vite.dev/config/
1313
export default defineConfig(({ mode }) => ({
14-
base: mode === 'gh-pages' ? '/mfe-angular/template-editor/' : '/',
14+
base: mode === 'demo' ? '/mfe-angular/template-editor/' : '/',
1515
plugins: [
1616
vue(),
1717
vueDevTools(),

0 commit comments

Comments
 (0)