@analogjs/vite-plugin-angular 0.2.0-beta.9 → 0.2.0-rc.1
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.
- package/migrations/migration.json +4 -0
- package/package.json +1 -1
- package/src/lib/angular-build-optimizer-plugin.d.ts +2 -1
- package/src/lib/angular-build-optimizer-plugin.js +8 -7
- package/src/lib/angular-build-optimizer-plugin.js.map +1 -1
- package/src/lib/angular-vite-plugin.d.ts +2 -1
- package/src/lib/angular-vite-plugin.js +49 -37
- package/src/lib/angular-vite-plugin.js.map +1 -1
- package/src/lib/compiler-plugin.d.ts +1 -1
- package/src/lib/compiler-plugin.js +5 -234
- package/src/lib/compiler-plugin.js.map +1 -1
- package/src/lib/component-resolvers.d.ts +8 -2
- package/src/lib/component-resolvers.js +64 -20
- package/src/lib/component-resolvers.js.map +1 -1
- package/src/lib/utils/devkit.d.ts +8 -0
- package/src/lib/utils/devkit.js +16 -0
- package/src/lib/utils/devkit.js.map +1 -0
package/package.json
CHANGED
|
@@ -2,11 +2,9 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.buildOptimizerPlugin = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
|
-
const webpack_loader_1 = require("@angular-devkit/build-angular/src/babel/webpack-loader");
|
|
6
|
-
const load_esm_1 = require("@angular-devkit/build-angular/src/utils/load-esm");
|
|
7
5
|
const core_1 = require("@babel/core");
|
|
8
|
-
const
|
|
9
|
-
function buildOptimizerPlugin({ isProd }) {
|
|
6
|
+
const devkit_1 = require("./utils/devkit");
|
|
7
|
+
function buildOptimizerPlugin({ isProd, supportedBrowsers, }) {
|
|
10
8
|
return {
|
|
11
9
|
name: '@analogjs/vite-plugin-angular-optimizer',
|
|
12
10
|
apply: 'build',
|
|
@@ -33,6 +31,8 @@ function buildOptimizerPlugin({ isProd }) {
|
|
|
33
31
|
// NOTE: If esbuild adds support in the future, the babel support for these can be disabled.
|
|
34
32
|
'async-generator': false,
|
|
35
33
|
'for-await': false,
|
|
34
|
+
'class-field': false,
|
|
35
|
+
'class-static-field': false,
|
|
36
36
|
},
|
|
37
37
|
},
|
|
38
38
|
};
|
|
@@ -41,10 +41,10 @@ function buildOptimizerPlugin({ isProd }) {
|
|
|
41
41
|
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
42
42
|
if (/\.[cm]?js$/.test(id)) {
|
|
43
43
|
const angularPackage = /[\\/]node_modules[\\/]@angular[\\/]/.test(id);
|
|
44
|
-
const linkerPluginCreator = (yield (0,
|
|
44
|
+
const linkerPluginCreator = (yield (0, devkit_1.loadEsmModule)('@angular/compiler-cli/linker/babel')).createEs2015LinkerPlugin;
|
|
45
45
|
const forceAsyncTransformation = !/[\\/][_f]?esm2015[\\/]/.test(id) &&
|
|
46
46
|
/for\s+await\s*\(|async\s+function\s*\*/.test(code);
|
|
47
|
-
const shouldLink = yield (0,
|
|
47
|
+
const shouldLink = yield (0, devkit_1.requiresLinking)(id, code);
|
|
48
48
|
const useInputSourcemap = (!isProd ? undefined : false);
|
|
49
49
|
if (!forceAsyncTransformation && !isProd && !shouldLink) {
|
|
50
50
|
return {
|
|
@@ -64,7 +64,7 @@ function buildOptimizerPlugin({ isProd }) {
|
|
|
64
64
|
plugins: [],
|
|
65
65
|
presets: [
|
|
66
66
|
[
|
|
67
|
-
|
|
67
|
+
devkit_1.angularApplicationPreset,
|
|
68
68
|
{
|
|
69
69
|
angularLinker: {
|
|
70
70
|
shouldLink,
|
|
@@ -72,6 +72,7 @@ function buildOptimizerPlugin({ isProd }) {
|
|
|
72
72
|
linkerPluginCreator,
|
|
73
73
|
},
|
|
74
74
|
forceAsyncTransformation,
|
|
75
|
+
supportedBrowsers,
|
|
75
76
|
optimize: isProd && {
|
|
76
77
|
looseEnums: angularPackage,
|
|
77
78
|
pureTopLevel: angularPackage,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"angular-build-optimizer-plugin.js","sourceRoot":"","sources":["../../../../../packages/vite-plugin-angular/src/lib/angular-build-optimizer-plugin.ts"],"names":[],"mappings":";;;;AACA,
|
|
1
|
+
{"version":3,"file":"angular-build-optimizer-plugin.js","sourceRoot":"","sources":["../../../../../packages/vite-plugin-angular/src/lib/angular-build-optimizer-plugin.ts"],"names":[],"mappings":";;;;AACA,sCAA6C;AAC7C,2CAIwB;AAExB,SAAgB,oBAAoB,CAAC,EACnC,MAAM,EACN,iBAAiB,GAIlB;IACC,OAAO;QACL,IAAI,EAAE,yCAAyC;QAC/C,KAAK,EAAE,OAAO;QACd,MAAM;YACJ,OAAO;gBACL,OAAO,EAAE;oBACP,aAAa,EAAE,MAAM;oBACrB,SAAS,EAAE,KAAK;oBAChB,MAAM,EAAE,MAAM;wBACZ,CAAC,CAAC;4BACE,SAAS,EAAE,OAAO;4BAClB,SAAS,EAAE,OAAO;4BAClB,iBAAiB,EAAE,OAAO;yBAC3B;wBACH,CAAC,CAAC,SAAS;oBACb,SAAS,EAAE;wBACT,sFAAsF;wBACtF,gEAAgE;wBAChE,aAAa,EAAE,KAAK;wBACpB,2FAA2F;wBAC3F,4FAA4F;wBAC5F,uFAAuF;wBACvF,iEAAiE;wBACjE,4FAA4F;wBAC5F,iBAAiB,EAAE,KAAK;wBACxB,WAAW,EAAE,KAAK;wBAClB,aAAa,EAAE,KAAK;wBACpB,oBAAoB,EAAE,KAAK;qBAC5B;iBACF;aACF,CAAC;QACJ,CAAC;QACK,SAAS,CAAC,IAAI,EAAE,EAAE;;gBACtB,IAAI,YAAY,CAAC,IAAI,CAAC,EAAE,CAAC,EAAE;oBACzB,MAAM,cAAc,GAAG,qCAAqC,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;oBAEtE,MAAM,mBAAmB,GAAG,CAC1B,MAAM,IAAA,sBAAa,EAEjB,oCAAoC,CAAC,CACxC,CAAC,wBAAwB,CAAC;oBAE3B,MAAM,wBAAwB,GAC5B,CAAC,wBAAwB,CAAC,IAAI,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U;qBACxB,CAAC;iBACH;gBAED,OAAO;YACT,CAAC;SAAA;KACF,CAAC;AACJ,CAAC;AArGD,oDAqGC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import * as ts from 'typescript';
|
|
2
1
|
import { Plugin } from 'vite';
|
|
2
|
+
import * as ts from 'typescript';
|
|
3
3
|
export interface PluginOptions {
|
|
4
4
|
tsconfig?: string;
|
|
5
5
|
workspaceRoot?: string;
|
|
@@ -12,6 +12,7 @@ export interface PluginOptions {
|
|
|
12
12
|
tsTransformers?: ts.CustomTransformers;
|
|
13
13
|
};
|
|
14
14
|
supportedBrowsers?: string[];
|
|
15
|
+
transformFilter?: (code: string, id: string) => boolean;
|
|
15
16
|
}
|
|
16
17
|
interface EmitFileResult {
|
|
17
18
|
content?: string;
|
|
@@ -3,15 +3,14 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.createFileEmitter = exports.angular = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const core_1 = require("@babel/core");
|
|
6
|
-
const application_1 = require("@angular-devkit/build-angular/src/babel/presets/application");
|
|
7
6
|
const ts = require("typescript");
|
|
8
|
-
const
|
|
9
|
-
const jit_resource_transformer_1 = require("@angular-devkit/build-angular/src/builders/browser-esbuild/angular/jit-resource-transformer");
|
|
7
|
+
const path = require("path");
|
|
10
8
|
const compiler_plugin_1 = require("./compiler-plugin");
|
|
11
9
|
const component_resolvers_1 = require("./component-resolvers");
|
|
12
10
|
const host_1 = require("./host");
|
|
13
11
|
const angular_jit_plugin_1 = require("./angular-jit-plugin");
|
|
14
12
|
const angular_build_optimizer_plugin_1 = require("./angular-build-optimizer-plugin");
|
|
13
|
+
const devkit_1 = require("./utils/devkit");
|
|
15
14
|
/**
|
|
16
15
|
* TypeScript file extension regex
|
|
17
16
|
* Match .(c or m)ts, .ts extensions with an optional ? for query params
|
|
@@ -37,7 +36,7 @@ function angular(options) {
|
|
|
37
36
|
afterDeclarations: (_m = (_l = (_k = options === null || options === void 0 ? void 0 : options.advanced) === null || _k === void 0 ? void 0 : _k.tsTransformers) === null || _l === void 0 ? void 0 : _l.afterDeclarations) !== null && _m !== void 0 ? _m : [],
|
|
38
37
|
},
|
|
39
38
|
},
|
|
40
|
-
supportedBrowsers: (_o = options === null || options === void 0 ? void 0 : options.supportedBrowsers) !== null && _o !== void 0 ? _o : ['
|
|
39
|
+
supportedBrowsers: (_o = options === null || options === void 0 ? void 0 : options.supportedBrowsers) !== null && _o !== void 0 ? _o : ['safari 15'],
|
|
41
40
|
jit: options === null || options === void 0 ? void 0 : options.jit,
|
|
42
41
|
};
|
|
43
42
|
// The file emitter created during `onStart` that will be used during the build in `onLoad` callbacks for TS files
|
|
@@ -46,40 +45,36 @@ function angular(options) {
|
|
|
46
45
|
// Temporary deep import for transformer support
|
|
47
46
|
const { mergeTransformers, replaceBootstrap, } = require('@ngtools/webpack/src/ivy/transformation');
|
|
48
47
|
const { augmentProgramWithVersioning, augmentHostWithCaching, } = require('@ngtools/webpack/src/ivy/host');
|
|
49
|
-
const { SourceFileCache } = require('@ngtools/webpack/src/ivy/cache');
|
|
50
48
|
let compilerCli;
|
|
51
49
|
let rootNames;
|
|
52
50
|
let host;
|
|
53
51
|
let nextProgram;
|
|
54
52
|
let builderProgram;
|
|
55
53
|
let watchMode = false;
|
|
56
|
-
const sourceFileCache = new SourceFileCache();
|
|
54
|
+
const sourceFileCache = new devkit_1.SourceFileCache();
|
|
57
55
|
const isProd = process.env['NODE_ENV'] === 'production';
|
|
58
56
|
const isTest = process.env['NODE_ENV'] === 'test' || !!process.env['VITEST'];
|
|
59
57
|
const jit = typeof (pluginOptions === null || pluginOptions === void 0 ? void 0 : pluginOptions.jit) !== 'undefined' ? pluginOptions.jit : isTest;
|
|
60
58
|
let viteServer;
|
|
61
59
|
let cssPlugin;
|
|
62
60
|
let styleTransform;
|
|
61
|
+
const styleUrlsResolver = new component_resolvers_1.StyleUrlsResolver();
|
|
62
|
+
const templateUrlsResolver = new component_resolvers_1.TemplateUrlsResolver();
|
|
63
63
|
function angularPlugin() {
|
|
64
64
|
return {
|
|
65
65
|
name: '@analogjs/vite-plugin-angular',
|
|
66
66
|
config(config, { command }) {
|
|
67
|
+
var _a;
|
|
67
68
|
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
68
69
|
watchMode = command === 'serve';
|
|
69
|
-
|
|
70
|
+
pluginOptions.tsconfig =
|
|
71
|
+
(_a = options === null || options === void 0 ? void 0 : options.tsconfig) !== null && _a !== void 0 ? _a : path.resolve(config.root || '.', process.env['NODE_ENV'] === 'test'
|
|
72
|
+
? './tsconfig.spec.json'
|
|
73
|
+
: './tsconfig.app.json');
|
|
74
|
+
compilerCli = yield (0, devkit_1.loadEsmModule)('@angular/compiler-cli');
|
|
70
75
|
return {
|
|
71
76
|
optimizeDeps: {
|
|
72
|
-
include: [
|
|
73
|
-
'@angular/animations',
|
|
74
|
-
'@angular/common',
|
|
75
|
-
'@angular/common/http',
|
|
76
|
-
'@angular/core',
|
|
77
|
-
'@angular/platform-browser',
|
|
78
|
-
'@angular/platform-browser/animations',
|
|
79
|
-
'@angular/platform-browser-dynamic',
|
|
80
|
-
'rxjs/operators',
|
|
81
|
-
'rxjs',
|
|
82
|
-
],
|
|
77
|
+
include: ['rxjs/operators', 'rxjs'],
|
|
83
78
|
exclude: ['@angular/platform-server'],
|
|
84
79
|
esbuildOptions: {
|
|
85
80
|
plugins: [
|
|
@@ -119,8 +114,15 @@ function angular(options) {
|
|
|
119
114
|
},
|
|
120
115
|
handleHotUpdate(ctx) {
|
|
121
116
|
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
117
|
+
// The `handleHotUpdate` hook may be called before the `buildStart`,
|
|
118
|
+
// which sets the compilation. As a result, the `host` may not be available
|
|
119
|
+
// yet for use, leading to build errors such as "cannot read properties of undefined"
|
|
120
|
+
// (because `host` is undefined).
|
|
121
|
+
if (!host) {
|
|
122
|
+
return;
|
|
123
|
+
}
|
|
122
124
|
if (TS_EXT_REGEX.test(ctx.file)) {
|
|
123
|
-
sourceFileCache.invalidate(ctx.file.replace(/\?(.*)/, ''));
|
|
125
|
+
sourceFileCache.invalidate([ctx.file.replace(/\?(.*)/, '')]);
|
|
124
126
|
yield buildAndAnalyze();
|
|
125
127
|
}
|
|
126
128
|
if (/\.(html|htm|css|less|sass|scss)$/.test(ctx.file)) {
|
|
@@ -135,7 +137,7 @@ function angular(options) {
|
|
|
135
137
|
const mods = [];
|
|
136
138
|
ctx.modules.forEach((mod) => {
|
|
137
139
|
mod.importers.forEach((imp) => {
|
|
138
|
-
sourceFileCache.invalidate(imp.id);
|
|
140
|
+
sourceFileCache.invalidate([imp.id]);
|
|
139
141
|
ctx.server.moduleGraph.invalidateModule(imp);
|
|
140
142
|
mods.push(imp);
|
|
141
143
|
});
|
|
@@ -147,12 +149,20 @@ function angular(options) {
|
|
|
147
149
|
});
|
|
148
150
|
},
|
|
149
151
|
transform(code, id) {
|
|
150
|
-
var _a, _b;
|
|
152
|
+
var _a, _b, _c;
|
|
151
153
|
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
152
154
|
// Skip transforming node_modules
|
|
153
155
|
if (id.includes('node_modules')) {
|
|
154
156
|
return;
|
|
155
157
|
}
|
|
158
|
+
/**
|
|
159
|
+
* Check for options.transformFilter
|
|
160
|
+
*/
|
|
161
|
+
if (options === null || options === void 0 ? void 0 : options.transformFilter) {
|
|
162
|
+
if (!((_a = options === null || options === void 0 ? void 0 : options.transformFilter(code, id)) !== null && _a !== void 0 ? _a : true)) {
|
|
163
|
+
return;
|
|
164
|
+
}
|
|
165
|
+
}
|
|
156
166
|
/**
|
|
157
167
|
* Check for .ts extenstions for inline script files being
|
|
158
168
|
* transformed (Astro).
|
|
@@ -177,31 +187,30 @@ function angular(options) {
|
|
|
177
187
|
if (isTest) {
|
|
178
188
|
const tsMod = viteServer === null || viteServer === void 0 ? void 0 : viteServer.moduleGraph.getModuleById(id);
|
|
179
189
|
if (tsMod) {
|
|
180
|
-
sourceFileCache.invalidate(id);
|
|
190
|
+
sourceFileCache.invalidate([id]);
|
|
181
191
|
yield buildAndAnalyze();
|
|
182
192
|
}
|
|
183
193
|
}
|
|
184
194
|
let templateUrls = [];
|
|
185
195
|
let styleUrls = [];
|
|
186
196
|
if ((0, component_resolvers_1.hasTemplateUrl)(code)) {
|
|
187
|
-
templateUrls =
|
|
197
|
+
templateUrls = templateUrlsResolver.resolve(code, id);
|
|
188
198
|
}
|
|
189
199
|
if ((0, component_resolvers_1.hasStyleUrls)(code)) {
|
|
190
|
-
styleUrls =
|
|
200
|
+
styleUrls = styleUrlsResolver.resolve(code, id);
|
|
191
201
|
}
|
|
192
202
|
if (watchMode) {
|
|
193
|
-
templateUrls
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
});
|
|
203
|
+
for (const urlSet of [...templateUrls, ...styleUrls]) {
|
|
204
|
+
// `urlSet` is a string where a relative path is joined with an
|
|
205
|
+
// absolute path using the `|` symbol.
|
|
206
|
+
// For example: `./app.component.html|/home/projects/analog/src/app/app.component.html`.
|
|
207
|
+
const [, absoluteFileUrl] = urlSet.split('|');
|
|
208
|
+
this.addWatchFile(absoluteFileUrl);
|
|
209
|
+
}
|
|
201
210
|
}
|
|
202
211
|
const typescriptResult = yield fileEmitter(id);
|
|
203
212
|
// return fileEmitter
|
|
204
|
-
let data = (
|
|
213
|
+
let data = (_b = typescriptResult === null || typescriptResult === void 0 ? void 0 : typescriptResult.content) !== null && _b !== void 0 ? _b : '';
|
|
205
214
|
if (jit && data.includes('angular:jit:')) {
|
|
206
215
|
data = data.replace(/angular:jit:style:inline;/g, 'virtual:angular:jit:style:inline;');
|
|
207
216
|
templateUrls.forEach((templateUrlSet) => {
|
|
@@ -243,7 +252,7 @@ function angular(options) {
|
|
|
243
252
|
plugins: [],
|
|
244
253
|
presets: [
|
|
245
254
|
[
|
|
246
|
-
|
|
255
|
+
devkit_1.angularApplicationPreset,
|
|
247
256
|
{
|
|
248
257
|
supportedBrowsers: pluginOptions.supportedBrowsers,
|
|
249
258
|
forceAsyncTransformation,
|
|
@@ -253,7 +262,7 @@ function angular(options) {
|
|
|
253
262
|
],
|
|
254
263
|
});
|
|
255
264
|
return {
|
|
256
|
-
code: (
|
|
265
|
+
code: (_c = babelResult === null || babelResult === void 0 ? void 0 : babelResult.code) !== null && _c !== void 0 ? _c : '',
|
|
257
266
|
map: babelResult === null || babelResult === void 0 ? void 0 : babelResult.map,
|
|
258
267
|
};
|
|
259
268
|
}
|
|
@@ -268,7 +277,10 @@ function angular(options) {
|
|
|
268
277
|
(0, angular_jit_plugin_1.jitPlugin)({
|
|
269
278
|
inlineStylesExtension: pluginOptions.inlineStylesExtension,
|
|
270
279
|
})),
|
|
271
|
-
(0, angular_build_optimizer_plugin_1.buildOptimizerPlugin)({
|
|
280
|
+
(0, angular_build_optimizer_plugin_1.buildOptimizerPlugin)({
|
|
281
|
+
isProd,
|
|
282
|
+
supportedBrowsers: pluginOptions.supportedBrowsers,
|
|
283
|
+
}),
|
|
272
284
|
].filter(Boolean);
|
|
273
285
|
function setupCompilation() {
|
|
274
286
|
const { options: tsCompilerOptions, rootNames: rn } = compilerCli.readConfiguration(pluginOptions.tsconfig, {
|
|
@@ -338,7 +350,7 @@ function angular(options) {
|
|
|
338
350
|
...(jit
|
|
339
351
|
? [
|
|
340
352
|
compilerCli.constructorParametersDownlevelTransform(builder.getProgram()),
|
|
341
|
-
(0,
|
|
353
|
+
(0, devkit_1.createJitResourceTransformer)(getTypeChecker),
|
|
342
354
|
]
|
|
343
355
|
: []),
|
|
344
356
|
...pluginOptions.advanced.tsTransformers.before,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"angular-vite-plugin.js","sourceRoot":"","sources":["../../../../../packages/vite-plugin-angular/src/lib/angular-vite-plugin.ts"],"names":[],"mappings":";;;;AACA,sCAA6C;AAC7C,6FAAmG;AACnG,iCAA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OAAO,CAAC,IAAI,CACV,UAAU,EACV,CAAC,QAAQ,EAAE,IAAI,EAAE,EAAE;YACjB,IAAI,YAAY,CAAC,IAAI,CAAC,QAAQ,CAAC,EAAE;gBAC/B,OAAO,GAAG,IAAI,CAAC;aAChB;QACH,CAAC,EACD,SAAS,CAAC,uBAAuB,EACjC,SAAS,CAAC,sBAAsB,EAChC,YAAY,CACb,CAAC;QAEF,WAAW,aAAX,WAAW,uBAAX,WAAW,CAAG,UAAU,CAAC,CAAC;QAE1B,OAAO,EAAE,OAAO,EAAE,YAAY,EAAE,EAAE,EAAE,CAAC;IACvC,CAAC,CAAA,CAAC;AACJ,CAAC;AA5BD,8CA4BC"}
|
|
@@ -6,5 +6,5 @@
|
|
|
6
6
|
* found in the LICENSE file at https://angular.io/license
|
|
7
7
|
*/
|
|
8
8
|
import type { Plugin } from 'esbuild';
|
|
9
|
-
import { CompilerPluginOptions } from '
|
|
9
|
+
import { CompilerPluginOptions } from './utils/devkit';
|
|
10
10
|
export declare function createCompilerPlugin(pluginOptions: CompilerPluginOptions): Plugin;
|
|
@@ -9,253 +9,24 @@
|
|
|
9
9
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
10
|
exports.createCompilerPlugin = void 0;
|
|
11
11
|
const tslib_1 = require("tslib");
|
|
12
|
-
const
|
|
13
|
-
const node_os_1 = require("node:os");
|
|
14
|
-
const path = require("node:path");
|
|
15
|
-
const node_url_1 = require("node:url");
|
|
16
|
-
const ts = require("typescript");
|
|
17
|
-
const environment_options_1 = require("@angular-devkit/build-angular/src/utils/environment-options");
|
|
18
|
-
const aot_compilation_1 = require("@angular-devkit/build-angular/src/builders/browser-esbuild/angular/aot-compilation");
|
|
19
|
-
const jit_compilation_1 = require("@angular-devkit/build-angular/src/builders/browser-esbuild/angular/jit-compilation");
|
|
20
|
-
const javascript_transformer_1 = require("@angular-devkit/build-angular/src/builders/browser-esbuild/javascript-transformer");
|
|
21
|
-
/**
|
|
22
|
-
* Converts TypeScript Diagnostic related information into an esbuild compatible note object.
|
|
23
|
-
* Related information is a subset of a full TypeScript Diagnostic and also used for diagnostic
|
|
24
|
-
* notes associated with the main Diagnostic.
|
|
25
|
-
* @param info The TypeScript diagnostic relative information to convert.
|
|
26
|
-
* @returns An esbuild diagnostic message as a PartialMessage object
|
|
27
|
-
*/
|
|
28
|
-
function convertTypeScriptDiagnosticInfo(info, textPrefix) {
|
|
29
|
-
const newLine = (0, node_os_1.platform)() === 'win32' ? '\r\n' : '\n';
|
|
30
|
-
let text = ts.flattenDiagnosticMessageText(info.messageText, newLine);
|
|
31
|
-
if (textPrefix) {
|
|
32
|
-
text = textPrefix + text;
|
|
33
|
-
}
|
|
34
|
-
const note = { text };
|
|
35
|
-
if (info.file) {
|
|
36
|
-
note.location = {
|
|
37
|
-
file: info.file.fileName,
|
|
38
|
-
length: info.length,
|
|
39
|
-
};
|
|
40
|
-
// Calculate the line/column location and extract the full line text that has the diagnostic
|
|
41
|
-
if (info.start) {
|
|
42
|
-
const { line, character } = ts.getLineAndCharacterOfPosition(info.file, info.start);
|
|
43
|
-
note.location.line = line + 1;
|
|
44
|
-
note.location.column = character;
|
|
45
|
-
// The start position for the slice is the first character of the error line
|
|
46
|
-
const lineStartPosition = ts.getPositionOfLineAndCharacter(info.file, line, 0);
|
|
47
|
-
// The end position for the slice is the first character of the next line or the length of
|
|
48
|
-
// the entire file if the line is the last line of the file (getPositionOfLineAndCharacter
|
|
49
|
-
// will error if a nonexistent line is passed).
|
|
50
|
-
const { line: lastLineOfFile } = ts.getLineAndCharacterOfPosition(info.file, info.file.text.length - 1);
|
|
51
|
-
const lineEndPosition = line < lastLineOfFile
|
|
52
|
-
? ts.getPositionOfLineAndCharacter(info.file, line + 1, 0)
|
|
53
|
-
: info.file.text.length;
|
|
54
|
-
note.location.lineText = info.file.text
|
|
55
|
-
.slice(lineStartPosition, lineEndPosition)
|
|
56
|
-
.trimEnd();
|
|
57
|
-
}
|
|
58
|
-
}
|
|
59
|
-
return note;
|
|
60
|
-
}
|
|
61
|
-
/**
|
|
62
|
-
* Converts a TypeScript Diagnostic message into an esbuild compatible message object.
|
|
63
|
-
* @param diagnostic The TypeScript diagnostic to convert.
|
|
64
|
-
* @returns An esbuild diagnostic message as a PartialMessage object
|
|
65
|
-
*/
|
|
66
|
-
function convertTypeScriptDiagnostic(diagnostic) {
|
|
67
|
-
var _a;
|
|
68
|
-
let codePrefix = 'TS';
|
|
69
|
-
let code = `${diagnostic.code}`;
|
|
70
|
-
if (diagnostic.source === 'ngtsc') {
|
|
71
|
-
codePrefix = 'NG';
|
|
72
|
-
// Remove `-99` Angular prefix from diagnostic code
|
|
73
|
-
code = code.slice(3);
|
|
74
|
-
}
|
|
75
|
-
const message = Object.assign(Object.assign({}, convertTypeScriptDiagnosticInfo(diagnostic, `${codePrefix}${code}: `)), {
|
|
76
|
-
// Store original diagnostic for reference if needed downstream
|
|
77
|
-
detail: diagnostic });
|
|
78
|
-
if ((_a = diagnostic.relatedInformation) === null || _a === void 0 ? void 0 : _a.length) {
|
|
79
|
-
message.notes = diagnostic.relatedInformation.map((info) => convertTypeScriptDiagnosticInfo(info));
|
|
80
|
-
}
|
|
81
|
-
return message;
|
|
82
|
-
}
|
|
83
|
-
// eslint-disable-next-line max-lines-per-function
|
|
12
|
+
const devkit_1 = require("./utils/devkit");
|
|
84
13
|
function createCompilerPlugin(pluginOptions) {
|
|
85
|
-
let handleJs = false;
|
|
86
14
|
return {
|
|
87
|
-
name: 'angular-
|
|
88
|
-
// eslint-disable-next-line max-lines-per-function
|
|
15
|
+
name: 'analogjs-angular-esbuild-deps-optimizer-plugin',
|
|
89
16
|
setup(build) {
|
|
90
|
-
var _a;
|
|
91
|
-
var _b;
|
|
92
17
|
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
93
|
-
|
|
94
|
-
// Initialize a worker pool for JavaScript transformations
|
|
95
|
-
const javascriptTransformer = new javascript_transformer_1.JavaScriptTransformer(pluginOptions, environment_options_1.maxWorkers);
|
|
96
|
-
const { GLOBAL_DEFS_FOR_TERSER_WITH_AOT } = yield aot_compilation_1.AotCompilation.loadCompilerCli();
|
|
97
|
-
// Setup defines based on the values provided by the Angular compiler-cli
|
|
98
|
-
(_a = (_b = build.initialOptions).define) !== null && _a !== void 0 ? _a : (_b.define = {});
|
|
99
|
-
for (const [key, value] of Object.entries(GLOBAL_DEFS_FOR_TERSER_WITH_AOT)) {
|
|
100
|
-
if (key in build.initialOptions.define) {
|
|
101
|
-
// Skip keys that have been manually provided
|
|
102
|
-
continue;
|
|
103
|
-
}
|
|
104
|
-
if (key === 'ngDevMode') {
|
|
105
|
-
// ngDevMode is already set based on the builder's script optimization option
|
|
106
|
-
continue;
|
|
107
|
-
}
|
|
108
|
-
// esbuild requires values to be a string (actual strings need to be quoted).
|
|
109
|
-
// In this case, all provided values are booleans.
|
|
110
|
-
build.initialOptions.define[key] = value.toString();
|
|
111
|
-
}
|
|
112
|
-
// The file emitter created during `onStart` that will be used during the build in `onLoad` callbacks for TS files
|
|
113
|
-
let fileEmitter;
|
|
114
|
-
let compilation;
|
|
115
|
-
build.onStart(() => tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
116
|
-
var _c, _d, _e;
|
|
117
|
-
const result = {
|
|
118
|
-
warnings: setupWarnings,
|
|
119
|
-
};
|
|
120
|
-
// Create Angular compiler host options
|
|
121
|
-
const hostOptions = {
|
|
122
|
-
fileReplacements: pluginOptions.fileReplacements,
|
|
123
|
-
modifiedFiles: (_c = pluginOptions.sourceFileCache) === null || _c === void 0 ? void 0 : _c.modifiedFiles,
|
|
124
|
-
sourceFileCache: pluginOptions.sourceFileCache,
|
|
125
|
-
transformStylesheet() {
|
|
126
|
-
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
127
|
-
return null;
|
|
128
|
-
});
|
|
129
|
-
},
|
|
130
|
-
};
|
|
131
|
-
// Create new compilation if first build; otherwise, use existing for rebuilds
|
|
132
|
-
compilation !== null && compilation !== void 0 ? compilation : (compilation = (pluginOptions === null || pluginOptions === void 0 ? void 0 : pluginOptions.jit)
|
|
133
|
-
? new jit_compilation_1.JitCompilation()
|
|
134
|
-
: new aot_compilation_1.AotCompilation());
|
|
135
|
-
// Initialize the Angular compilation for the current build.
|
|
136
|
-
// In watch mode, previous build state will be reused.
|
|
137
|
-
const { affectedFiles, compilerOptions: { allowJs }, } = yield compilation.initialize(pluginOptions.tsconfig, hostOptions, (compilerOptions) => {
|
|
138
|
-
var _a;
|
|
139
|
-
if (compilerOptions.target === undefined ||
|
|
140
|
-
compilerOptions.target < ts.ScriptTarget.ES2022) {
|
|
141
|
-
// If 'useDefineForClassFields' is already defined in the users project leave the value as is.
|
|
142
|
-
// Otherwise fallback to false due to https://github.com/microsoft/TypeScript/issues/45995
|
|
143
|
-
// which breaks the deprecated `@Effects` NGRX decorator and potentially other existing code as well.
|
|
144
|
-
compilerOptions.target = ts.ScriptTarget.ES2022;
|
|
145
|
-
(_a = compilerOptions.useDefineForClassFields) !== null && _a !== void 0 ? _a : (compilerOptions.useDefineForClassFields = false);
|
|
146
|
-
(setupWarnings !== null && setupWarnings !== void 0 ? setupWarnings : (setupWarnings = [])).push({
|
|
147
|
-
text: 'TypeScript compiler options "target" and "useDefineForClassFields" are set to "ES2022" and ' +
|
|
148
|
-
'"false" respectively by the Angular CLI.',
|
|
149
|
-
location: { file: pluginOptions.tsconfig },
|
|
150
|
-
notes: [
|
|
151
|
-
{
|
|
152
|
-
text: 'To control ECMA version and features use the Browerslist configuration. ' +
|
|
153
|
-
'For more information, see https://angular.io/guide/build#configuring-browser-compatibility',
|
|
154
|
-
},
|
|
155
|
-
],
|
|
156
|
-
});
|
|
157
|
-
}
|
|
158
|
-
return Object.assign(Object.assign({}, compilerOptions), { noEmitOnError: false, inlineSources: pluginOptions.sourcemap, inlineSourceMap: pluginOptions.sourcemap, mapRoot: undefined, sourceRoot: undefined });
|
|
159
|
-
});
|
|
160
|
-
handleJs = allowJs;
|
|
161
|
-
// Clear affected files from the cache (if present)
|
|
162
|
-
if (pluginOptions.sourceFileCache) {
|
|
163
|
-
for (const affected of affectedFiles) {
|
|
164
|
-
pluginOptions.sourceFileCache.typeScriptFileCache.delete((0, node_url_1.pathToFileURL)(affected.fileName).href);
|
|
165
|
-
}
|
|
166
|
-
}
|
|
167
|
-
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
168
|
-
for (const diagnostic of compilation.collectDiagnostics()) {
|
|
169
|
-
const message = convertTypeScriptDiagnostic(diagnostic);
|
|
170
|
-
if (diagnostic.category === ts.DiagnosticCategory.Error) {
|
|
171
|
-
((_d = result.errors) !== null && _d !== void 0 ? _d : (result.errors = [])).push(message);
|
|
172
|
-
}
|
|
173
|
-
else {
|
|
174
|
-
((_e = result.warnings) !== null && _e !== void 0 ? _e : (result.warnings = [])).push(message);
|
|
175
|
-
}
|
|
176
|
-
}
|
|
177
|
-
fileEmitter = compilation.createFileEmitter();
|
|
178
|
-
// Reset the setup warnings so that they are only shown during the first build.
|
|
179
|
-
setupWarnings = undefined;
|
|
180
|
-
return result;
|
|
181
|
-
}));
|
|
182
|
-
build.onLoad({
|
|
183
|
-
filter: handleJs ? /\.[cm]?[jt]sx?$/ : /\.[cm]?tsx?$/,
|
|
184
|
-
}, (args) => tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
185
|
-
var _f, _g, _h, _j, _k;
|
|
186
|
-
assert.ok(fileEmitter, 'Invalid plugin execution order');
|
|
187
|
-
const request = (_g = (_f = pluginOptions.fileReplacements) === null || _f === void 0 ? void 0 : _f[args.path]) !== null && _g !== void 0 ? _g : args.path;
|
|
188
|
-
// only process dependencies
|
|
189
|
-
if (!request.includes('node_modules')) {
|
|
190
|
-
return undefined;
|
|
191
|
-
}
|
|
192
|
-
// The filename is currently used as a cache key. Since the cache is memory only,
|
|
193
|
-
// the options cannot change and do not need to be represented in the key. If the
|
|
194
|
-
// cache is later stored to disk, then the options that affect transform output
|
|
195
|
-
// would need to be added to the key as well as a check for any change of content.
|
|
196
|
-
let contents = (_h = pluginOptions.sourceFileCache) === null || _h === void 0 ? void 0 : _h.typeScriptFileCache.get((0, node_url_1.pathToFileURL)(request).href);
|
|
197
|
-
if (contents === undefined) {
|
|
198
|
-
const typescriptResult = yield fileEmitter(request);
|
|
199
|
-
if (!(typescriptResult === null || typescriptResult === void 0 ? void 0 : typescriptResult.content)) {
|
|
200
|
-
// No TS result indicates the file is not part of the TypeScript program.
|
|
201
|
-
// If allowJs is enabled and the file is JS then defer to the next load hook.
|
|
202
|
-
if (handleJs && /\.[cm]?js$/.test(request)) {
|
|
203
|
-
return undefined;
|
|
204
|
-
}
|
|
205
|
-
// Otherwise return an error
|
|
206
|
-
return {
|
|
207
|
-
errors: [
|
|
208
|
-
createMissingFileError(request, args.path, (_j = build.initialOptions.absWorkingDir) !== null && _j !== void 0 ? _j : ''),
|
|
209
|
-
],
|
|
210
|
-
};
|
|
211
|
-
}
|
|
212
|
-
contents = yield javascriptTransformer.transformData(request, typescriptResult.content, true /* skipLinker */);
|
|
213
|
-
(_k = pluginOptions.sourceFileCache) === null || _k === void 0 ? void 0 : _k.typeScriptFileCache.set((0, node_url_1.pathToFileURL)(request).href, contents);
|
|
214
|
-
}
|
|
215
|
-
return {
|
|
216
|
-
contents,
|
|
217
|
-
loader: 'js',
|
|
218
|
-
};
|
|
219
|
-
}));
|
|
18
|
+
const javascriptTransformer = new devkit_1.JavaScriptTransformer(pluginOptions, 1);
|
|
220
19
|
build.onLoad({ filter: /\.[cm]?js$/ }, (args) => tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
221
|
-
|
|
222
|
-
// only process dependencies
|
|
223
|
-
if (!args.path.includes('node_modules')) {
|
|
224
|
-
return undefined;
|
|
225
|
-
}
|
|
226
|
-
// The filename is currently used as a cache key. Since the cache is memory only,
|
|
227
|
-
// the options cannot change and do not need to be represented in the key. If the
|
|
228
|
-
// cache is later stored to disk, then the options that affect transform output
|
|
229
|
-
// would need to be added to the key as well as a check for any change of content.
|
|
230
|
-
let contents = (_l = pluginOptions.sourceFileCache) === null || _l === void 0 ? void 0 : _l.babelFileCache.get(args.path);
|
|
231
|
-
if (contents === undefined) {
|
|
232
|
-
contents = yield javascriptTransformer.transformFile(args.path);
|
|
233
|
-
(_m = pluginOptions.sourceFileCache) === null || _m === void 0 ? void 0 : _m.babelFileCache.set(args.path, contents);
|
|
234
|
-
}
|
|
20
|
+
const contents = yield javascriptTransformer.transformFile(args.path);
|
|
235
21
|
return {
|
|
236
22
|
contents,
|
|
237
23
|
loader: 'js',
|
|
238
24
|
};
|
|
239
25
|
}));
|
|
26
|
+
build.onEnd(() => javascriptTransformer.close());
|
|
240
27
|
});
|
|
241
28
|
},
|
|
242
29
|
};
|
|
243
30
|
}
|
|
244
31
|
exports.createCompilerPlugin = createCompilerPlugin;
|
|
245
|
-
function createMissingFileError(request, original, root) {
|
|
246
|
-
const error = {
|
|
247
|
-
text: `File '${path.relative(root, request)}' is missing from the TypeScript compilation.`,
|
|
248
|
-
notes: [
|
|
249
|
-
{
|
|
250
|
-
text: `Ensure the file is part of the TypeScript program via the 'files' or 'include' property.`,
|
|
251
|
-
},
|
|
252
|
-
],
|
|
253
|
-
};
|
|
254
|
-
if (request !== original) {
|
|
255
|
-
error.notes.push({
|
|
256
|
-
text: `File is requested from a file replacement of '${path.relative(root, original)}'.`,
|
|
257
|
-
});
|
|
258
|
-
}
|
|
259
|
-
return error;
|
|
260
|
-
}
|
|
261
32
|
//# sourceMappingURL=compiler-plugin.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"compiler-plugin.js","sourceRoot":"","sources":["../../../../../packages/vite-plugin-angular/src/lib/compiler-plugin.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;;
|
|
1
|
+
{"version":3,"file":"compiler-plugin.js","sourceRoot":"","sources":["../../../../../packages/vite-plugin-angular/src/lib/compiler-plugin.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;;AAIH,2CAA8E;AAE9E,SAAgB,oBAAoB,CAClC,aAAoC;IAEpC,OAAO;QACL,IAAI,EAAE,gDAAgD;QAChD,KAAK,CAAC,KAAkB;;gBAC5B,MAAM,qBAAqB,GAAG,IAAI,8BAAqB,CAAC,aAAa,EAAE,CAAC,CAAC,CAAC;gBAE1E,KAAK,CAAC,MAAM,CAAC,EAAE,MAAM,EAAE,YAAY,EAAE,EAAE,CAAO,IAAI,EAAE,EAAE;oBACpD,MAAM,QAAQ,GAAG,MAAM,qBAAqB,CAAC,aAAa,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;oBAEtE,OAAO;wBACL,QAAQ;wBACR,MAAM,EAAE,IAAI;qBACb,CAAC;gBACJ,CAAC,CAAA,CAAC,CAAC;gBAEH,KAAK,CAAC,KAAK,CAAC,GAAG,EAAE,CAAC,qBAAqB,CAAC,KAAK,EAAE,CAAC,CAAC;YACnD,CAAC;SAAA;KACF,CAAC;AACJ,CAAC;AApBD,oDAoBC"}
|
|
@@ -1,4 +1,10 @@
|
|
|
1
1
|
export declare function hasStyleUrls(code: string): boolean;
|
|
2
|
-
export declare
|
|
2
|
+
export declare class StyleUrlsResolver {
|
|
3
|
+
private readonly styleUrlsCache;
|
|
4
|
+
resolve(code: string, id: string): string[];
|
|
5
|
+
}
|
|
3
6
|
export declare function hasTemplateUrl(code: string): boolean;
|
|
4
|
-
export declare
|
|
7
|
+
export declare class TemplateUrlsResolver {
|
|
8
|
+
private readonly templateUrlsCache;
|
|
9
|
+
resolve(code: string, id: string): string[];
|
|
10
|
+
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.TemplateUrlsResolver = exports.hasTemplateUrl = exports.StyleUrlsResolver = exports.hasStyleUrls = void 0;
|
|
4
4
|
const path_1 = require("path");
|
|
5
5
|
const styleUrlsRE = /styleUrls\s*:\s*\[([^\[]*?)\]/;
|
|
6
6
|
const templateUrlRE = /templateUrl:\s*["'](.*?)["']/g;
|
|
@@ -8,33 +8,77 @@ function hasStyleUrls(code) {
|
|
|
8
8
|
return styleUrlsRE.test(code);
|
|
9
9
|
}
|
|
10
10
|
exports.hasStyleUrls = hasStyleUrls;
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
11
|
+
const EMPTY_ARRAY = [];
|
|
12
|
+
class StyleUrlsResolver {
|
|
13
|
+
constructor() {
|
|
14
|
+
// These resolvers may be called multiple times during the same
|
|
15
|
+
// compilation for the same files. Caching is required because these
|
|
16
|
+
// resolvers use synchronous system calls to the filesystem, which can
|
|
17
|
+
// degrade performance when running compilations for multiple files.
|
|
18
|
+
this.styleUrlsCache = new Map();
|
|
19
|
+
}
|
|
20
|
+
resolve(code, id) {
|
|
21
|
+
const styleUrlsExecArray = styleUrlsRE.exec(code);
|
|
22
|
+
if (styleUrlsExecArray === null) {
|
|
23
|
+
return EMPTY_ARRAY;
|
|
24
|
+
}
|
|
25
|
+
// Given the code is the following:
|
|
26
|
+
// @Component({
|
|
27
|
+
// styleUrls: [
|
|
28
|
+
// './app.component.scss'
|
|
29
|
+
// ]
|
|
30
|
+
// })
|
|
31
|
+
// The `matchedStyleUrls` would result in: `styleUrls: [\n './app.component.scss'\n ]`.
|
|
32
|
+
const [matchedStyleUrls] = styleUrlsExecArray;
|
|
33
|
+
const entry = this.styleUrlsCache.get(id);
|
|
34
|
+
// We're using `matchedStyleUrls` as a key because the code may be changing continuously,
|
|
35
|
+
// resulting in the resolver being called multiple times. While the code changes, the
|
|
36
|
+
// `styleUrls` may remain constant, which means we should always return the previously
|
|
37
|
+
// resolved style URLs.
|
|
38
|
+
if ((entry === null || entry === void 0 ? void 0 : entry.matchedStyleUrls) === matchedStyleUrls) {
|
|
39
|
+
return entry.styleUrls;
|
|
40
|
+
}
|
|
41
|
+
// The `styleUrls` property is an array, which means we may have a list of
|
|
42
|
+
// CSS files provided there. Let `matchedStyleUrls` be equal to the following:
|
|
43
|
+
// "styleUrls: [\n './app.component.scss',\n '../global.scss'\n ]"
|
|
44
|
+
const styleUrlPaths = matchedStyleUrls
|
|
45
|
+
.replace(/(styleUrls|\:|\s|\[|\]|"|')/g, '')
|
|
46
|
+
// The above replace will result in the following:
|
|
47
|
+
// "./app.component.scss,../global.scss"
|
|
48
|
+
.split(',');
|
|
49
|
+
const styleUrls = styleUrlPaths.map((styleUrlPath) => {
|
|
17
50
|
return `${styleUrlPath}|${(0, path_1.resolve)((0, path_1.dirname)(id), styleUrlPath)}`;
|
|
18
51
|
});
|
|
52
|
+
this.styleUrlsCache.set(matchedStyleUrls, { styleUrls, matchedStyleUrls });
|
|
53
|
+
return styleUrls;
|
|
19
54
|
}
|
|
20
|
-
return [];
|
|
21
55
|
}
|
|
22
|
-
exports.
|
|
56
|
+
exports.StyleUrlsResolver = StyleUrlsResolver;
|
|
23
57
|
function hasTemplateUrl(code) {
|
|
24
58
|
return code.includes('templateUrl:');
|
|
25
59
|
}
|
|
26
60
|
exports.hasTemplateUrl = hasTemplateUrl;
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
templateUrlPaths
|
|
35
|
-
}
|
|
61
|
+
class TemplateUrlsResolver {
|
|
62
|
+
constructor() {
|
|
63
|
+
this.templateUrlsCache = new Map();
|
|
64
|
+
}
|
|
65
|
+
resolve(code, id) {
|
|
66
|
+
const entry = this.templateUrlsCache.get(id);
|
|
67
|
+
if ((entry === null || entry === void 0 ? void 0 : entry.code) === code) {
|
|
68
|
+
return entry.templateUrlPaths;
|
|
69
|
+
}
|
|
70
|
+
const templateUrlGroup = Array.from(code.matchAll(templateUrlRE));
|
|
71
|
+
const templateUrlPaths = [];
|
|
72
|
+
if (Array.isArray(templateUrlGroup)) {
|
|
73
|
+
templateUrlGroup.forEach((trg) => {
|
|
74
|
+
const resolvedTemplatePath = trg[1].replace(/templateUrl|\s|'|"|\:|,/g, '');
|
|
75
|
+
const templateUrlPath = (0, path_1.resolve)((0, path_1.dirname)(id), resolvedTemplatePath);
|
|
76
|
+
templateUrlPaths.push(`${resolvedTemplatePath}|${templateUrlPath}`);
|
|
77
|
+
});
|
|
78
|
+
}
|
|
79
|
+
this.templateUrlsCache.set(id, { code, templateUrlPaths });
|
|
80
|
+
return templateUrlPaths;
|
|
36
81
|
}
|
|
37
|
-
return templateUrlPaths;
|
|
38
82
|
}
|
|
39
|
-
exports.
|
|
83
|
+
exports.TemplateUrlsResolver = TemplateUrlsResolver;
|
|
40
84
|
//# sourceMappingURL=component-resolvers.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"component-resolvers.js","sourceRoot":"","sources":["../../../../../packages/vite-plugin-angular/src/lib/component-resolvers.ts"],"names":[],"mappings":";;;AAAA,+BAAwC;AAExC,MAAM,WAAW,GAAG,+BAA+B,CAAC;AACpD,MAAM,aAAa,GAAG,+BAA+B,CAAC;AAEtD,SAAgB,YAAY,CAAC,IAAY;IACvC,OAAO,WAAW,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AAChC,CAAC;AAFD,oCAEC;
|
|
1
|
+
{"version":3,"file":"component-resolvers.js","sourceRoot":"","sources":["../../../../../packages/vite-plugin-angular/src/lib/component-resolvers.ts"],"names":[],"mappings":";;;AAAA,+BAAwC;AAExC,MAAM,WAAW,GAAG,+BAA+B,CAAC;AACpD,MAAM,aAAa,GAAG,+BAA+B,CAAC;AAEtD,SAAgB,YAAY,CAAC,IAAY;IACvC,OAAO,WAAW,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AAChC,CAAC;AAFD,oCAEC;AAOD,MAAM,WAAW,GAAU,EAAE,CAAC;AAE9B,MAAa,iBAAiB;IAA9B;QACE,+DAA+D;QAC/D,oEAAoE;QACpE,sEAAsE;QACtE,oEAAoE;QACnD,mBAAc,GAAG,IAAI,GAAG,EAA+B,CAAC;IA0C3E,CAAC;IAxCC,OAAO,C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;AAOD,MAAa,oBAAoB;IAAjC;QACmB,sBAAiB,GAAG,IAAI,GAAG,EAGzC,CAAC;IAyBN,CAAC;IAvBC,OAAO,CAAC,IAAY,EAAE,EAAU;QAC9B,MAAM,KAAK,GAAG,IAAI,CAAC,iBAAiB,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;QAC7C,IAAI,CAAA,KAAK,aAAL,KAAK,uBAAL,KAAK,CAAE,IAAI,MAAK,IAAI,EAAE;YACxB,OAAO,KAAK,CAAC,gBAAgB,CAAC;SAC/B;QAED,MAAM,gBAAgB,GAAG,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,aAAa,CAAC,CAAC,CAAC;QAClE,MAAM,gBAAgB,GAAa,EAAE,CAAC;QAEtC,IAAI,KAAK,CAAC,OAAO,CAAC,gBAAgB,CAAC,EAAE;YACnC,gBAAgB,CAAC,OAAO,CAAC,CAAC,GAAG,EAAE,EAAE;gBAC/B,MAAM,oBAAoB,GAAG,GAAG,CAAC,CAAC,CAAC,CAAC,OAAO,CACzC,0BAA0B,EAC1B,EAAE,CACH,CAAC;gBACF,MAAM,eAAe,GAAG,IAAA,cAAO,EAAC,IAAA,cAAO,EAAC,EAAE,CAAC,EAAE,oBAAoB,CAAC,CAAC;gBACnE,gBAAgB,CAAC,IAAI,CAAC,GAAG,oBAAoB,IAAI,eAAe,EAAE,CAAC,CAAC;YACtE,CAAC,CAAC,CAAC;SACJ;QAED,IAAI,CAAC,iBAAiB,CAAC,GAAG,CAAC,EAAE,EAAE,EAAE,IAAI,EAAE,gBAAgB,EAAE,CAAC,CAAC;QAC3D,OAAO,gBAAgB,CAAC;IAC1B,CAAC;CACF;AA7BD,oDA6BC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { requiresLinking } from '@angular-devkit/build-angular/src/tools/babel/webpack-loader';
|
|
2
|
+
import angularApplicationPreset from '@angular-devkit/build-angular/src/tools/babel/presets/application';
|
|
3
|
+
import { createJitResourceTransformer } from '@angular-devkit/build-angular/src/tools/esbuild/angular/jit-resource-transformer';
|
|
4
|
+
import { CompilerPluginOptions } from '@angular-devkit/build-angular/src/tools/esbuild/angular/compiler-plugin';
|
|
5
|
+
import { JavaScriptTransformer } from '@angular-devkit/build-angular/src/tools/esbuild/javascript-transformer';
|
|
6
|
+
import { SourceFileCache } from '@angular-devkit/build-angular/src/tools/esbuild/angular/compiler-plugin';
|
|
7
|
+
import { loadEsmModule } from '@angular-devkit/build-angular/src/utils/load-esm';
|
|
8
|
+
export { requiresLinking, loadEsmModule, angularApplicationPreset, createJitResourceTransformer, CompilerPluginOptions, JavaScriptTransformer, SourceFileCache, };
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SourceFileCache = exports.JavaScriptTransformer = exports.createJitResourceTransformer = exports.angularApplicationPreset = exports.loadEsmModule = exports.requiresLinking = void 0;
|
|
4
|
+
const webpack_loader_1 = require("@angular-devkit/build-angular/src/tools/babel/webpack-loader");
|
|
5
|
+
Object.defineProperty(exports, "requiresLinking", { enumerable: true, get: function () { return webpack_loader_1.requiresLinking; } });
|
|
6
|
+
const application_1 = require("@angular-devkit/build-angular/src/tools/babel/presets/application");
|
|
7
|
+
exports.angularApplicationPreset = application_1.default;
|
|
8
|
+
const jit_resource_transformer_1 = require("@angular-devkit/build-angular/src/tools/esbuild/angular/jit-resource-transformer");
|
|
9
|
+
Object.defineProperty(exports, "createJitResourceTransformer", { enumerable: true, get: function () { return jit_resource_transformer_1.createJitResourceTransformer; } });
|
|
10
|
+
const javascript_transformer_1 = require("@angular-devkit/build-angular/src/tools/esbuild/javascript-transformer");
|
|
11
|
+
Object.defineProperty(exports, "JavaScriptTransformer", { enumerable: true, get: function () { return javascript_transformer_1.JavaScriptTransformer; } });
|
|
12
|
+
const compiler_plugin_1 = require("@angular-devkit/build-angular/src/tools/esbuild/angular/compiler-plugin");
|
|
13
|
+
Object.defineProperty(exports, "SourceFileCache", { enumerable: true, get: function () { return compiler_plugin_1.SourceFileCache; } });
|
|
14
|
+
const load_esm_1 = require("@angular-devkit/build-angular/src/utils/load-esm");
|
|
15
|
+
Object.defineProperty(exports, "loadEsmModule", { enumerable: true, get: function () { return load_esm_1.loadEsmModule; } });
|
|
16
|
+
//# sourceMappingURL=devkit.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"devkit.js","sourceRoot":"","sources":["../../../../../../packages/vite-plugin-angular/src/lib/utils/devkit.ts"],"names":[],"mappings":";;;AAAA,iGAA+F;AAW7F,gGAXO,gCAAe,OAWP;AAVjB,mGAAyG;AAYvG,mCAZK,qBAAwB,CAYL;AAV1B,+HAAgI;AAW9H,6GAXO,uDAA4B,OAWP;AAT9B,mHAA+G;AAW7G,sGAXO,8CAAqB,OAWP;AAVvB,6GAA0G;AAWxG,gGAXO,iCAAe,OAWP;AATjB,+EAAiF;AAI/E,8FAJO,wBAAa,OAIP"}
|