Skip to content

Commit

Permalink
add babel to rollup
Browse files Browse the repository at this point in the history
  • Loading branch information
nandomoreirame committed Dec 14, 2019
1 parent 11a1f3f commit 6b338ea
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 1 deletion.
7 changes: 7 additions & 0 deletions .babelrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"presets": [
["@babel/env", {
"modules": false
}]
]
}
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
"jest-cli": "^24.9.0",
"prettier": "^1.19.1",
"rollup": "^1.27.12",
"rollup-plugin-babel": "^4.3.3",
"rollup-plugin-node-resolve": "^5.2.0",
"rollup-plugin-replace": "^2.0.0",
"rollup-plugin-terser": "^5.1.3"
Expand Down
10 changes: 10 additions & 0 deletions rollup.config.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import nodeResolve from 'rollup-plugin-node-resolve';
import babel from 'rollup-plugin-babel';
import replace from 'rollup-plugin-replace';
import { terser } from 'rollup-plugin-terser';

Expand Down Expand Up @@ -46,6 +47,9 @@ export default [
},
plugins: [
nodeResolve(),
babel({
exclude: 'node_modules/**',
}),
replace({
'process.env.NODE_ENV': JSON.stringify('production'),
}),
Expand All @@ -72,6 +76,9 @@ export default [
},
plugins: [
nodeResolve(),
babel({
exclude: 'node_modules/**',
}),
replace({
'process.env.NODE_ENV': JSON.stringify('development'),
}),
Expand All @@ -90,6 +97,9 @@ export default [
},
plugins: [
nodeResolve(),
babel({
exclude: 'node_modules/**',
}),
replace({
'process.env.NODE_ENV': JSON.stringify('production'),
}),
Expand Down
10 changes: 9 additions & 1 deletion yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@
dependencies:
"@babel/types" "^7.7.4"

"@babel/helper-module-imports@^7.7.4":
"@babel/helper-module-imports@^7.0.0", "@babel/helper-module-imports@^7.7.4":
version "7.7.4"
resolved "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.7.4.tgz#e5a92529f8888bf319a6376abfbd1cebc491ad91"
integrity sha512-dGcrX6K9l8258WFjyDLJwuVKxR4XZfU0/vTUgOQYWEnRD8mgr+p4d6fCUMq/ys0h4CCt/S5JhbvtyErjWouAUQ==
Expand Down Expand Up @@ -3895,6 +3895,14 @@ rimraf@^2.5.4, rimraf@^2.6.3:
dependencies:
glob "^7.1.3"

rollup-plugin-babel@^4.3.3:
version "4.3.3"
resolved "https://registry.npmjs.org/rollup-plugin-babel/-/rollup-plugin-babel-4.3.3.tgz#7eb5ac16d9b5831c3fd5d97e8df77ba25c72a2aa"
integrity sha512-tKzWOCmIJD/6aKNz0H1GMM+lW1q9KyFubbWzGiOG540zxPPifnEAHTZwjo0g991Y+DyOZcLqBgqOdqazYE5fkw==
dependencies:
"@babel/helper-module-imports" "^7.0.0"
rollup-pluginutils "^2.8.1"

rollup-plugin-node-resolve@^5.2.0:
version "5.2.0"
resolved "https://registry.npmjs.org/rollup-plugin-node-resolve/-/rollup-plugin-node-resolve-5.2.0.tgz#730f93d10ed202473b1fb54a5997a7db8c6d8523"
Expand Down

0 comments on commit 6b338ea

Please sign in to comment.