https://github.com/mwcz/webrh-rollup-poc
https://github.com/mwcz/webrh-rollup-poc
Last synced: 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/mwcz/webrh-rollup-poc
- Owner: mwcz
- Created: 2020-12-10T14:57:26.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2020-12-10T15:02:32.000Z (over 4 years ago)
- Last Synced: 2025-03-17T17:09:31.625Z (2 months ago)
- Language: JavaScript
- Homepage:
- Size: 11.7 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# webrh rollup proof of concept
Example of using rollup to generate a bundle of specific Patternfly Elements.
# Quick start for this example
```
npm install
npm run build
npm run serve
```# Migration steps
1. in webrh, npm install the desired components (already done, I'm pretty sure!)
1. npm install `rollup` and `@rollup/plugin-node-resolve`
1. Create a js file that imports those components, index.js in this example. All it needs to do is import them, nothing else.
1. Create rollup.config.js like the one in this exmaple, that specifies the input file (index.js) and output file (bundle.js) and output file format (iife, umd would also work). It should also import and register the node-resolve plugin
1. run `rollup -c` (aliased to `npm run build` in this example)