aboutsummaryrefslogtreecommitdiffstats
path: root/packages/website/webpack.config.js
diff options
context:
space:
mode:
Diffstat (limited to 'packages/website/webpack.config.js')
-rw-r--r--packages/website/webpack.config.js48
1 files changed, 26 insertions, 22 deletions
diff --git a/packages/website/webpack.config.js b/packages/website/webpack.config.js
index c436888bd..e4cb1301c 100644
--- a/packages/website/webpack.config.js
+++ b/packages/website/webpack.config.js
@@ -11,10 +11,7 @@ module.exports = {
},
devtool: 'source-map',
resolve: {
- modules: [
- path.join(__dirname, '/ts'),
- 'node_modules',
- ],
+ modules: [path.join(__dirname, '/ts'), 'node_modules'],
extensions: ['.ts', '.tsx', '.js', '.jsx', '.json', '.md'],
alias: {
ts: path.join(__dirname, '/ts'),
@@ -22,6 +19,10 @@ module.exports = {
md: path.join(__dirname, '/md'),
},
},
+ // HACK: Temporary fix for this issue: https://github.com/trufflesuite/ganache-core/issues/84
+ node: {
+ fs: 'empty',
+ },
module: {
rules: [
{
@@ -62,25 +63,28 @@ module.exports = {
from: /^\/docs\/.*$/,
to: function() {
return 'index.html';
- }
- }
- ]
+ },
+ },
+ ],
},
disableHostCheck: true,
},
- plugins: process.env.NODE_ENV === 'production' ? [
- // Since we do not use moment's locale feature, we exclude them from the bundle.
- // This reduces the bundle size by 0.4MB.
- new webpack.IgnorePlugin(/^\.\/locale$/, /moment$/),
- new webpack.DefinePlugin({
- 'process.env': {
- 'NODE_ENV': JSON.stringify(process.env.NODE_ENV)
- }
- }),
- new webpack.optimize.UglifyJsPlugin({
- mangle: {
- except: ['BigNumber']
- }
- })
- ] : [],
+ plugins:
+ process.env.NODE_ENV === 'production'
+ ? [
+ // Since we do not use moment's locale feature, we exclude them from the bundle.
+ // This reduces the bundle size by 0.4MB.
+ new webpack.IgnorePlugin(/^\.\/locale$/, /moment$/),
+ new webpack.DefinePlugin({
+ 'process.env': {
+ NODE_ENV: JSON.stringify(process.env.NODE_ENV),
+ },
+ }),
+ new webpack.optimize.UglifyJsPlugin({
+ mangle: {
+ except: ['BigNumber'],
+ },
+ }),
+ ]
+ : [],
};