Skip to content
This repository has been archived by the owner on May 17, 2019. It is now read-only.

JSON tree shaking is not supported #504

Open
flyingsky opened this issue Sep 5, 2018 · 1 comment
Open

JSON tree shaking is not supported #504

flyingsky opened this issue Sep 5, 2018 · 1 comment

Comments

@flyingsky
Copy link

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

  1. Add import {version} from '../package.json' to your code and use it.
  2. yarn build-production the 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

@rtsao
Copy link
Member

rtsao commented Sep 12, 2018

I think this is technically a breaking change. This will be supported in the next major fusion-cli version.

See: #509

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants