xiaofuzi / rollup-plugin-less

a less rollup plugin
22 stars 23 forks source link

Plugin can't create output directories, only files #15

Closed happyCoda closed 5 years ago

happyCoda commented 7 years ago

If I set output as a path to directory which exists plugin works fine, however if I set this path to directory which doesn't plugin fails. This case is happen in cases when you clean your bundle directory. For example I have public folder and it has two more folders inside – js and css, for my bundles. When I run npm run dev, public directory gets cleaned and js and css folders removed with all its content. So when I use:

`less({ output: 'public/css/bundle.css' }),

I got:

(less plugin) ENOENT: no such file or directory, open 'public/css/bundle.css' app/css/app.less

hoewer, this will work:

`less({ output: 'public/bundle.css' }),

This is because plugin does not create parent directories for output path provided, it only can create a file itself.

xieshengyong commented 6 years ago

Yes, I also encountered this problem

SijieCai commented 5 years ago

any progress on this?