From 39d33686f48013e477e3df45d6c85ab96c771f89 Mon Sep 17 00:00:00 2001 From: Pooya Parsa Date: Thu, 6 Feb 2020 14:02:05 +0100 Subject: [PATCH] chore: mark jsdom as external to remove warning --- packages/server/package.js | 5 ++++- scripts/package.js | 3 ++- scripts/rollup.config.js | 5 ++++- 3 files changed, 10 insertions(+), 3 deletions(-) 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),