一覧へ戻る
robhicks/rollup-plugin-stylus-to-css(新しいタブで開きます)
主要言語: JavaScript
Rollup plugin for stylus that outputs css only
- star 数
- 1
- watcher 数
- 0
- fork 数
- 2
- issue 数
- 1
- 最終更新
- 2023/04/04
主要言語: JavaScript
Rollup plugin for stylus that outputs css only
A Rollup.js plugin to compile Stylus files to css for use in web components. As if 1.1.0 it will work with stylus @import and @require statements.
npm i rollup-plugin-stylus-to-css -D
Add the following code to your project's rollup.config.js:
import stylus from 'rollup-plugin-stylus-to-css'; export default { entry: 'index.js', plugins: [ stylus(), ] };
.container height 100%
import css from './component.styl'; class MyComponent extends HTMLElement { constructor() { super(); } connectedCallback() { this.attachShadow({mode: 'open'}); this.shadowRoot.innerHTML = `<style>${css}</style><div></div>`; } static get observedAttributes() { return []; } } customElements.define('my-component', MyComponent); export { IdxFindBatches };
MIT