https://github.com/eggheadio/plnkr-bundles
https://github.com/eggheadio/plnkr-bundles
Last synced: 7 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/eggheadio/plnkr-bundles
- Owner: eggheadio
- Created: 2017-10-13T22:01:06.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2017-10-16T19:42:28.000Z (over 8 years ago)
- Last Synced: 2024-12-28T11:12:08.569Z (over 1 year ago)
- Language: JavaScript
- Size: 965 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# How to create a Plnkr Bundle
`npm i -g jspm@beta`
Follow these steps to install/build a umd bundle:
1. `jspm install npm:babel-plugin-transform-decorators-legacy`
2. `jspm build babel-plugin-transform-decorators-legacy babel-plugin-transform-decorators-legacy.js`
This creates a `babel-plugin-transform-decorators-legacy.js` file:
Git commit and push to master, now you load this file from:
[https://rawgit.com/eggheadio/plnkr-bundles/master/babel-plugin-transform-decorators-legacy.js](https://rawgit.com/eggheadio/plnkr-bundles/master/babel-plugin-transform-decorators-legacy.js)
## Usage:
```js
SystemJS.config({
map: {
"plugin-babel": "https://unpkg.com/systemjs-plugin-babel@0.0.25/plugin-babel.js",
"systemjs-babel-build": "https://unpkg.com/systemjs-plugin-babel@0.0.25/systemjs-babel-browser.js",
"babel-preset-react": "https://rawgit.com/eggheadio/plnkr-bundles/master/babel-preset-react.js",
"babel-plugin-transform-decorators-legacy": "https://rawgit.com/eggheadio/plnkr-bundles/master/babel-plugin-transform-decorators-legacy.js",
"react": "https://unpkg.com/react@16.0.0/umd/react.development.js",
"react-dom": "https://unpkg.com/react-dom@16.0.0/umd/react-dom.development.js"
},
transpiler: "plugin-babel",
meta: {
"*.js": {
esModule: true,
babelOptions: {
presets: ["babel-preset-react"],
plugins: ["babel-plugin-transform-decorators-legacy"]
}
}
}
})
```
## Live Examples
* mobx [https://plnkr.co/edit/vZa78G8VFtC8ihf2lSFM?p=preview](https://plnkr.co/edit/vZa78G8VFtC8ihf2lSFM?p=preview)
## Why?
Mainly because babel plugins/presets aren't bundled
# ⚠️ Warning⚠️
Plugins/presets/libs that depend on `process.env.FOO` (such as "babel-plugin-react-app") will break your browser build. Until
we find a workaround/hack for injecting a `process`, just avoid
them.