astroturf
astroturf copied to clipboard
Add Rollup support
It would be great to see rollup plugin/loader or example in the docs if it's already possible.
To all watchers and upvoters - here is an example REPL.
Basically, needed rollup plugin configuration is:
plugins: [
babel({
babelHelpers: 'bundled',
plugins: [
'astroturf/plugin'
]
}),
postcss({
extract: 'app.css',
modules: true,
plugins: [
postcssNested
]
})
]
Things to note:
- I've used latest astroturf version available (v1.0.0-beta.11), beta version api probably differs from current stable one
- Temporary css files from components are saved to disk, same as in Parcel plugin (https://github.com/4Catalyzer/astroturf/issues/610). They can be removed using other rollup plugin, for example rollup-plugin-delete
I've tested only basic stuff which is enough for my needs and it's working. Try it in your projects as well 😉