Skip to content

Commit

Permalink
Treat all dependencies as externals
Browse files Browse the repository at this point in the history
As explained in #159 (comment) rollup doesn't like half-internalized externals. This change will treat all dependencies as externals and thus won't try to convert their imports.
  • Loading branch information
onigoetz authored and adrianheine committed Oct 23, 2018
1 parent cc9ca91 commit 9d6aa44
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion rollup.create-config.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,14 @@ import buble from 'rollup-plugin-buble';
import json from 'rollup-plugin-json';
import resolve from 'rollup-plugin-node-resolve';
import commonjs from 'rollup-plugin-commonjs';
import pkg from './package.json';

const ensureArray = maybeArr => Array.isArray(maybeArr) ? maybeArr : [maybeArr];

const createConfig = (opts) => {
opts = opts || {};
const browser = opts.browser || false;
const external = opts.external || ['acorn', 'magic-string'];
const external = opts.external || Object.keys(pkg.dependencies || {});
const output = ensureArray(opts.output);

return {
Expand Down

0 comments on commit 9d6aa44

Please sign in to comment.