egoist / egoist/rollup-plugin-postcss

Bundle webcomponent.js with webcomponent.css

Open
#450 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
689
Forks
210
PR merge metrics
No merged PRs in 30d

Description

I have a pure vanilla webcomponent, lets call it "Spinner.js" and a "Spinner.css". Can I bundle this to just one JS-File including
the CSS file?.

Currently my rollup configuration looks like this, but CSS ins not bundle inside *.JS File
```
const bundle = await rollup({
input: `${webcomponent.pathToWebcomponent}`,
plugins: [nodeResolve(), commonjs(),postcss({
extract: false,
minimize: true,
inject: {
insertAt: 'top',
},
}), terser()],
})
```

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.