dalcib / esbuild-plugin-flow Goto Github PK
View Code? Open in Web Editor NEWEsbuild plugin to strip types for Flow files
License: MIT License
Esbuild plugin to strip types for Flow files
License: MIT License
While attempting to bundle the sale-client
package, and setting the regex to match all .js
files, the plugin throws the following error:
/.../sale-client/src/plugins/FileManageService.js:3:27: ERROR: [plugin: flow] ENOENT: no such file or directory, open '/.../node_modules/sale-client/src/plugins/GetTimeService.js'
The culprit is that src/plugins/FileManageService.js
in this package has an import to ./getTimeService.js
so there's a casing mismatch and indeed, the file doesn't exist. However, esbuild handles this gracefully with no plugins.
This is a situation in which I think there should be a warning emitted, but no error, passing the build back to esbuild to do its thing.
Some .flow files are not annotated but needs transformation, like react-native. So it would be nice if we can add a { force: boolean }
!
Currently plugin always return loader 'js' for further processing, but some modules contains flowtype'd jsx code in '*.js' files...
Hey there. Thanks for this plugin.
Using a valid regex: /(\.js(?!on)(x)?)|(\.flow(\..+)?)$/
Esbuild throws the following error:
Build Error: Error: [flow] "onLoad" filter is not a valid Go regular expression: "(\\.js(?<!\\.json)(x)?)|(\\.flow(\\..+)?)$"
While this may not be a bug in the plugin, it's definitely not something I thought I'd run into. I'll report this to esbuild as well, but at the least I think it would be good for the docs to be updated.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.