Skip to content

v9.26.0 requires stream and no longer bundles for browser #396

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

Closed
bglw opened this issue Oct 1, 2021 · 3 comments
Closed

v9.26.0 requires stream and no longer bundles for browser #396

bglw opened this issue Oct 1, 2021 · 3 comments
Labels

Comments

@bglw
Copy link
Contributor

bglw commented Oct 1, 2021

As of 9.26.0 a require('stream') was introduced, which no longer bundles for the browser through esbuild without extra configuration.

See error:

 > node_modules/liquidjs/dist/liquid.browser.esm.js:1701:35: error: Could not resolve "stream" (use "platform: 'node'" when building for node)
    1701 │         this.stream = new (require('stream').PassThrough)();
         ╵                              

Introduced in the source here:

public stream = new (require('stream').PassThrough)()

It would be great if this could be remedied somehow — I have packages in the wild which have only a major pin on liquidjs, which will now be failing upon a fresh install

@harttle harttle added the bug label Oct 2, 2021
@harttle
Copy link
Owner

harttle commented Oct 2, 2021

I'll remove it from the ESM build, should be working then.

github-actions bot pushed a commit that referenced this issue Oct 3, 2021
# [9.27.0](v9.26.0...v9.27.0) (2021-10-03)

### Bug Fixes

* remove "stream" dependency in browser bundles, [#396](#396) ([3b5eb66](3b5eb66))
* renderToNodeStream() now emit 'error' event instead of throw ([afeef1d](afeef1d))

### Features

* add `layouts`, `partials` apart from `root`, [#395](#395) ([b9ae479](b9ae479))
* renderFileToNodeStream(filepath, scope) ([68c4cfc](68c4cfc))

### Performance Improvements

* make the most of streamed rendering ([aea3441](aea3441))
@harttle
Copy link
Owner

harttle commented Oct 3, 2021

Try 9.27, hope it works :)

@bglw
Copy link
Contributor Author

bglw commented Oct 4, 2021

It does, thanks! 🙂

@bglw bglw closed this as completed Oct 4, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants