Skip to content

Instantly share code, notes, and snippets.

@tivac
Created December 6, 2017 23:29
Show Gist options
  • Save tivac/0c353a4e0fb32ab05e05a2eac26a1f24 to your computer and use it in GitHub Desktop.
Save tivac/0c353a4e0fb32ab05e05a2eac26a1f24 to your computer and use it in GitHub Desktop.
rollup-plugin-svelte & modular-css
// Example usage of svelte-preprocess support for modular-css
// https://github.com/tivac/modular-css/compare/svelte-preprocessing?expand=1
const { preprocess, plugin } = require("modular-css-rollup/svelte")({
// normal modular-css args passed to processor
// https://github.com/tivac/modular-css/blob/master/docs/api.md#options
css : "./dist/out.css"
});
module.exports = {
input : "Component.html",
output : {
file : "./dist/out.js",
format : "iife"
},
plugins: [
require("rollup-plugin-svelte", {
preprocess
}),
plugin
]
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment