Skip to content

Commit

Permalink
fix(vite-plugin-angular): use babel to make transform results compati… (
Browse files Browse the repository at this point in the history
#231)

Closes #202
  • Loading branch information
goetzrobin authored Jan 30, 2023
1 parent b4b0999 commit c70e5dc
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions packages/vite-plugin-angular/src/lib/angular-vite-plugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ export interface PluginOptions {
*/
tsTransformers?: ts.CustomTransformers;
};
supportedBrowsers?: string[];
}

interface EmitFileResult {
Expand Down Expand Up @@ -63,6 +64,7 @@ export function angular(options?: PluginOptions): Plugin[] {
options?.advanced?.tsTransformers?.afterDeclarations ?? [],
},
},
supportedBrowsers: options?.supportedBrowsers ?? ['iOS <=15'],
};

// The file emitter created during `onStart` that will be used during the build in `onLoad` callbacks for TS files
Expand Down Expand Up @@ -273,6 +275,7 @@ export function angular(options?: PluginOptions): Plugin[] {
[
angularApplicationPreset,
{
supportedBrowsers: pluginOptions.supportedBrowsers,
forceAsyncTransformation,
optimize: isProd && {},
},
Expand Down

0 comments on commit c70e5dc

Please sign in to comment.