Skip to content

Commit

Permalink
fix(vite-plugin-angular): allow passing options to analogSFC esbuild …
Browse files Browse the repository at this point in the history
…plugin (#1085)
  • Loading branch information
joshuamorony committed May 7, 2024
1 parent 2b4acd1 commit 5177d91
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions packages/vite-plugin-angular/esbuild.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,18 @@
import analog from '@analogjs/vite-plugin-angular';
import type * as esbuild from 'esbuild';
import { PluginOptions } from './src';

export const analogSFC: () => esbuild.Plugin = () => ({
export const analogSFC: (options?: PluginOptions) => esbuild.Plugin = (
options
) => ({
name: 'analog-sfc-esbuild-plugin',
async setup(build) {
const analogPlugins: any = analog({
experimental: { supportAnalogFormat: true },
...(options || {}),
experimental: {
supportAnalogFormat: true,
...(options?.experimental || {}),
},
});

const analogPlugin = analogPlugins[0];
Expand Down

0 comments on commit 5177d91

Please sign in to comment.