yohangz / rollup-plugin-ignore-import

Ignore import rollup plugin
MIT License
8 stars 5 forks source link

leave original import marked as external #6

Open AndyOGo opened 3 years ago

AndyOGo commented 3 years ago

I build a library with various resources (CSS, SVG, ts, etc. ) and the users are expected to make their own build.

Thus I would like to just skip imports and leave them for later transformation, like:

Input:

import "foo.css"

Output:

import "foo.css"

I made a contrived example using the resolveId hook with the external option: https://repl.it/@AndyOGo/OldfashionedAnnualCache