Breaks watch mode on error when preprocess dependency transformation fails
See original GitHub issueDescribe the bug
If preprocess fails execution of a dependency (eg: an external scss
file imported within a <style>
tag).
The onLoad
returning watchFiles
are lost and editing the external scss
does not trigger the rebuild.
To Reproduce Steps to reproduce the behavior:
- Create a
.svelte
file with a<style lang="scss">
with an external import@import "./external-file.scss";
with valid syntax. - Start watch mode.
- Edit
external-file.scss
with some invalid syntax. - Rebuild is triggered and fails.
- Edit
external-file.scss
with valid syntax. - Rebuild is not triggered.
Expected behavior A clear and concise description of what you expected to happen.
Screenshots If applicable, add screenshots to help explain your problem.
Environment (please complete the following information):
- esbuild-svelte version:
0.7.0
- esbuild version:
0.14.42
- Svelte preprocessors used (if any):
SCSS
Issue Analytics
- State:
- Created a year ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
jest/CHANGELOG.md at main · facebook/jest - GitHub
Pressing a , o , p , q or enter while tests are running in the watch mode, the test run will be...
Read more >The mesh file exporter could not resolve cyclic dependencies ...
Any ideas on how to fix this error "The mesh file exporter could not resolve cyclic dependencies in overlapping contact regions.
Read more >API - esbuild
There are two main API calls in esbuild's API: transform and build. ... Use watch mode to re-run esbuild when a file is...
Read more >The C Preprocessor - Math
The C preprocessor is a macro processor that is used automatically by the C compiler to transform your program before actual compilation.
Read more >Makoto's preprocessing pipeline - SCCN
2.1.1 Failure to generate eeg_options.m (06/15/2021 updated) ... 17.5 Dependency across the preprocessing stages (07/05/2019 updated); 17.6 SIFT tips.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I have created a PR ( #132 ). Let me know what you think! Thanks
Checking the code I thought in a solution to keep the previous build
watchFiles
based on the “invalidated”cachedFile.dependencies
. Due topreprocess
nature we can’t get the resolved dependencies bysvelte-preprocess
.Another caveat I found is that if the external scss file has invalid syntax from the start, esbuild watch fails and exit the process, but I don’t figure it out how to fix that.
Let me know if you like this solution and I can try to implement it.
Thanks!