Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tree shaking does not work with Angular #2685

Closed
yuriy-bezrukov opened this issue Feb 26, 2019 · 1 comment
Closed

Tree shaking does not work with Angular #2685

yuriy-bezrukov opened this issue Feb 26, 2019 · 1 comment

Comments

@yuriy-bezrukov
Copy link

I'm trying to build an ng7 application

Repository to play

npm run buildMin

Without tree, shaking works correctly.

 cross-env NODE_ENV=production parcel build src/index.html --experimental-scope-hoisting

×  ..\node_modules\@angular\cdk\esm5\scrolling.es5.js does not export '$Idnv$import$ScrollDispatcher'
    at replaceExportNode (C:\Users\bezrukov\Documents\tfs\Dev\Scada.Web\Spa\node_modules\parcel\src\scope-hoisting\concat.js:54:13)
    at ReferencedIdentifier (C:\Users\bezrukov\Documents\tfs\Dev\Scada.Web\Spa\node_modules\parcel\src\scope-hoisting\concat.js:317:20)
    at newFn (C:\Users\bezrukov\Documents\tfs\Dev\Scada.Web\Spa\node_modules\@babel\traverse\lib\visitors.js:230:17)
    at NodePath._call (C:\Users\bezrukov\Documents\tfs\Dev\Scada.Web\Spa\node_modules\@babel\traverse\lib\path\context.js:53:20)
    at NodePath.call (C:\Users\bezrukov\Documents\tfs\Dev\Scada.Web\Spa\node_modules\@babel\traverse\lib\path\context.js:40:17)
    at NodePath.visit (C:\Users\bezrukov\Documents\tfs\Dev\Scada.Web\Spa\node_modules\@babel\traverse\lib\path\context.js:88:12)
    at TraversalContext.visitQueue (C:\Users\bezrukov\Documents\tfs\Dev\Scada.Web\Spa\node_modules\@babel\traverse\lib\context.js:118:16)
    at TraversalContext.visitSingle (C:\Users\bezrukov\Documents\tfs\Dev\Scada.Web\Spa\node_modules\@babel\traverse\lib\context.js:90:19)
    at TraversalContext.visit (C:\Users\bezrukov\Documents\tfs\Dev\Scada.Web\Spa\node_modules\@babel\traverse\lib\context.js:146:19)
    at Function.traverse.node (C:\Users\bezrukov\Documents\tfs\Dev\Scada.Web\Spa\node_modules\@babel\traverse\lib\index.js:94:17)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! webModule@0.0.1 buildMin: `cross-env NODE_ENV=production parcel build src/index.html --experimental-scope-hoisting`
npm ERR! Exit status 1
@mischnic
Copy link
Member

Will be fixed in the next release by #2491

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

No branches or pull requests

3 participants