diff --git a/packages/server/package.js b/packages/server/package.js index 19d0ef6e2d..2f78f772ee 100644 --- a/packages/server/package.js +++ b/packages/server/package.js @@ -1,3 +1,6 @@ export default { - build: true + build: true, + rollup: { + externals: ['jsdom'] + } } diff --git a/scripts/package.js b/scripts/package.js index 97b747762b..06a3e8e340 100644 --- a/scripts/package.js +++ b/scripts/package.js @@ -189,7 +189,8 @@ export default class Package { const config = { rootDir: this.options.rootDir, alias: {}, - replace: {} + replace: {}, + ...this.options.rollup } // Replace linkedDependencies with their suffixed version diff --git a/scripts/rollup.config.js b/scripts/rollup.config.js index cb52767a95..8445ec1ec2 100644 --- a/scripts/rollup.config.js +++ b/scripts/rollup.config.js @@ -17,6 +17,7 @@ export default function rollupConfig ({ input = 'src/index.js', replace = {}, alias = {}, + externals = [], resolve = { only: [ /lodash/ @@ -43,7 +44,9 @@ export default function rollupConfig ({ // Dependencies that will be installed alongise with the nuxt package ...Object.keys(pkg.dependencies || {}), // Builtin node modules - ...builtins + ...builtins, + // Explicit externals + ...externals ], plugins: [ aliasPlugin(alias),