diff --git a/.npmignore b/.npmignore new file mode 100644 index 0000000..85de9cf --- /dev/null +++ b/.npmignore @@ -0,0 +1 @@ +src diff --git a/package.json b/package.json index 30bed86..c0e6b2f 100644 --- a/package.json +++ b/package.json @@ -5,7 +5,7 @@ "main": "index.js", "scripts": { "build": "webpack", - "test": "echo \"Error: no test specified\" && exit 1" + "prepublish": "npm run build" }, "author": "", "license": "ISC", diff --git a/webpack.config.js b/webpack.config.js index 41253fd..3d479a9 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -1,6 +1,6 @@ const {resolve} = require('path'); const {DefinePlugin} = require('webpack'); -const {BundleAnalyzerPlugin} = require('webpack-bundle-analyzer'); +// const {BundleAnalyzerPlugin} = require('webpack-bundle-analyzer'); function config({isServer}) { return { @@ -11,12 +11,6 @@ function config({isServer}) { externals: isServer ? { 'react': 'react', 'react-dom': 'react-dom', - // 'react': { - // commonjs: 'react', - // }, - // 'react-dom': { - // commonjs: 'react-dom', - // }, } : {}, output: { path: resolve(__dirname, 'build'), @@ -35,11 +29,11 @@ function config({isServer}) { BROWSER: !isServer } }), - new BundleAnalyzerPlugin({ - analyzerMode: 'static', - openAnalyzer: false, - reportFilename: (isServer ? 'server-' : 'client-') + 'stats.html', - }) + // new BundleAnalyzerPlugin({ + // analyzerMode: 'static', + // openAnalyzer: false, + // reportFilename: (isServer ? 'server-' : 'client-') + 'stats.html', + // }) ], module: { rules: [