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

Index imports aren’t removed with tree-shaking #20

Open
elstgav opened this issue Jul 24, 2017 · 1 comment
Open

Index imports aren’t removed with tree-shaking #20

elstgav opened this issue Jul 24, 2017 · 1 comment
Labels
Projects

Comments

@elstgav
Copy link
Owner

elstgav commented Jul 24, 2017

I noticed that when I import a file like so:

import { Storage } from 'src/models'

and src/models/index.js looks like this:

export { default as App          } from './App'
export { default as Label        } from './Label'
export { default as ProjectBoard } from './ProjectBoard'
export { default as Session      } from './Session'
export { default as Storage      } from './Storage'
export { default as User         } from './User'

that App, Label, ProjectBoard, and the rest of them are imported as well in the generated code bundle. Tree shaking should get rid of them since they aren’t used, but I think webpack is getting confused by this index import pattern 😕

@elstgav elstgav added the bug label Jul 24, 2017
@elstgav elstgav changed the title Index imports aren’t remove with tree-shaking Index imports aren’t removed with tree-shaking Nov 23, 2017
@elstgav elstgav added this to Triage in Test Board Nov 25, 2017
Test Board automation moved this from Triage to Done Apr 19, 2020
@elstgav
Copy link
Owner Author

elstgav commented Apr 20, 2020

Still need to investigate this and confirm a solution.

@elstgav elstgav reopened this Apr 20, 2020
Test Board automation moved this from Done to To Do Apr 20, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
Test Board
  
To Do
Development

No branches or pull requests

1 participant