mizchi / uniroll

Opinionated universal frontend bundler in browser
https://focused-raman-3ce115.netlify.com/
113 stars 5 forks source link

rollup-svelte-plugin で css を emit をする option が欲しい #28

Closed RyosukeCla closed 3 years ago

RyosukeCla commented 3 years ago

こんな感じ?

const { js, css, warnings } = compile(code, {
  css: false
});

if (css.code) {
  const cssFileName = `svelte-generated-css/${Math.random().toString(16)}-${path.filename(resolveId)}.css`;
  js.code += `\nimport "${cssFileName}";\n`;
  cssEmit.set(cssFileName, css);
}