@rollup/plugin-babel 5.2.2 → 5.2.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +9 -0
- package/README.md +18 -1
- package/package.json +7 -7
package/CHANGELOG.md
CHANGED
package/README.md
CHANGED
|
@@ -39,7 +39,7 @@ npm install @rollup/plugin-babel --save-dev
|
|
|
39
39
|
Create a `rollup.config.js` [configuration file](https://www.rollupjs.org/guide/en/#configuration-files) and import the plugin:
|
|
40
40
|
|
|
41
41
|
```js
|
|
42
|
-
import babel from '@rollup/plugin-babel';
|
|
42
|
+
import { babel } from '@rollup/plugin-babel';
|
|
43
43
|
|
|
44
44
|
const config = {
|
|
45
45
|
input: 'src/index.js',
|
|
@@ -55,6 +55,23 @@ export default config;
|
|
|
55
55
|
|
|
56
56
|
Then call `rollup` either via the [CLI](https://www.rollupjs.org/guide/en/#command-line-reference) or the [API](https://www.rollupjs.org/guide/en/#javascript-api).
|
|
57
57
|
|
|
58
|
+
### Using With `@rollup/plugin-commonjs`
|
|
59
|
+
|
|
60
|
+
When using `@rollup/plugin-babel` with `@rollup/plugin-commonjs` in the same Rollup configuration, it's important to note that `@rollup/plugin-commonjs` _must_ be placed before this plugin in the `plugins` array for the two to work together properly. e.g.
|
|
61
|
+
|
|
62
|
+
```js
|
|
63
|
+
import { babel } from '@rollup/plugin-babel';
|
|
64
|
+
import commonjs from '@rollup/plugin-commonjs';
|
|
65
|
+
|
|
66
|
+
const config = {
|
|
67
|
+
...
|
|
68
|
+
plugins: [
|
|
69
|
+
commonjs(),
|
|
70
|
+
babel({ babelHelpers: 'bundled' })
|
|
71
|
+
],
|
|
72
|
+
};
|
|
73
|
+
```
|
|
74
|
+
|
|
58
75
|
## Options
|
|
59
76
|
|
|
60
77
|
This plugin respects Babel [configuration files](https://babeljs.io/docs/en/configuration) by default and they are generally the best place to put your configuration.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rollup/plugin-babel",
|
|
3
|
-
"version": "5.2.
|
|
3
|
+
"version": "5.2.3",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -50,6 +50,11 @@
|
|
|
50
50
|
"@types/babel__core": "^7.1.9",
|
|
51
51
|
"rollup": "^1.20.0||^2.0.0"
|
|
52
52
|
},
|
|
53
|
+
"peerDependenciesMeta": {
|
|
54
|
+
"@types/babel__core": {
|
|
55
|
+
"optional": true
|
|
56
|
+
}
|
|
57
|
+
},
|
|
53
58
|
"dependencies": {
|
|
54
59
|
"@babel/helper-module-imports": "^7.10.4",
|
|
55
60
|
"@rollup/pluginutils": "^3.1.0"
|
|
@@ -82,10 +87,5 @@
|
|
|
82
87
|
"contributors": [
|
|
83
88
|
"Bogdan Chadkin <trysound@yandex.ru>",
|
|
84
89
|
"Mateusz Burzyński <mateuszburzynski@gmail.com> (https://github.com/Andarist)"
|
|
85
|
-
]
|
|
86
|
-
"peerDependenciesMeta": {
|
|
87
|
-
"@types/babel__core": {
|
|
88
|
-
"optional": true
|
|
89
|
-
}
|
|
90
|
-
}
|
|
90
|
+
]
|
|
91
91
|
}
|