Skip to content

Commit

Permalink
fix: 1384 (#1386)
Browse files Browse the repository at this point in the history
  • Loading branch information
wre232114 authored Jun 13, 2024
1 parent 9db02e4 commit 4df945c
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 3 deletions.
5 changes: 5 additions & 0 deletions .changeset/three-vans-buy.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@farmfe/core": patch
---

fix: #1384
2 changes: 1 addition & 1 deletion .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ jobs:
- name: Test Create Farm React
run: cd .. && pnpm create farm my-test-app-react --template react && cd my-test-app-react && pnpm i && pnpm build
- name: Test Create Farm Vue
run: cd .. && pnpm create farm my-test-app-vue --template vue && cd my-test-app-vue && pnpm i && pnpm build
run: cd .. && pnpm create farm my-test-app-vue --template vue3 && cd my-test-app-vue && pnpm i && pnpm build
- name: Test Create Farm Solid
run: cd .. && pnpm create farm my-test-app-solid --template solid && cd my-test-app-solid && pnpm i && pnpm build

Expand Down
7 changes: 5 additions & 2 deletions crates/plugin_tree_shake/src/tree_shake_modules.rs
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,11 @@ pub fn tree_shake_modules(

for dep_id in module_graph.dependencies_ids(&tree_shake_module_id) {
// avoid cyclic dependencies
if visited_modules.contains(&dep_id) {
continue;
let dep_tree_shake_module = tree_shake_modules_map.get(&dep_id);
if let Some(dep_tree_shake_module) = dep_tree_shake_module {
if matches!(dep_tree_shake_module.handled_used_exports, UsedExports::All) {
continue;
}
}

set_dep_used_export_all(&dep_id, tree_shake_modules_map);
Expand Down
2 changes: 2 additions & 0 deletions examples/vite-adapter-vue/src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ import test1 from './components/test1.vue';
import test from './components/test.vue';
import home from './pages/index.vue';
import aboute from '../deps/node_modules/my-ui/index.vue'
import './test';
</script>

<style lang="scss" scoped>
Expand Down
3 changes: 3 additions & 0 deletions examples/vite-adapter-vue/src/test.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@

var _vue = require("vue");
console.log("@cc _vue",_vue)

0 comments on commit 4df945c

Please sign in to comment.