Giter Site home page Giter Site logo

rollup-plugin-image-files's People

Contributors

bspaulding avatar dependabot[bot] avatar kimak avatar pkwak-sf avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

rollup-plugin-image-files's Issues

Integration into @rollup/plugin-image

Hey there. I'm currently leading the effort to migrate all of the "official" Rollup plugins into a monorepo at https://github.com/rollup/plugins. rollup-plugin-image is next on my list, and part of the migration is going to be adding some missing features that have long been requested. I was to curios to know if you're interested in integrating this plugin into the @rollup/plugin-image plugin. Cheers.

Feature request: configurable output dir

I'd like to put my image files into a subdirectory but this doesn't seem to be possible at the time.

I'd expect to be able to pass options like

imageFiles({
   dir: "./assets"
})

which would then be appended using path.resolve to the path which is currently used/extracted from the rollup config.

Is there anything which would speak against it or would a PR be appreciated?

Error: The "path" argument must be of type string

Tried including this in my rollup.config.js using

import images from 'rollup-plugin-image-files'

and also included 'image()' in the plugins section. Even without trying to import any image, it throws this error:

[!] TypeError [ERR_INVALID_ARG_TYPE]: The "path" argument must be of type string
TypeError [ERR_INVALID_ARG_TYPE]: The "path" argument must be of type string
    at assertPath (path.js:39:11)
    at Object.dirname (path.js:1331:5)
    at Object.ongenerate (/home/me/my-components/my-component/src/node_modules/rollup-plugin-image-files/dist/index.cjs.js:37:21)
    at /usr/local/lib/node_modules/rollup/dist/rollup.js:19615:40
    at Array.forEach (<anonymous>)
    at /usr/local/lib/node_modules/rollup/dist/rollup.js:19613:41
    at <anonymous>

Create dest dir if needed

Right now, writing out files will happen before rollup has created the dest directory. We should probably handle this case and not explode.

Images into directory

Hello,

is their any way to move images into sub directory ? Currently its directly placing in the same folder.

like images({ extract: "public/images" }),

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.