create-file-webpack icon indicating copy to clipboard operation
create-file-webpack copied to clipboard

[Feature Request] - Add the file at the beginning of the build process, not the end

Open mattgreenfield opened this issue 5 years ago • 3 comments

I'm using this plugin to take a set of colours defined in JS and generate a Sass file with them.

It would be great if that file was created at the beginning of the build process so it can be imported by other Sass files.

I imagine this being a config option.

I'm happy to submit a PR if you could point me in the right direction, Thanks.

mattgreenfield avatar Mar 08 '19 13:03 mattgreenfield

It looks like this will be as simple as changing which 'hook' it runs on - https://webpack.js.org/api/compiler-hooks/#hooks

mattgreenfield avatar Mar 11 '19 08:03 mattgreenfield

I needed this feature in one of my projects so I forked and created a pull request for this. Hopefully the change is accepted by the mantainer (this is the first pull request for me!)

matteotomasoni avatar Mar 29 '19 14:03 matteotomasoni

Hello there. I think I will have some time this weekend to merge a pull request with this change. Will keep you posted. Thanks!

Appius avatar Mar 30 '19 06:03 Appius