一覧へ戻る
swyxio/rollup-plugin-react-sfc(新しいタブで開きます)
主要言語: JavaScript
- star 数
- 3
- watcher 数
- 1
- fork 数
- 0
- issue 数
- 1
- 最終更新
- 2020/08/15
主要言語: JavaScript
NPM: http://npm.im/rollup-plugin-react-sfc
⚠️ THIS PACKAGE IS JUST A PROOF OF CONCEPT. IT WORKS ONLY ON TEST CASES SHOWN IN THE REPO.
take a rollup react app (try it out in this example)
npm i -D rollup-plugin-react-sfc
FOR NOW - make sure you have styled-jsx setup. We have a hard dependency on styled-jsx to do css-in-js for the time being. It is tricky to set up - see https://github.com/sw-yx/rollup-react-boilerplate for how I did it. It's super janky right now, sorry!!
// example rollup.config.js import SFC from 'rollup-plugin-react-sfc' export default () => { //... plugins: [ // babel({ // presets: [ // 'react-app', // ], // exclude: 'node_modules/**', // runtimeHelpers: true, // }), // plugin(/* options */) SFC({ showComponentDisplayName: true }) ] }
react-sfc properlyTODO:
styled-jsx in rollup - need SUPER hacky shit to work (see boilerplate's index.html)css no-op function for syntax highlighting in JS$value$stylemisc inspo
notes to self