itslearning / protomorph

Shared build config for frontend applications
MIT License
9 stars 5 forks source link

Plugins usage order in Sass and Svelte configurations #113

Closed riskeez closed 1 year ago

riskeez commented 1 year ago

Problem We can't control execution order of plugins that are passed to Svelte and Sass rollup configuration objects: user defined plugins collection is always used at the end of plugins processing.
Some plugins (like rollup/plugin-replace for string replacement) must be called before standard plugins.

Suggestion Extend options object for Svelte and Sass configuration objects to support beforePlugins plugin collection.
beforePlugins collection should be handled before standard plugins