fusion-cli
fusion-cli copied to clipboard
JSON tree shaking is not supported
Type of issue
bug
Description
Add import {version} from '../package.json' to get version from package.json and use it, but whole package.json is included in js bundle. Same code without fusion only version is imported and tree shaking works well.
Current behavior
Whole json file is included in js bundle.
Expected behavior
Only imported property should be imported.
Steps to reproduce
- Add
import {version} from '../package.json'to your code and use it. -
yarn build-productionthe whole json file is included in js bundle.
Your environment
-
fusion-cli version: 1.9.1
-
Node.js version (
node --version): 8.11.3 -
npm version (
npm --version): 5.6.0 -
Operating System: Mac
I think this is technically a breaking change. This will be supported in the next major fusion-cli version.
See: https://github.com/fusionjs/fusion-cli/pull/509