Skip to content

Commit

Permalink
fix: compile dependencies with babel
Browse files Browse the repository at this point in the history
  • Loading branch information
imyelo committed Aug 24, 2018
1 parent 6c4153b commit 734b2e6
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@ import resolve from 'rollup-plugin-node-resolve'
import commonjs from 'rollup-plugin-commonjs'
import babel from 'rollup-plugin-babel'
import pkg from './package.json'
import fs from 'fs'

const babelrc = JSON.parse(fs.readFileSync('./.babelrc', 'utf8'))

export default [
{
Expand All @@ -14,7 +17,13 @@ export default [
plugins: [
resolve(),
commonjs(),
babel(),
babel({
// compile some libraries of sindresorhus with babel, because these are using es2015+ syntax but with commonjs.
// see: https://github.com/rollup/rollup-plugin-babel#external-dependencies
...babelrc,
babelrc: false,
include: '**',
}),
],
},
]

0 comments on commit 734b2e6

Please sign in to comment.