Skip to content

Commit 6c3a18c

Browse files
committed
add babel to build
1 parent dd0aba6 commit 6c3a18c

File tree

3 files changed

+28
-1
lines changed

3 files changed

+28
-1
lines changed

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,8 @@
2323
"eslint-plugin-import": "^2.12.0",
2424
"glob": "^7.1.2",
2525
"jest-cli": "^23.1.0",
26-
"rollup": "^0.59.4"
26+
"rollup": "^0.59.4",
27+
"rollup-plugin-babel": "^3.0.4"
2728
},
2829
"dependencies": {
2930
"hastscript": "^3.1.0"

rollup.config.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import babel from 'rollup-plugin-babel';
12
import pkg from './package.json';
23

34
export default {
@@ -6,5 +7,13 @@ export default {
67
{ file: pkg.main, format: 'cjs' },
78
{ file: pkg.module, format: 'es' },
89
],
10+
plugins: [
11+
babel({
12+
presets: [
13+
['env', { targets: { browsers: '>0.25%' }, modules: false }],
14+
],
15+
babelrc: false,
16+
}),
17+
],
918
external: ['hastscript'],
1019
};

yarn.lock

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1416,6 +1416,10 @@ estraverse@^4.0.0, estraverse@^4.1.0, estraverse@^4.1.1, estraverse@^4.2.0:
14161416
version "4.2.0"
14171417
resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-4.2.0.tgz#0dee3fed31fcd469618ce7342099fc1afa0bdb13"
14181418

1419+
estree-walker@^0.2.1:
1420+
version "0.2.1"
1421+
resolved "https://registry.yarnpkg.com/estree-walker/-/estree-walker-0.2.1.tgz#bdafe8095383d8414d5dc2ecf4c9173b6db9412e"
1422+
14191423
esutils@^2.0.2:
14201424
version "2.0.2"
14211425
resolved "https://registry.yarnpkg.com/esutils/-/esutils-2.0.2.tgz#0abf4f1caa5bcb1f7a9d8acc6dea4faaa04bac9b"
@@ -3450,6 +3454,19 @@ rimraf@^2.2.8, rimraf@^2.5.4, rimraf@^2.6.1:
34503454
dependencies:
34513455
glob "^7.0.5"
34523456

3457+
rollup-plugin-babel@^3.0.4:
3458+
version "3.0.4"
3459+
resolved "https://registry.yarnpkg.com/rollup-plugin-babel/-/rollup-plugin-babel-3.0.4.tgz#41b3e762fe64450dd61da3105a2cf7ad76be4edc"
3460+
dependencies:
3461+
rollup-pluginutils "^1.5.0"
3462+
3463+
rollup-pluginutils@^1.5.0:
3464+
version "1.5.2"
3465+
resolved "https://registry.yarnpkg.com/rollup-pluginutils/-/rollup-pluginutils-1.5.2.tgz#1e156e778f94b7255bfa1b3d0178be8f5c552408"
3466+
dependencies:
3467+
estree-walker "^0.2.1"
3468+
minimatch "^3.0.2"
3469+
34533470
rollup@^0.59.4:
34543471
version "0.59.4"
34553472
resolved "https://registry.yarnpkg.com/rollup/-/rollup-0.59.4.tgz#6f80f7017c22667ff1bf3e62adf8624a44cc44aa"

0 commit comments

Comments
 (0)