diff --git a/packages/esbuild/src/index.ts b/packages/esbuild/src/index.ts index 27083a8..510f848 100644 --- a/packages/esbuild/src/index.ts +++ b/packages/esbuild/src/index.ts @@ -13,11 +13,11 @@ export const IconifyPlugin = (options: IconifyOptions): Plugin => { name: "esbuild-plugin-iconify", setup(build) { build.onResolve({ filter: new RegExp(`^${alias}$`) }, (args) => { - return { path: getIconsFilePath({ ...options, type: "esm" }) }; + return { path: getIconsFilePath({ type: "esm", ...options }) }; }); build.onStart(async () => { - await loadIcons({ ...options, type: "esm" }); + await loadIcons({ type: "esm", ...options }); }); }, }; diff --git a/packages/vite/src/index.ts b/packages/vite/src/index.ts index 84fe055..9d859b8 100644 --- a/packages/vite/src/index.ts +++ b/packages/vite/src/index.ts @@ -13,12 +13,12 @@ export const IconifyPlugin = (options: IconifyOptions): PluginOption[] => [ name: "vite-plugin-iconify", resolveId(source) { if (source === alias) - return getIconsFilePath({ ...options, type: "esm" }); + return getIconsFilePath({ type: "esm", ...options }); return null; }, async buildStart() { - await loadIcons({ ...options, type: "esm" }); + await loadIcons({ type: "esm", ...options }); }, }, ];