bspaulding / rollup-plugin-image-files

Like rollup-plugin-image, but writes image files to dest instead of inlining base64.
MIT License
26 stars 14 forks source link

How to create dir to place the images #4

Closed lsqswl closed 4 years ago

lsqswl commented 5 years ago

The images are placed in root dir now.

bspaulding commented 5 years ago

@lsqswl Are you looking to configure a separate nested directory in the output dir? Currently, this plugin will drop them into the options.dest directory.

njleonzhang commented 4 years ago

there is a bug here, so dest can not work

https://github.com/bspaulding/rollup-plugin-image-files/blob/0a6b5a6d7fb930c8735504fae9dcee7ee0cf4769/src/index.js#L7-L21

options of image() is override by options of generateBundle()

njleonzhang commented 4 years ago

I have create a pr https://github.com/bspaulding/rollup-plugin-image-files/pull/7

bspaulding commented 4 years ago

I believe dest was part of an older version of the rollup plugin system. What version of rollup are ya'll using? On newest rollup, you should be setting the output directory/file in output.file or output.dir.

I was trying to retain support for older rollup, but possibly broke something with older rollup?

bspaulding commented 4 years ago

Closed due to inactivity. Please re-open with more info if this is still an issue for you!