Skip to content

Commit

Permalink
Don't bundle acorn dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
adrianheine committed Nov 20, 2018
1 parent 77cf57d commit 66abf56
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 13 deletions.
13 changes: 5 additions & 8 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,6 @@
},
"homepage": "https://github.com/Rich-Harris/buble#README",
"devDependencies": {
"acorn": "^6.0.4",
"acorn-dynamic-import": "^4.0.0",
"acorn-jsx": "^5.0.0",
"console-group": "^0.3.3",
"eslint": "^4.19.1",
"glob": "^7.1.3",
Expand All @@ -72,6 +69,9 @@
"test262-stream": "^1.2.0"
},
"dependencies": {
"acorn": "^6.0.4",
"acorn-dynamic-import": "^4.0.0",
"acorn-jsx": "^5.0.1",
"chalk": "^2.4.1",
"magic-string": "^0.25.1",
"minimist": "^1.2.0",
Expand Down
4 changes: 2 additions & 2 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 || {}).filter(dep => !dep.match(/^acorn/));
const external = opts.external || Object.keys(pkg.dependencies || {});
const output = ensureArray(opts.output);

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

0 comments on commit 66abf56

Please sign in to comment.