@analogjs/vite-plugin-angular 0.1.1 → 0.2.0-alpha.2
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/package.json +1 -1
- package/src/lib/angular-vite-plugin.d.ts +5 -6
- package/src/lib/angular-vite-plugin.js +246 -152
- package/src/lib/angular-vite-plugin.js.map +1 -1
- package/src/lib/component-resolvers.d.ts +4 -0
- package/src/lib/component-resolvers.js +35 -0
- package/src/lib/component-resolvers.js.map +1 -0
package/package.json
CHANGED
|
@@ -1,6 +1,9 @@
|
|
|
1
|
-
import { BundleStylesheetOptions } from '@angular-devkit/build-angular/src/builders/browser-esbuild/stylesheets';
|
|
2
1
|
import * as ts from 'typescript';
|
|
3
2
|
import { Plugin } from 'vite';
|
|
3
|
+
interface PluginOptions {
|
|
4
|
+
tsconfig: string;
|
|
5
|
+
mode: string;
|
|
6
|
+
}
|
|
4
7
|
interface EmitFileResult {
|
|
5
8
|
content?: string;
|
|
6
9
|
map?: string;
|
|
@@ -8,10 +11,6 @@ interface EmitFileResult {
|
|
|
8
11
|
hash?: Uint8Array;
|
|
9
12
|
}
|
|
10
13
|
declare type FileEmitter = (file: string) => Promise<EmitFileResult | undefined>;
|
|
11
|
-
export declare function angular(pluginOptions?:
|
|
12
|
-
tsconfig: string;
|
|
13
|
-
sourcemap: boolean;
|
|
14
|
-
advancedOptimizations: boolean;
|
|
15
|
-
}, styleOptions?: BundleStylesheetOptions): Plugin;
|
|
14
|
+
export declare function angular(pluginOptions?: PluginOptions): Plugin[];
|
|
16
15
|
export declare function createFileEmitter(program: ts.BuilderProgram, transformers?: ts.CustomTransformers, onAfterEmit?: (sourceFile: ts.SourceFile) => void): FileEmitter;
|
|
17
16
|
export {};
|
|
@@ -3,182 +3,276 @@ 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 fs_1 = require("fs");
|
|
7
6
|
const application_1 = require("@angular-devkit/build-angular/src/babel/presets/application");
|
|
8
7
|
const webpack_loader_1 = require("@angular-devkit/build-angular/src/babel/webpack-loader");
|
|
9
8
|
const ts = require("typescript");
|
|
10
9
|
const compiler_plugin_1 = require("@angular-devkit/build-angular/src/builders/browser-esbuild/compiler-plugin");
|
|
11
10
|
const load_esm_1 = require("@angular-devkit/build-angular/src/utils/load-esm");
|
|
11
|
+
const component_resolvers_1 = require("./component-resolvers");
|
|
12
12
|
function angular(pluginOptions = {
|
|
13
13
|
tsconfig: './tsconfig.app.json',
|
|
14
|
-
|
|
15
|
-
advancedOptimizations: false,
|
|
16
|
-
}, styleOptions = {
|
|
17
|
-
optimization: false,
|
|
18
|
-
sourcemap: true,
|
|
14
|
+
mode: 'development',
|
|
19
15
|
}) {
|
|
20
16
|
// The file emitter created during `onStart` that will be used during the build in `onLoad` callbacks for TS files
|
|
21
17
|
let fileEmitter;
|
|
22
18
|
let compilerOptions = {};
|
|
23
19
|
// Temporary deep import for transformer support
|
|
24
20
|
const { mergeTransformers, replaceBootstrap, } = require('@ngtools/webpack/src/ivy/transformation');
|
|
25
|
-
const { augmentProgramWithVersioning, } = require('@ngtools/webpack/src/ivy/host');
|
|
21
|
+
const { augmentProgramWithVersioning, augmentHostWithCaching, } = require('@ngtools/webpack/src/ivy/host');
|
|
22
|
+
const { SourceFileCache } = require('@ngtools/webpack/src/ivy/cache');
|
|
26
23
|
let compilerCli;
|
|
27
24
|
let rootNames;
|
|
28
25
|
let host;
|
|
29
26
|
let nextProgram;
|
|
30
27
|
let builderProgram;
|
|
31
|
-
let
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
(0, compiler_plugin_1.createCompilerPlugin)({
|
|
42
|
-
tsconfig: pluginOptions.tsconfig,
|
|
43
|
-
sourcemap: pluginOptions.sourcemap,
|
|
44
|
-
advancedOptimizations: pluginOptions.advancedOptimizations,
|
|
45
|
-
}, {
|
|
46
|
-
sourcemap: styleOptions.sourcemap,
|
|
47
|
-
optimization: styleOptions.optimization,
|
|
48
|
-
}),
|
|
49
|
-
],
|
|
50
|
-
},
|
|
51
|
-
},
|
|
52
|
-
};
|
|
53
|
-
},
|
|
54
|
-
buildStart() {
|
|
55
|
-
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
56
|
-
compilerCli = yield (0, load_esm_1.loadEsmModule)('@angular/compiler-cli');
|
|
57
|
-
const { options: tsCompilerOptions, rootNames: rn } = compilerCli.readConfiguration(pluginOptions.tsconfig, {
|
|
58
|
-
enableIvy: true,
|
|
59
|
-
noEmitOnError: false,
|
|
60
|
-
suppressOutputPathCheck: true,
|
|
61
|
-
outDir: undefined,
|
|
62
|
-
inlineSources: pluginOptions.sourcemap,
|
|
63
|
-
inlineSourceMap: pluginOptions.sourcemap,
|
|
64
|
-
sourceMap: false,
|
|
65
|
-
mapRoot: undefined,
|
|
66
|
-
sourceRoot: undefined,
|
|
67
|
-
declaration: false,
|
|
68
|
-
declarationMap: false,
|
|
69
|
-
allowEmptyCodegenFiles: false,
|
|
70
|
-
annotationsAs: 'decorators',
|
|
71
|
-
enableResourceInlining: false,
|
|
72
|
-
});
|
|
73
|
-
rootNames = rn;
|
|
74
|
-
compilerOptions = tsCompilerOptions;
|
|
75
|
-
host = ts.createIncrementalCompilerHost(compilerOptions);
|
|
76
|
-
});
|
|
77
|
-
},
|
|
78
|
-
transform(code, id) {
|
|
79
|
-
var _a, _b, _c;
|
|
80
|
-
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
81
|
-
// Skip transforming rxjs
|
|
82
|
-
if (id.includes('rxjs')) {
|
|
83
|
-
return;
|
|
84
|
-
}
|
|
85
|
-
// Create the Angular specific program that contains the Angular compiler
|
|
86
|
-
const angularProgram = new compilerCli.NgtscProgram(rootNames, compilerOptions, host, nextProgram);
|
|
87
|
-
const angularCompiler = angularProgram.compiler;
|
|
88
|
-
const typeScriptProgram = angularProgram.getTsProgram();
|
|
89
|
-
augmentProgramWithVersioning(typeScriptProgram);
|
|
90
|
-
let builder;
|
|
91
|
-
if (mode === 'serve') {
|
|
92
|
-
builder = builderProgram =
|
|
93
|
-
ts.createEmitAndSemanticDiagnosticsBuilderProgram(typeScriptProgram, host, builderProgram);
|
|
94
|
-
nextProgram = angularProgram;
|
|
95
|
-
}
|
|
96
|
-
else {
|
|
97
|
-
// When not in watch mode, the startup cost of the incremental analysis can be avoided by
|
|
98
|
-
// using an abstract builder that only wraps a TypeScript program.
|
|
99
|
-
builder = ts.createAbstractBuilder(typeScriptProgram, host);
|
|
100
|
-
}
|
|
101
|
-
yield angularCompiler.analyzeAsync();
|
|
102
|
-
fileEmitter = createFileEmitter(builder, mergeTransformers(angularCompiler.prepareEmit().transformers, {
|
|
103
|
-
before: [
|
|
104
|
-
replaceBootstrap(() => builder.getProgram().getTypeChecker()),
|
|
105
|
-
],
|
|
106
|
-
}), () => []);
|
|
107
|
-
if (/\.[cm]?js$/.test(id) && id.includes('@angular')) {
|
|
108
|
-
const angularPackage = /[\\/]node_modules[\\/]@angular[\\/]/.test(id);
|
|
109
|
-
const linkerPluginCreator = (yield (0, load_esm_1.loadEsmModule)('@angular/compiler-cli/linker/babel')).createEs2015LinkerPlugin;
|
|
110
|
-
const data = yield fs_1.promises.readFile(id, 'utf-8');
|
|
111
|
-
const result = yield (0, core_1.transformAsync)(data, {
|
|
112
|
-
filename: id,
|
|
113
|
-
inputSourceMap: (pluginOptions.sourcemap
|
|
114
|
-
? undefined
|
|
115
|
-
: false),
|
|
116
|
-
sourceMaps: pluginOptions.sourcemap ? 'inline' : false,
|
|
117
|
-
compact: false,
|
|
118
|
-
configFile: false,
|
|
119
|
-
babelrc: false,
|
|
120
|
-
browserslistConfigFile: false,
|
|
121
|
-
plugins: [],
|
|
122
|
-
presets: [
|
|
123
|
-
[
|
|
124
|
-
application_1.default,
|
|
125
|
-
{
|
|
126
|
-
angularLinker: {
|
|
127
|
-
shouldLink: yield (0, webpack_loader_1.requiresLinking)(id, data),
|
|
128
|
-
jitMode: false,
|
|
129
|
-
linkerPluginCreator,
|
|
130
|
-
},
|
|
131
|
-
forceAsyncTransformation: !/[\\/][_f]?esm2015[\\/]/.test(id) && data.includes('async'),
|
|
132
|
-
optimize: pluginOptions.advancedOptimizations && {
|
|
133
|
-
looseEnums: angularPackage,
|
|
134
|
-
pureTopLevel: angularPackage,
|
|
135
|
-
},
|
|
136
|
-
},
|
|
137
|
-
],
|
|
138
|
-
],
|
|
139
|
-
});
|
|
28
|
+
let watchMode = false;
|
|
29
|
+
let sourceFileCache = new SourceFileCache();
|
|
30
|
+
let isProd = pluginOptions.mode === 'production';
|
|
31
|
+
return [
|
|
32
|
+
{
|
|
33
|
+
name: '@analogjs/vite-plugin-angular',
|
|
34
|
+
config(config, { command }) {
|
|
35
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
36
|
+
watchMode = command === 'serve';
|
|
37
|
+
compilerCli = yield (0, load_esm_1.loadEsmModule)('@angular/compiler-cli');
|
|
140
38
|
return {
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
configFile: false,
|
|
158
|
-
babelrc: false,
|
|
159
|
-
browserslistConfigFile: false,
|
|
160
|
-
plugins: [],
|
|
161
|
-
presets: [
|
|
162
|
-
[
|
|
163
|
-
application_1.default,
|
|
164
|
-
{
|
|
165
|
-
forceAsyncTransformation: data.includes('async'),
|
|
166
|
-
optimize: pluginOptions.advancedOptimizations && {},
|
|
39
|
+
optimizeDeps: {
|
|
40
|
+
esbuildOptions: {
|
|
41
|
+
plugins: [
|
|
42
|
+
(0, compiler_plugin_1.createCompilerPlugin)({
|
|
43
|
+
tsconfig: pluginOptions.tsconfig,
|
|
44
|
+
sourcemap: !isProd,
|
|
45
|
+
advancedOptimizations: isProd,
|
|
46
|
+
}, {
|
|
47
|
+
sourcemap: false,
|
|
48
|
+
optimization: isProd,
|
|
49
|
+
}),
|
|
50
|
+
],
|
|
51
|
+
define: {
|
|
52
|
+
ngDevMode: watchMode ? JSON.stringify({}) : 'false',
|
|
53
|
+
ngJitMode: 'false',
|
|
54
|
+
ngI18nClosureMode: 'false',
|
|
167
55
|
},
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
});
|
|
171
|
-
return {
|
|
172
|
-
code: (_c = babelResult === null || babelResult === void 0 ? void 0 : babelResult.code) !== null && _c !== void 0 ? _c : '',
|
|
173
|
-
map: babelResult === null || babelResult === void 0 ? void 0 : babelResult.map,
|
|
56
|
+
},
|
|
57
|
+
},
|
|
174
58
|
};
|
|
175
|
-
}
|
|
59
|
+
});
|
|
60
|
+
},
|
|
61
|
+
buildStart() {
|
|
62
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
63
|
+
const { options: tsCompilerOptions, rootNames: rn } = compilerCli.readConfiguration(pluginOptions.tsconfig, {
|
|
64
|
+
enableIvy: true,
|
|
65
|
+
noEmitOnError: false,
|
|
66
|
+
suppressOutputPathCheck: true,
|
|
67
|
+
outDir: undefined,
|
|
68
|
+
inlineSources: !isProd,
|
|
69
|
+
inlineSourceMap: !isProd,
|
|
70
|
+
sourceMap: false,
|
|
71
|
+
mapRoot: undefined,
|
|
72
|
+
sourceRoot: undefined,
|
|
73
|
+
declaration: false,
|
|
74
|
+
declarationMap: false,
|
|
75
|
+
allowEmptyCodegenFiles: false,
|
|
76
|
+
annotationsAs: 'decorators',
|
|
77
|
+
enableResourceInlining: false,
|
|
78
|
+
});
|
|
79
|
+
rootNames = rn;
|
|
80
|
+
compilerOptions = tsCompilerOptions;
|
|
81
|
+
host = ts.createIncrementalCompilerHost(compilerOptions);
|
|
82
|
+
// Setup source file caching and reuse cache from previous compilation if present
|
|
83
|
+
let cache = new SourceFileCache();
|
|
84
|
+
// Only store cache if in watch mode
|
|
85
|
+
if (watchMode) {
|
|
86
|
+
sourceFileCache = cache;
|
|
87
|
+
}
|
|
88
|
+
augmentHostWithCaching(host, cache);
|
|
89
|
+
yield buildAndAnalyze();
|
|
90
|
+
});
|
|
91
|
+
},
|
|
92
|
+
handleHotUpdate(ctx) {
|
|
93
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
94
|
+
if (/\.[cm]?tsx?$/.test(ctx.file)) {
|
|
95
|
+
sourceFileCache.invalidate(ctx.file);
|
|
96
|
+
yield buildAndAnalyze();
|
|
97
|
+
}
|
|
98
|
+
if (/\.(html|htm|css|less|sass|scss)$/.test(ctx.file)) {
|
|
99
|
+
/**
|
|
100
|
+
* Check to see if this was a direct request
|
|
101
|
+
* for an external resource (styles, html).
|
|
102
|
+
*/
|
|
103
|
+
const isDirect = ctx.modules.find((mod) => { var _a; return ctx.file === mod.file && ((_a = mod.id) === null || _a === void 0 ? void 0 : _a.includes('?direct')); });
|
|
104
|
+
if (isDirect) {
|
|
105
|
+
return ctx.modules;
|
|
106
|
+
}
|
|
107
|
+
let mods = [];
|
|
108
|
+
ctx.modules.forEach((mod) => {
|
|
109
|
+
mod.importers.forEach((imp) => {
|
|
110
|
+
sourceFileCache.invalidate(imp.id);
|
|
111
|
+
ctx.server.moduleGraph.invalidateModule(imp);
|
|
112
|
+
mods.push(imp);
|
|
113
|
+
});
|
|
114
|
+
});
|
|
115
|
+
yield buildAndAnalyze();
|
|
116
|
+
return mods;
|
|
117
|
+
}
|
|
118
|
+
return ctx.modules;
|
|
119
|
+
});
|
|
120
|
+
},
|
|
121
|
+
transform(code, id) {
|
|
122
|
+
var _a, _b;
|
|
123
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
124
|
+
// Skip transforming node_modules
|
|
125
|
+
if (id.includes('node_modules')) {
|
|
126
|
+
return;
|
|
127
|
+
}
|
|
128
|
+
if (/\.[cm]?tsx?$/.test(id)) {
|
|
129
|
+
if ((0, component_resolvers_1.hasTemplateUrl)(code)) {
|
|
130
|
+
const templateUrl = (0, component_resolvers_1.resolveTemplateUrl)(code, id);
|
|
131
|
+
if (templateUrl) {
|
|
132
|
+
this.addWatchFile(templateUrl);
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
if ((0, component_resolvers_1.hasStyleUrls)(code)) {
|
|
136
|
+
const styleUrls = (0, component_resolvers_1.resolveStyleUrls)(code, id);
|
|
137
|
+
styleUrls.forEach((styleUrl) => {
|
|
138
|
+
this.addWatchFile(styleUrl);
|
|
139
|
+
});
|
|
140
|
+
}
|
|
141
|
+
const typescriptResult = yield fileEmitter(id);
|
|
142
|
+
// return fileEmitter
|
|
143
|
+
const data = (_a = typescriptResult === null || typescriptResult === void 0 ? void 0 : typescriptResult.content) !== null && _a !== void 0 ? _a : '';
|
|
144
|
+
const babelResult = yield (0, core_1.transformAsync)(data, {
|
|
145
|
+
filename: id,
|
|
146
|
+
inputSourceMap: (!isProd ? undefined : false),
|
|
147
|
+
sourceMaps: !isProd ? 'inline' : false,
|
|
148
|
+
compact: false,
|
|
149
|
+
configFile: false,
|
|
150
|
+
babelrc: false,
|
|
151
|
+
browserslistConfigFile: false,
|
|
152
|
+
plugins: [],
|
|
153
|
+
presets: [
|
|
154
|
+
[
|
|
155
|
+
application_1.default,
|
|
156
|
+
{
|
|
157
|
+
forceAsyncTransformation: data.includes('async'),
|
|
158
|
+
optimize: isProd && {},
|
|
159
|
+
},
|
|
160
|
+
],
|
|
161
|
+
],
|
|
162
|
+
});
|
|
163
|
+
return {
|
|
164
|
+
code: (_b = babelResult === null || babelResult === void 0 ? void 0 : babelResult.code) !== null && _b !== void 0 ? _b : '',
|
|
165
|
+
map: babelResult === null || babelResult === void 0 ? void 0 : babelResult.map,
|
|
166
|
+
};
|
|
167
|
+
}
|
|
168
|
+
return undefined;
|
|
169
|
+
});
|
|
170
|
+
},
|
|
171
|
+
},
|
|
172
|
+
{
|
|
173
|
+
name: '@analogjs/vite-plugin-angular-optimizer',
|
|
174
|
+
apply: 'build',
|
|
175
|
+
config() {
|
|
176
176
|
return {
|
|
177
|
-
|
|
177
|
+
esbuild: {
|
|
178
|
+
minify: isProd,
|
|
179
|
+
minifyIdentifiers: true,
|
|
180
|
+
minifySyntax: true,
|
|
181
|
+
// NOTE: Disabling whitespace ensures unused pure annotations are kept
|
|
182
|
+
minifyWhitespace: false,
|
|
183
|
+
pure: ['forwardRef'],
|
|
184
|
+
legalComments: 'none',
|
|
185
|
+
// sourcefile: 'name',
|
|
186
|
+
sourcemap: !isProd,
|
|
187
|
+
define: {
|
|
188
|
+
ngDevMode: 'false',
|
|
189
|
+
ngJitMode: 'false',
|
|
190
|
+
ngI18nClosureMode: 'false',
|
|
191
|
+
},
|
|
192
|
+
// This option should always be disabled for browser builds as we don't rely on `.name`
|
|
193
|
+
// and causes deadcode to be retained which makes `NG_BUILD_MANGLE` unusable to investigate tree-shaking issues.
|
|
194
|
+
// We enable `keepNames` only for server builds as Domino relies on `.name`.
|
|
195
|
+
// Once we no longer rely on Domino for SSR we should be able to remove this.
|
|
196
|
+
keepNames: false,
|
|
197
|
+
target: 'es2020',
|
|
198
|
+
},
|
|
178
199
|
};
|
|
179
|
-
}
|
|
200
|
+
},
|
|
201
|
+
transform(code, id) {
|
|
202
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
203
|
+
if (/\.[cm]?js$/.test(id)) {
|
|
204
|
+
const angularPackage = /[\\/]node_modules[\\/]@angular[\\/]/.test(id);
|
|
205
|
+
const linkerPluginCreator = (yield (0, load_esm_1.loadEsmModule)('@angular/compiler-cli/linker/babel')).createEs2015LinkerPlugin;
|
|
206
|
+
const useInputSourcemap = !isProd;
|
|
207
|
+
const result = yield (0, core_1.transformAsync)(code, {
|
|
208
|
+
filename: id,
|
|
209
|
+
inputSourceMap: (useInputSourcemap
|
|
210
|
+
? undefined
|
|
211
|
+
: false),
|
|
212
|
+
sourceMaps: !isProd ? 'inline' : false,
|
|
213
|
+
compact: false,
|
|
214
|
+
configFile: false,
|
|
215
|
+
babelrc: false,
|
|
216
|
+
browserslistConfigFile: false,
|
|
217
|
+
plugins: [],
|
|
218
|
+
presets: [
|
|
219
|
+
[
|
|
220
|
+
application_1.default,
|
|
221
|
+
{
|
|
222
|
+
angularLinker: {
|
|
223
|
+
shouldLink: yield (0, webpack_loader_1.requiresLinking)(id, code),
|
|
224
|
+
jitMode: false,
|
|
225
|
+
linkerPluginCreator,
|
|
226
|
+
},
|
|
227
|
+
forceAsyncTransformation: !/[\\/][_f]?esm2015[\\/]/.test(id) &&
|
|
228
|
+
code.includes('async'),
|
|
229
|
+
optimize: isProd && {
|
|
230
|
+
looseEnums: angularPackage,
|
|
231
|
+
pureTopLevel: angularPackage,
|
|
232
|
+
},
|
|
233
|
+
},
|
|
234
|
+
],
|
|
235
|
+
],
|
|
236
|
+
});
|
|
237
|
+
return {
|
|
238
|
+
code: (result === null || result === void 0 ? void 0 : result.code) || '',
|
|
239
|
+
map: result === null || result === void 0 ? void 0 : result.map,
|
|
240
|
+
};
|
|
241
|
+
}
|
|
242
|
+
return;
|
|
243
|
+
});
|
|
244
|
+
},
|
|
180
245
|
},
|
|
181
|
-
|
|
246
|
+
];
|
|
247
|
+
/**
|
|
248
|
+
* Creates a new NgtscProgram to analyze/re-analyze
|
|
249
|
+
* the source files and create a file emitter.
|
|
250
|
+
* This is shared between an initial build and a hot update.
|
|
251
|
+
*/
|
|
252
|
+
function buildAndAnalyze() {
|
|
253
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
254
|
+
// Create the Angular specific program that contains the Angular compiler
|
|
255
|
+
const angularProgram = new compilerCli.NgtscProgram(rootNames, compilerOptions, host, nextProgram);
|
|
256
|
+
const angularCompiler = angularProgram.compiler;
|
|
257
|
+
const typeScriptProgram = angularProgram.getTsProgram();
|
|
258
|
+
augmentProgramWithVersioning(typeScriptProgram);
|
|
259
|
+
let builder;
|
|
260
|
+
if (watchMode) {
|
|
261
|
+
builder = builderProgram =
|
|
262
|
+
ts.createEmitAndSemanticDiagnosticsBuilderProgram(typeScriptProgram, host, builderProgram);
|
|
263
|
+
nextProgram = angularProgram;
|
|
264
|
+
}
|
|
265
|
+
else {
|
|
266
|
+
// When not in watch mode, the startup cost of the incremental analysis can be avoided by
|
|
267
|
+
// using an abstract builder that only wraps a TypeScript program.
|
|
268
|
+
builder = ts.createAbstractBuilder(typeScriptProgram, host);
|
|
269
|
+
}
|
|
270
|
+
yield angularCompiler.analyzeAsync();
|
|
271
|
+
fileEmitter = createFileEmitter(builder, mergeTransformers(angularCompiler.prepareEmit().transformers, {
|
|
272
|
+
before: [replaceBootstrap(() => builder.getProgram().getTypeChecker())],
|
|
273
|
+
}), () => []);
|
|
274
|
+
});
|
|
275
|
+
}
|
|
182
276
|
}
|
|
183
277
|
exports.angular = angular;
|
|
184
278
|
function createFileEmitter(program, transformers = {}, onAfterEmit) {
|
|
@@ -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,
|
|
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,2FAAyF;AAEzF,iCAAiC;AAGjC,gHAAkH;AAClH,+EAAiF;AACjF,+DAK+B;AAe/B,SAAgB,OAAO,CACrB,gBAA+B;IAC7B,QAAQ,EAAE,qBAAqB;IAC/B,IAAI,EAAE,aAAa;CACpB;IAED,kHAAkH;IAClH,IAAI,WAAoC,CAAC;IACzC,IAAI,eAAe,GAAG,EAAE,CAAC;IACzB,gDAAgD;IAChD,M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AAC,CAAC;aAC7D;YAED,MAAM,eAAe,CAAC,YAAY,EAAE,CAAC;YAErC,WAAW,GAAG,iBAAiB,CAC7B,OAAO,EACP,iBAAiB,CAAC,eAAe,CAAC,WAAW,EAAE,CAAC,YAAY,EAAE;gBAC5D,MAAM,EAAE,CAAC,gBAAgB,CAAC,GAAG,EAAE,CAAC,OAAO,CAAC,UAAU,EAAE,CAAC,cAAc,EAAE,CAAC,CAAC;aACxE,CAAC,EACF,GAAG,EAAE,CAAC,EAAE,CACT,CAAC;QACJ,CAAC;KAAA;AACH,CAAC;AA/TD,0BA+TC;AAED,SAAgB,iBAAiB,CAC/B,OAA0B,EAC1B,eAAsC,EAAE,EACxC,WAAiD;IAEjD,OAAO,CAAO,IAAY,EAAE,EAAE;QAC5B,MAAM,UAAU,GAAG,OAAO,CAAC,aAAa,CAAC,IAAI,CAAC,CAAC;QAC/C,IAAI,CAAC,UAAU,EAAE;YACf,OAAO,SAAS,CAAC;SAClB;QAED,IAAI,OAA2B,CAAC;QAChC,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"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export declare function hasStyleUrls(code: string): boolean;
|
|
2
|
+
export declare function resolveStyleUrls(code: string, id: string): string[];
|
|
3
|
+
export declare function hasTemplateUrl(code: string): boolean;
|
|
4
|
+
export declare function resolveTemplateUrl(code: string, id: string): string;
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.resolveTemplateUrl = exports.hasTemplateUrl = exports.resolveStyleUrls = exports.hasStyleUrls = void 0;
|
|
4
|
+
const path_1 = require("path");
|
|
5
|
+
const styleUrlsRE = /styleUrls\s*:\s*\[([^\[]*?)\]/;
|
|
6
|
+
const templateUrlRE = /\s*templateUrl\s*:\s*["|']*?["|'].*/;
|
|
7
|
+
function hasStyleUrls(code) {
|
|
8
|
+
return styleUrlsRE.test(code);
|
|
9
|
+
}
|
|
10
|
+
exports.hasStyleUrls = hasStyleUrls;
|
|
11
|
+
function resolveStyleUrls(code, id) {
|
|
12
|
+
const styleUrlsGroup = styleUrlsRE.exec(code);
|
|
13
|
+
if (Array.isArray(styleUrlsGroup) && styleUrlsGroup[0]) {
|
|
14
|
+
const styleUrls = styleUrlsGroup[0].replace(/(styleUrls|\:|\s|\[|\]|"|')/g, '');
|
|
15
|
+
const styleUrlPaths = (styleUrls === null || styleUrls === void 0 ? void 0 : styleUrls.split(',')) || [];
|
|
16
|
+
return styleUrlPaths.map(styleUrlPath => (0, path_1.resolve)((0, path_1.dirname)(id), styleUrlPath));
|
|
17
|
+
}
|
|
18
|
+
return [];
|
|
19
|
+
}
|
|
20
|
+
exports.resolveStyleUrls = resolveStyleUrls;
|
|
21
|
+
function hasTemplateUrl(code) {
|
|
22
|
+
return templateUrlRE.test(code);
|
|
23
|
+
}
|
|
24
|
+
exports.hasTemplateUrl = hasTemplateUrl;
|
|
25
|
+
function resolveTemplateUrl(code, id) {
|
|
26
|
+
const templateUrlGroup = templateUrlRE.exec(code);
|
|
27
|
+
let templateUrlPath = '';
|
|
28
|
+
if (Array.isArray(templateUrlGroup) && templateUrlGroup[0]) {
|
|
29
|
+
const resolvedTemplatePath = templateUrlGroup[0].replace(/templateUrl|\s|'|"|\:|,/g, '');
|
|
30
|
+
templateUrlPath = (0, path_1.resolve)((0, path_1.dirname)(id), resolvedTemplatePath);
|
|
31
|
+
}
|
|
32
|
+
return templateUrlPath;
|
|
33
|
+
}
|
|
34
|
+
exports.resolveTemplateUrl = resolveTemplateUrl;
|
|
35
|
+
//# sourceMappingURL=component-resolvers.js.map
|
|
@@ -0,0 +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,qCAAqC,CAAC;AAE5D,SAAgB,YAAY,CAAC,IAAY;IACvC,OAAO,WAAW,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AAChC,CAAC;AAFD,oCAEC;AAED,SAAgB,gBAAgB,CAAC,IAAY,EAAE,EAAU;IACvD,MAAM,cAAc,GAAG,WAAW,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAE9C,IAAI,KAAK,CAAC,OAAO,CAAC,cAAc,CAAC,IAAI,cAAc,CAAC,CAAC,CAAC,EAAE;QACtD,MAAM,SAAS,GAAG,cAAc,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,8BAA8B,EAAE,EAAE,CAAC,CAAC;QAChF,MAAM,aAAa,GAAG,CAAA,SAAS,aAAT,SAAS,uBAAT,SAAS,CAAE,KAAK,CAAC,GAAG,CAAC,KAAI,EAAE,CAAC;QAElD,OAAO,aAAa,CAAC,GAAG,CAAC,YAAY,CAAC,EAAE,CAAC,IAAA,cAAO,EAAC,IAAA,cAAO,EAAC,EAAE,CAAC,EAAE,YAAY,CAAC,CAAC,CAAC;KAC9E;IAED,OAAO,EAAE,CAAC;AACZ,CAAC;AAXD,4CAWC;AAED,SAAgB,cAAc,CAAC,IAAY;IACzC,OAAO,aAAa,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AAClC,CAAC;AAFD,wCAEC;AA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