You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, first off I want to thank you for all the incredible and rapid development that's happened on esbuild.
I've been trying to make esbuild work for us with Jest, and have run into an issue with CSS and Sass. We currently process these imports with a PostCSS plugin in our builds. We don't need the actual resulting CSS for our tests, but all the existing transforms end up failing to build files that import PostCSS/SCSS because of non-CSS syntax.
I see you've decided not to add an empty loader in #180 because no-op-ing on an import can be done through plugins. However, Jest doesn't support anything asynchronous in transforms and plugins only work in async builds, so there's a gap we can't work around.
Using esbuild had such a huge effect on our test suite's speed, I'd love to make it work. In light of this use case (needing to bypass an import in synchronous builds and synchronous builds being required for Jest transforms) would you be open to reconsidering PR #180 and adding an empty/no-op loader to allow users to bypass certain kinds of imports in certain builds? The specific thing we want to do is to no-op Sass since it's not relevant to Jest tests (and would otherwise need a plugin).
Thanks for your time!
The text was updated successfully, but these errors were encountered:
Hi, first off I want to thank you for all the incredible and rapid development that's happened on esbuild.
I've been trying to make esbuild work for us with Jest, and have run into an issue with CSS and Sass. We currently process these imports with a PostCSS plugin in our builds. We don't need the actual resulting CSS for our tests, but all the existing transforms end up failing to build files that import PostCSS/SCSS because of non-CSS syntax.
I see you've decided not to add an empty loader in #180 because no-op-ing on an import can be done through plugins. However, Jest doesn't support anything asynchronous in transforms and plugins only work in async builds, so there's a gap we can't work around.
Using esbuild had such a huge effect on our test suite's speed, I'd love to make it work. In light of this use case (needing to bypass an import in synchronous builds and synchronous builds being required for Jest transforms) would you be open to reconsidering PR #180 and adding an empty/no-op loader to allow users to bypass certain kinds of imports in certain builds? The specific thing we want to do is to no-op Sass since it's not relevant to Jest tests (and would otherwise need a plugin).
Thanks for your time!
The text was updated successfully, but these errors were encountered: