aboutsummaryrefslogtreecommitdiffstats
path: root/packages/website/webpack.config.js
diff options
context:
space:
mode:
authorLeonid Logvinov <logvinov.leon@gmail.com>2019-01-09 19:02:25 +0800
committerLeonid Logvinov <logvinov.leon@gmail.com>2019-01-09 19:02:25 +0800
commitea14913b412e78ff458bdfba47182f7363e776e5 (patch)
tree3ee220bfbbd9923b5e1adc36ee51f9b5d39ad640 /packages/website/webpack.config.js
parent5868c91cfb54cfa9177572b201d88d1168bf5b06 (diff)
parent5dd55491b86bf8577405e37d0f2d668aa1273b10 (diff)
downloaddexon-0x-contracts-ea14913b412e78ff458bdfba47182f7363e776e5.tar
dexon-0x-contracts-ea14913b412e78ff458bdfba47182f7363e776e5.tar.gz
dexon-0x-contracts-ea14913b412e78ff458bdfba47182f7363e776e5.tar.bz2
dexon-0x-contracts-ea14913b412e78ff458bdfba47182f7363e776e5.tar.lz
dexon-0x-contracts-ea14913b412e78ff458bdfba47182f7363e776e5.tar.xz
dexon-0x-contracts-ea14913b412e78ff458bdfba47182f7363e776e5.tar.zst
dexon-0x-contracts-ea14913b412e78ff458bdfba47182f7363e776e5.zip
Merge development
Diffstat (limited to 'packages/website/webpack.config.js')
-rw-r--r--packages/website/webpack.config.js29
1 files changed, 28 insertions, 1 deletions
diff --git a/packages/website/webpack.config.js b/packages/website/webpack.config.js
index 33d5f648b..d9bdd91ad 100644
--- a/packages/website/webpack.config.js
+++ b/packages/website/webpack.config.js
@@ -3,6 +3,7 @@ const webpack = require('webpack');
const TerserPlugin = require('terser-webpack-plugin');
const RollbarSourceMapPlugin = require('rollbar-sourcemap-webpack-plugin');
const childProcess = require('child_process');
+const BundleAnalyzerPlugin = require('webpack-bundle-analyzer').BundleAnalyzerPlugin;
const GIT_SHA = childProcess
.execSync('git rev-parse HEAD')
@@ -55,6 +56,21 @@ const config = {
test: /\.css$/,
loaders: ['style-loader', 'css-loader'],
},
+ {
+ test: /\.svg$/,
+ use: [
+ {
+ loader: "react-svg-loader",
+ options: {
+ svgo: {
+ plugins: [
+ { removeViewBox: false }
+ ],
+ }
+ }
+ }
+ ]
+ },
],
},
optimization: {
@@ -70,6 +86,7 @@ const config = {
],
},
devServer: {
+ host: '0.0.0.0',
port: 3572,
historyApiFallback: {
// Fixes issue where having dots in URL path that aren't part of fileNames causes webpack-dev-server
@@ -85,6 +102,13 @@ const config = {
],
},
disableHostCheck: true,
+ // Fixes assertion error
+ // Source: https://github.com/webpack/webpack-dev-server/issues/1491
+ https: {
+ spdy: {
+ protocols: ['http/1.1']
+ }
+ },
},
};
@@ -92,6 +116,9 @@ module.exports = (_env, argv) => {
let plugins = [];
if (argv.mode === 'development') {
config.mode = 'development';
+ plugins.concat([
+ new BundleAnalyzerPlugin(),
+ ]);
} else {
config.mode = 'production';
plugins = plugins.concat([
@@ -109,7 +136,7 @@ module.exports = (_env, argv) => {
new RollbarSourceMapPlugin({
accessToken: '32c39bfa4bb6440faedc1612a9c13d28',
version: GIT_SHA,
- publicPath: 'https://0xproject.com/',
+ publicPath: 'https://0x.org/',
}),
]);
}