We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents b29a8c1 + 484553c commit e164c64Copy full SHA for e164c64
packages/vite-plugin-angular/src/lib/router-plugin.ts
@@ -3,11 +3,14 @@ import { JavaScriptTransformer } from './utils/devkit.js';
3
export function routerPlugin() {
4
const javascriptTransformer = new JavaScriptTransformer({ jit: true }, 1);
5
6
+ /**
7
+ * Transforms Angular packages the didn't get picked up by Vite's pre-optimization.
8
+ */
9
return {
10
name: 'analogjs-router-optimization',
11
enforce: 'pre',
12
async transform(_code: string, id: string) {
- if (id.includes('analogjs-') && id.includes('.mjs')) {
13
+ if (id.includes('fesm') && id.includes('.mjs')) {
14
const path = id.split('?')[0];
15
const contents = await javascriptTransformer.transformFile(path);
16
0 commit comments