Releases: farm-fe/farm
Releases · farm-fe/farm
v1.4.0: Version Packages (#1943)
* Version Packages * chore: do not bump major version for js plugins --------- Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: brightwu <1521488775@qq.com>
create-farm-plugin@0.1.17
@farmfe/js-plugin-vue@3.10.0
Patch Changes
- Updated dependencies [7d86847]
- @farmfe/core@1.4.0
@farmfe/js-plugin-visualizer@1.1.3
Patch Changes
- 7d86847: Move client dependencies to devDependencies to avoid unnecessary dependencies
@farmfe/js-plugin-svgr@1.7.0
Patch Changes
- Updated dependencies [7d86847]
- @farmfe/core@1.4.0
@farmfe/js-plugin-solid@2.9.0
Patch Changes
- Updated dependencies [7d86847]
- @farmfe/core@1.4.0
@farmfe/js-plugin-sass@2.10.0
Patch Changes
- Updated dependencies [7d86847]
- @farmfe/core@1.4.0
@farmfe/js-plugin-postcss@1.9.0
Patch Changes
- Updated dependencies [7d86847]
- @farmfe/core@1.4.0
@farmfe/js-plugin-less@1.10.0
Patch Changes
- Updated dependencies [7d86847]
- @farmfe/core@1.4.0
@farmfe/core@1.4.0
Minor Changes
-
7d86847: Support tree shake
import * as ns from './xxx'
../xxx
can be tree-shaken if following rules are met:ns
is used as member prop, example:ns.a
ns
is used as member literal computed, example:ns['a']
For example:
// b.ts export const a = 1; export const b = 2; // a.ts import * as ns from "./b"; console.log(ns.a); console.log(ns["a"]);
After tree shaking, the result will be:
// b.ts export const a = 1; // a is preserved and b is removed. // a.ts import * as ns from "./b"; console.log(ns.a); console.log(ns["a"]);
But if
ns
is met rules above, then all the fields will be preserved, example:// b.ts export const a = 1; export const b = 2; // a.ts import * as ns from "./b"; console.log(ns);
After tree shaking, the result will be:
// b.ts export const a = 1; // both a and b are preserved export const b = 2; // a.ts import * as ns from "./b"; console.log(ns.a); console.log(ns["a"]);