Skip to content

Commit

Permalink
Bundle acorn dependencies since acorn-jsx is not node 4 compatible
Browse files Browse the repository at this point in the history
  • Loading branch information
adrianheine committed Oct 23, 2018
1 parent 9d6aa44 commit 15befd8
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions rollup.create-config.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ const ensureArray = maybeArr => Array.isArray(maybeArr) ? maybeArr : [maybeArr];
const createConfig = (opts) => {
opts = opts || {};
const browser = opts.browser || false;
const external = opts.external || Object.keys(pkg.dependencies || {});
const external = opts.external || Object.keys(pkg.dependencies || {}).filter(dep => !dep.match(/^acorn/));
const output = ensureArray(opts.output);

return {
Expand All @@ -26,10 +26,7 @@ const createConfig = (opts) => {
target: !browser ? { node: 4 } : null,
include: [
'src/**',
'node_modules/acorn-jsx/**',
'node_modules/regexpu-core/**',
'node_modules/unicode-match-property-ecmascript/**',
'node_modules/unicode-match-property-value-ecmascript/**',
'node_modules/acorn-jsx/**'
],
transforms: {
dangerousForOf: true
Expand Down

0 comments on commit 15befd8

Please sign in to comment.