Skip to content

Commit

Permalink
Final fixes and improvements for 1.5
Browse files Browse the repository at this point in the history
  • Loading branch information
FlorianRappl committed Feb 23, 2024
1 parent 1aa7ec5 commit c1c2ba9
Show file tree
Hide file tree
Showing 5 changed files with 29 additions and 3 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,12 @@
- Fixed issue with monorepos using Rush (#667)
- Fixed issue with blocked port in case of full debug reload (#671)
- Fixed `@Inject` with multiple instances in `piral-ng` (#673)
- Fixed standalone pilets depending on `@angular/compiler`
- Removed legacy option in `piral-cli-webpack5` to support IE8
- Removed pilet-related options in debug settings when running `piral debug` (#670)
- Improved internal navigation Blazor pilets using `piral-blazor`
- Updated dependencies
- Updated `kras` to `v0.16` to fix some issues and remove `request`
- Updated `piral publish` command to work exclusively for emulator websites
- Added special entry point to emulator website when accessed online (#654)
- Added feed selection view for remote emulator website (#654)
Expand Down
1 change: 1 addition & 0 deletions src/converters/piral-ng/core-dynamic.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
import '@angular/compiler';
21 changes: 20 additions & 1 deletion src/converters/piral-ng/extend-webpack.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ module.exports =
esModule: false,
},
};
const jitMode = ngOptions.jitMode ?? true;

function findRule(tester, changer) {
config.module.rules.forEach((rule) => {
Expand Down Expand Up @@ -94,11 +95,29 @@ module.exports =
},
);

if (jitMode) {
// The job of this plugin is to make angular-core depend on angular-compiler - this way
// angular-compiler does not need to be loaded separately and angular-compiler is present
// *before* angular-core
// this is only required in jit mode - as otherwise everything should be pre-compiled
config.plugins.push({
apply(compiler) {
const { entry } = compiler.options;
const core = entry['angular-core'];

if (typeof core !== 'undefined') {
const compilerDependency = resolve(__dirname, 'core-dynamic.js');
core.import = [compilerDependency, ...core.import];
}
},
});
}

config.plugins.push(
new AngularWebpackPlugin({
tsconfig: resolve(process.cwd(), 'tsconfig.json'),
jitMode: true,
...ngOptions,
jitMode,
compilerOptions: {
...compilerOptions,
compilationMode: 'partial',
Expand Down
4 changes: 4 additions & 0 deletions src/converters/piral-ng/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,9 @@
"./convert": {
"import": "./convert.js"
},
"./core-dynamic": {
"import": "./core-dynamic.js"
},
"./extend-webpack": {
"require": "./extend-webpack.js"
},
Expand All @@ -54,6 +57,7 @@
"common.js",
"convert.d.ts",
"convert.js",
"core-dynamic.js",
"extend-webpack.js"
],
"repository": {
Expand Down
4 changes: 2 additions & 2 deletions src/tooling/piral-cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,8 @@
},
"dependencies": {
"css-conflict-inspector": "^0.2.1",
"dets": "^0.14.1",
"kras": "^0.15.5",
"dets": "^0.14.2",
"kras": "^0.16.0-pre.81",
"rimraf": "^3.0.0",
"typescript": "^5.0.0",
"yargs": "^15.0.0"
Expand Down

0 comments on commit c1c2ba9

Please sign in to comment.