From ccb0a896f0defefe3e1ed92f649d45a4a0766608 Mon Sep 17 00:00:00 2001 From: Dylan <99700808+dylankilgore@users.noreply.github.com> Date: Mon, 4 Apr 2022 08:52:54 -0700 Subject: [PATCH] fix: react: ignore react in production build to avoid conflicts (#29) * fix: react: ignore react in production build to avoid conflicts * chore: version: bump version in package json * chore: npm: updates npm ignore --- .npmignore | 5 ++++- package.json | 2 +- webpack.prod.js | 12 ++++++++---- 3 files changed, 13 insertions(+), 6 deletions(-) diff --git a/.npmignore b/.npmignore index 5b4dc1b3b..8068f44a7 100644 --- a/.npmignore +++ b/.npmignore @@ -14,7 +14,9 @@ npm-debug.log* README.md stats.json tsconfig.json -webpack.config.js +webpack.common.js +webpack.dev.js +webpack.prod.js yarn.lock yarn-debug.log* yarn-error.log* @@ -28,5 +30,6 @@ yarn-error.log* .env.local .env.production.local .env.test.local +.versionrc.json lib/octuple.js.LICENSE.txt \ No newline at end of file diff --git a/package.json b/package.json index d66d3b918..1d0f77807 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@eightfold.ai/octuple", - "version": "0.0.2", + "version": "0.0.3", "license": "MIT", "main": "lib/octuple.js", "types": "lib/octuple.d.ts", diff --git a/webpack.prod.js b/webpack.prod.js index 014f06afd..69d228139 100644 --- a/webpack.prod.js +++ b/webpack.prod.js @@ -5,9 +5,13 @@ process.env.NODE_ENV = 'production'; module.exports = { ...WebpackCommonConfig, + externals: { + react: 'commonjs react', + 'react-dom': 'commonjs react-dom', + }, plugins: [ new webpack.DefinePlugin({ - VERSION: JSON.stringify(require('./package.json').version) - }) - ] -}; \ No newline at end of file + VERSION: JSON.stringify(require('./package.json').version), + }), + ], +};