Skip to content

Commit 9cc1edb

Browse files
chore: fix build issues and deps (#2904)
Co-authored-by: ScriptedAlchemy <[email protected]>
1 parent 68463cf commit 9cc1edb

File tree

9 files changed

+51
-7
lines changed

9 files changed

+51
-7
lines changed

apps/3000-home/cypress/e2e/app.cy.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ describe('3000-home/', () => {
1313
'/api/test',
1414
];
1515
urls.forEach((url) => {
16-
cy.request(url); // This makes a GET request, not a full page visit
16+
cy.request(url);
1717
});
1818
});
1919
});
@@ -22,6 +22,12 @@ describe('3000-home/', () => {
2222
it('should display welcome message', () => {
2323
getH1().contains('This is SPA combined');
2424
});
25+
it('Api endpoint works', () => {
26+
const urls = ['/api/test'];
27+
urls.forEach((url) => {
28+
cy.request(url); // This makes a GET request, not a full page visit
29+
});
30+
});
2531
});
2632

2733
describe('Image checks', () => {

apps/runtime-demo/3005-runtime-host/project.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,5 @@
131131
}
132132
}
133133
},
134-
"tags": [],
135-
"implicitDependencies": ["typescript"]
134+
"tags": []
136135
}

apps/runtime-demo/3005-runtime-host/webpack.config.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,9 @@ module.exports = composePlugins(withNx(), withReact(), (config, context) => {
7777
}),
7878
);
7979
config.optimization.runtimeChunk = false;
80+
if (!config.devServer) {
81+
config.devServer = {};
82+
}
8083
config.devServer.host = '127.0.0.1';
8184
config.plugins.forEach((p) => {
8285
if (p.constructor.name === 'ModuleFederationPlugin') {

apps/runtime-demo/3006-runtime-remote/project.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,12 @@
5151
"hmr": true,
5252
"port": 3006
5353
},
54+
"dependsOn": [
55+
{
56+
"target": "build",
57+
"dependencies": true
58+
}
59+
],
5460
"configurations": {
5561
"development": {
5662
"buildTarget": "3006-runtime-remote:build:development"
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
span {
2-
color: red;
2+
color: black;
33
}

apps/runtime-demo/3006-runtime-remote/webpack.config.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,9 @@ module.exports = composePlugins(
2323
config.watchOptions = {
2424
ignored: ['**/dist/**'],
2525
};
26+
if (!config.devServer) {
27+
config.devServer = {};
28+
}
2629
config.devServer.host = '127.0.0.1';
2730

2831
config.plugins.push(

apps/runtime-demo/3007-runtime-remote/project.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,12 @@
5151
"hmr": true,
5252
"port": 3007
5353
},
54+
"dependsOn": [
55+
{
56+
"target": "build",
57+
"dependencies": true
58+
}
59+
],
5460
"configurations": {
5561
"development": {
5662
"buildTarget": "3007-runtime-remote:build:development"

apps/runtime-demo/3007-runtime-remote/webpack.config.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,9 @@ module.exports = composePlugins(
5757
},
5858
}),
5959
);
60+
if (!config.devServer) {
61+
config.devServer = {};
62+
}
6063
config.devServer.host = '127.0.0.1';
6164
config.optimization.runtimeChunk = false;
6265
config.plugins.forEach((p) => {

apps/runtime-demo/3008-runtime-remote/project.json

Lines changed: 21 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,21 +9,39 @@
99
"options": {
1010
"command": "npm run build",
1111
"cwd": "apps/runtime-demo/3008-runtime-remote"
12-
}
12+
},
13+
"dependsOn": [
14+
{
15+
"target": "build",
16+
"dependencies": true
17+
}
18+
]
1319
},
1420
"serve": {
1521
"executor": "nx:run-commands",
1622
"options": {
1723
"command": "npm run dev",
1824
"cwd": "apps/runtime-demo/3008-runtime-remote"
19-
}
25+
},
26+
"dependsOn": [
27+
{
28+
"target": "build",
29+
"dependencies": true
30+
}
31+
]
2032
},
2133
"dev": {
2234
"executor": "nx:run-commands",
2335
"options": {
2436
"command": "npm run dev",
2537
"cwd": "apps/runtime-demo/3008-runtime-remote"
26-
}
38+
},
39+
"dependsOn": [
40+
{
41+
"target": "build",
42+
"dependencies": true
43+
}
44+
]
2745
}
2846
},
2947
"tags": []

0 commit comments

Comments
 (0)