piral-ng 1.5.0-beta.6776 → 1.5.0-beta.6779

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1 @@
1
+ import '@angular/compiler';
package/extend-webpack.js CHANGED
@@ -30,6 +30,7 @@ module.exports =
30
30
  esModule: false,
31
31
  },
32
32
  };
33
+ const jitMode = ngOptions.jitMode ?? true;
33
34
 
34
35
  function findRule(tester, changer) {
35
36
  config.module.rules.forEach((rule) => {
@@ -94,11 +95,29 @@ module.exports =
94
95
  },
95
96
  );
96
97
 
98
+ if (jitMode) {
99
+ // The job of this plugin is to make angular-core depend on angular-compiler - this way
100
+ // angular-compiler does not need to be loaded separately and angular-compiler is present
101
+ // *before* angular-core
102
+ // this is only required in jit mode - as otherwise everything should be pre-compiled
103
+ config.plugins.push({
104
+ apply(compiler) {
105
+ const { entry } = compiler.options;
106
+ const core = entry['angular-core'];
107
+
108
+ if (typeof core !== 'undefined') {
109
+ const compilerDependency = resolve(__dirname, 'core-dynamic.js');
110
+ core.import = [compilerDependency, ...core.import];
111
+ }
112
+ },
113
+ });
114
+ }
115
+
97
116
  config.plugins.push(
98
117
  new AngularWebpackPlugin({
99
118
  tsconfig: resolve(process.cwd(), 'tsconfig.json'),
100
- jitMode: true,
101
119
  ...ngOptions,
120
+ jitMode,
102
121
  compilerOptions: {
103
122
  ...compilerOptions,
104
123
  compilationMode: 'partial',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "piral-ng",
3
- "version": "1.5.0-beta.6776",
3
+ "version": "1.5.0-beta.6779",
4
4
  "description": "Plugin for integrating Angular components in Piral.",
5
5
  "keywords": [
6
6
  "piral",
@@ -30,6 +30,9 @@
30
30
  "./convert": {
31
31
  "import": "./convert.js"
32
32
  },
33
+ "./core-dynamic": {
34
+ "import": "./core-dynamic.js"
35
+ },
33
36
  "./extend-webpack": {
34
37
  "require": "./extend-webpack.js"
35
38
  },
@@ -54,6 +57,7 @@
54
57
  "common.js",
55
58
  "convert.d.ts",
56
59
  "convert.js",
60
+ "core-dynamic.js",
57
61
  "extend-webpack.js"
58
62
  ],
59
63
  "repository": {
@@ -83,9 +87,9 @@
83
87
  "@angular/platform-browser": "^16.0.0",
84
88
  "@angular/platform-browser-dynamic": "^16.0.0",
85
89
  "@angular/router": "^16.0.0",
86
- "piral-core": "1.5.0-beta.6776",
90
+ "piral-core": "1.5.0-beta.6779",
87
91
  "piral-ng-common": "^16.0.0",
88
92
  "rxjs": "^7.3.0"
89
93
  },
90
- "gitHead": "1aa7ec5f4c80aa1259d27017b16a752328eef0db"
94
+ "gitHead": "64c2501e4ace6c6c1353865d2c76805bd8bfb756"
91
95
  }