Why does the plugin write declaration files directly? vs using `emitFile`
See original GitHub issueAs opposed to using emitFile
on the rollup context?
The main issue I’m running into is that declarations aren’t emitted at all when using the rollup API directly, because that calls the generateBundle
hook with isWrite==false
. But more generally, it would be useful to have these in the return value from generate
, so that I can feed them into a .d.ts
bundling tool.
Issue Analytics
- State:
- Created 4 years ago
- Comments:8 (8 by maintainers)
Top Results From Across the Web
rollup.js
Using the --configPlugin option will always force your config file to be transpiled to CommonJS first. ... Export a value immediately upon declaration:...
Read more >Writing a custom webpack loader - Redd Developer
Excel your webpack knowledge by learning how to write a custom webpack loader that turns an MP3 file import into an interactive audio ......
Read more >TypeScript library tips: Rollup your types! | by Martin Hochel
NOTE: this article will not go through how to configure Rollup or how it works in detail ... (type declaration files emitted by...
Read more >Introduction
Rollup can import existing CommonJS modules through a plugin. ... To use Rollup with a configuration file, pass the --config or -c flags:...
Read more >Plugin API
As a result, you can write a Vite plugin once and have it work for both dev ... This exposes the plugin to...
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 think this API didn’t exist when the plugin was originally written (or I missed it completely). This does make a lot of sense though, feel free to make a PR. (If not, I’ll fix it, eventually 😃).
This is apparently not intentional behavior in Rollup, see https://github.com/rollup/rollup/issues/3174