rollup-plugin-esbuild
rollup-plugin-esbuild copied to clipboard
Add bundle option
eslint has a bundle: true|false (default: false) option. it would be useful to have this option in this rollup plugin as well. the option also replaces @rollup/plugin-node-resolve if i'm not mistaken.
hmm then why not use esbuild directly?
because sometimes you need more than just bundled js: css with postcss, json, images, copy, etc
So I guess you mean using esbuild to bundle JS files and ignore static assets like .css, .jpg etc and let Rollup handle them instead, that seems like a legit use case 👌
With that approach we essentially need to tell esbuild to ignore all relative imports that are not JS files, but unfortunately there's no easy way to do this until esbuild's plugin API is available. However when esbuild plugin API is available you'll probably no longer need Rollup and this plugin since you can write plugins for esbuild directly to handle static assets instead.