Skip to content

Commit

Permalink
remove all plugins
Browse files Browse the repository at this point in the history
  • Loading branch information
asanehisa committed May 14, 2024
1 parent 6c26fc5 commit d091db5
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 9 deletions.
7 changes: 2 additions & 5 deletions packages/pages/src/util/viteConfig.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,8 @@ export const scopedViteConfigPath = (scope?: string) => {
};

export const removePluginFromViteConfig = (config: any) => {
if (config?.plugins?.[0]) {
config.plugins = config.plugins?.[0]?.filter(
(obj: any) =>
obj.name !== "vite:react-refresh" || obj.name !== "vite:react-babel"
);
if (config?.plugins) {
config.plugins = "";
}
return config;
};
3 changes: 1 addition & 2 deletions packages/pages/src/vite-plugin/modules/plugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -146,8 +146,7 @@ export const buildModules = async (
await build(
mergeConfig(
removePluginFromViteConfig(viteConfig.default),
moduleBuildConfig,
false
moduleBuildConfig
)
);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -99,8 +99,7 @@ export const buildServerlessFunctions = async (
await build(
mergeConfig(
removePluginFromViteConfig(viteConfig.default),
serverlessFunctionBuildConfig,
false
serverlessFunctionBuildConfig
)
);
}
Expand Down

0 comments on commit d091db5

Please sign in to comment.