Skip to content

Tree shaking completely broken?   #2867

Closed
Closed
 @vladshcherbin

Description

 @vladshcherbin

updated with the latest versions (29.06.2017)
Webpack - 3.0.0
Babel-preset-env - 1.5.2
Node - 8.1.2
OS X - 10.12.5

Current

Tree shaking is not removing imports, not used in the app.

Expected

Tree shaking, removing not used imports.


The test case is a simple app with React & React Router v4. Link component is not used, but the whole router package is bundled.

 import  React  from  'react'
 import  ReactDOM  from  'react-dom'
 import  {  Link  }  from  'react-router-dom'

 ReactDOM . render (
   < p > Hey </ p > ,
   document . getElementById ( 'app' )
 )

Webpack & Rollup test repo

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions