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

npm package doesn't contain esm module for browser #173

Closed
a-gerescher opened this issue Nov 14, 2019 · 2 comments
Closed

npm package doesn't contain esm module for browser #173

a-gerescher opened this issue Nov 14, 2019 · 2 comments

Comments

@a-gerescher
Copy link

a-gerescher commented Nov 14, 2019

I am building an angular component for liquidjs. Therefore i want to include your lib, in the browser (no fs namespace available) and want to be able to treeshake with a bundler. Conditional imports are problematic in this case.

./node_modules/liquidjs/dist/liquid.esm.js 411:19-40 Critical dependency: the request of a dependency is an expression
Module not found: Error: Can't resolve 'fs' in '/node_modules/liquidjs/dist'
Module not found: Error: Can't resolve 'path' in '/node_modules/liquidjs/dist'
@a-gerescher a-gerescher changed the title npm package doesn't contain source npm package doesn't contain esm module for browser Nov 14, 2019
@harttle
Copy link
Owner

harttle commented Nov 15, 2019

Now liquid.esm.js is targeted to browsers so there could be a degradation if someone is using liquid.esm.js on Node.js. But I believe the esm version is only useful for bundles, which is in most case targeting browsers, hope it makes sense.

harttle pushed a commit that referenced this issue Nov 15, 2019
## [9.4.1](v9.4.0...v9.4.1) (2019-11-15)

### Bug Fixes

* remove node dependencies for esm bundle, see [#173](#173) ([04df929](04df929))
@a-gerescher
Copy link
Author

Thank you so much! :-)

@harttle harttle closed this as completed Nov 18, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants