From b9410d5a2d4aadc774bc17941c52682324984473 Mon Sep 17 00:00:00 2001 From: andrelandgraf Date: Thu, 30 Apr 2020 07:58:46 +0200 Subject: [PATCH] trying to make this package work with ssr --- package.json | 2 +- webpack.config.js | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 7550269..6ffa209 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "react-datalist-input", - "version": "1.3.9", + "version": "1.3.10", "description": "This package provides a react component as follows: an input field with a drop down menu to pick a possible option based on the current input.", "main": "./lib/DataListInput.js", "license": "MIT", diff --git a/webpack.config.js b/webpack.config.js index 41ac9e4..086072a 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -1,12 +1,15 @@ var path = require('path'); module.exports = { + target: 'node', mode: 'production', entry: './src/DataListInput.jsx', output: { path: path.resolve('lib'), + library: 'DataListInput', + libraryTarget: 'umd', //libraryTarget: 'commonjs2' filename: 'DataListInput.js', - libraryTarget: 'commonjs2' + globalObject: 'this' }, module: { rules: [