thgh / rollup-plugin-scss

Rollup and compile multiple .scss, .sass and .css imports
MIT License
135 stars 46 forks source link

Any hint on how to write hash in final file name? #32

Closed frederikhors closed 4 years ago

frederikhors commented 5 years ago

Any hint on how to write hash in final file name?

thgh commented 5 years ago

You could use the output option

  output: function (styles) {
    const hash = require...crypto...digest()
    writeFileSync('bundle.' + hash + '.css', styles)
  },