Comments (3)
Thanks @FND for the feedback and even more the guidance. I'll give it a try and have a look on how to add this to faucet-pipeline.
from faucet-pipeline-js.
Hey Dirk, thanks for providing some context here.
I assume your concern is primarily about JavaScript source maps? Since I don't use (am philosophically opposed to 👴 ) source maps myself, I never fully grokked how our implementation actually works in detail. So I'm not really sure what needs to be done to support stand-alone source maps, but I can (grudgingly 😉 ) try to provide some guidance for anyone interested in implementing this:
Support for source maps was introduced in 61f8576, and it looks like Rollup supports what you want. So I'm guessing it should be possible to extend our implementation by massaging faucet's sourcemaps
option - perhaps similar to the way compacting works: cce6245 (--sourcemaps
to activate, optional sourcemaps
configuration in bundle configuration for customization). HTH.
from faucet-pipeline-js.
FWIW, having encountered externalized source maps elsewhere recently, I've realized that it might be simpler than I'd expected: The actual source map's JSON data remains identical AFAICT, the respective file is referenced as //# sourceMappingURL=bundle.js.map
from within the bundle - so we'd just need to write the same data to a separate file (${bundle.filepath}.map
) and replace the Base64-encoded data URI with this reference.
Having said that, this might require a little bit of re-architecting:
faucet-pipeline-js/lib/bundle/bundler.js
Line 23 in 53f4f87
The
generateBundle
function there (intentionally) doesn't have access to assetManager.writeFile
, so we'd probably wanna extend the return value to { code, map, … }
to eventually (via BasicBundle
and Bundle
- yes, this is a little convoluted, because reasons) write a source-map file alongside the actual bundle:faucet-pipeline-js/lib/index.js
Line 43 in 53f4f87
from faucet-pipeline-js.
Related Issues (20)
- An in-range update of rollup is breaking the build 🚨 HOT 2
- An in-range update of rollup is breaking the build 🚨 HOT 2
- An in-range update of rollup is breaking the build 🚨 HOT 4
- An in-range update of eslint-config-fnd-jsx is breaking the build 🚨 HOT 1
- An in-range update of faucet-pipeline-core is breaking the build 🚨 HOT 1
- support for dead code elimination via __DEV__
- code splitting
- An in-range update of rollup-plugin-terser is breaking the build 🚨
- Allow exporting unused functions HOT 4
- An in-range update of rollup is breaking the build 🚨 HOT 2
- An in-range update of rollup-plugin-typescript2 is breaking the build 🚨 HOT 3
- An in-range update of rollup-plugin-terser is breaking the build 🚨 HOT 1
- An in-range update of rollup is breaking the build 🚨 HOT 3
- An in-range update of rollup-plugin-terser is breaking the build 🚨
- An in-range update of faucet-pipeline-core is breaking the build 🚨 HOT 1
- improve warning for unresolved implicit dependencies
- faucet-pipeline-js(x) does not replace process.env.NODE_ENV when bundling an React app HOT 9
- Replace Variables
- writeConfig: Support `inlineDynamicImports: true` HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from faucet-pipeline-js.