-
Notifications
You must be signed in to change notification settings - Fork 23
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
Treeshaking bug: Import module without export #1083
Comments
You shouldn’t import this file if you are using tree-shaking. Just import {stashConverters} from “can” |
There's probably still a bug here worth looking into though. |
But I won't be doing anything with 'stashConverters'.. |
@Kleppo do this: import { stache, stacheConverters } from 'can';
stache.addConverter(stacheConverters); |
Ah thx, good idea! :-) |
I think I've encountered this as well. My workaround was to, in the context of this example, add to "dependencies": {
---snip---
"can-stache-converters": "*",
---snip---
} I think this tells steal to include that module, so it doesn't get thrown away during tree shake, but I'm not really sure. The "can-connect": "*",
"can-event-dom-enter": "*",
"can-stache-route-helpers": "*", Is this actually a solution? Is there a negative to doing this? |
When I for examle do this:
import 'can/es/can-stache-converters';
It doesn't work when I build it with tree shaking enabled.
When I disable tree shaking, it does work.
I think it can't handle module imports without explicit named imports
The text was updated successfully, but these errors were encountered: