Skip to content

Commit

Permalink
chore: update code
Browse files Browse the repository at this point in the history
  • Loading branch information
ErKeLost committed Feb 17, 2025
1 parent fa154c8 commit 3015ce9
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 4 deletions.
1 change: 0 additions & 1 deletion crates/compiler/src/update/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,6 @@ impl Compiler {
self.diff_and_patch_context(paths, &update_context);
// record graph patch result
self.set_module_group_graph_stats();

freeze_module_of_affected_module_graph(&updated_module_ids, &diff_result, &self.context)?;

// update cache
Expand Down
16 changes: 14 additions & 2 deletions examples/refactor-react/farm.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,20 @@ export default defineConfig({
about: path.resolve(__dirname, 'about.html'),
},
progress: false,
output: {
publicPath: "/aaa/",
persistentCache: false,
sourcemap: false,
// output: {
// publicPath: "/aaa/",
// filename: '[ext]/[name]-[hash].[ext]',
// assetsFilename: 'assets/[name]-[hash].[ext]',
// },
partialBundling: {
groups: [
{
name: "vendor-react",
test: ["node_modules/"],
},
],
},
},
});
2 changes: 1 addition & 1 deletion examples/refactor-react/src/main.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export function Main() {
<div>
<a href="https://farmfe.org/" target="_blank">
<img src={FarmLogo} className="logo" alt="Farm logo" />
</a>我企鹅请问请问请问
</a>
<a href="https://react.dev" target="_blank">
<img src={reactLogo} className="logo react" alt="React logo" />
</a>
Expand Down
1 change: 1 addition & 0 deletions packages/core/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ export async function build(
await hook?.(compiler);
}

// TODO move to rust
if (output?.clean) {
compiler.removeOutputPathDir();
}
Expand Down
1 change: 1 addition & 0 deletions packages/core/src/plugin/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ export async function resolveVitePlugins(
mode: CompilationMode
) {
const plugins = config?.vitePlugins?.filter(Boolean) ?? [];

if (!plugins.length) return [];

return handleVitePlugins(plugins, config, mode);
Expand Down

0 comments on commit 3015ce9

Please sign in to comment.