Working webpack build // Without Hot Reload

This commit is contained in:
Nicolas Gotchac 2016-11-26 17:12:52 +01:00
parent 353b6c06db
commit 44e099000d
3 changed files with 5 additions and 11 deletions

View File

@ -68,7 +68,6 @@
"chai": "~3.5.0",
"chai-enzyme": "0.4.2",
"cheerio": "0.20.0",
"circular-dependency-plugin": "^2.0.0",
"copy-webpack-plugin": "~4.0.0",
"core-js": "~2.4.1",
"coveralls": "~2.11.11",

View File

@ -24,7 +24,9 @@ export default class Contract {
constructor (api, abi) {
if (!isInstanceOf(api, Api)) {
throw new Error('API instance needs to be provided to Contract');
} else if (!abi) {
}
if (!abi) {
throw new Error('ABI needs to be provided to Contract instance');
}

View File

@ -20,7 +20,6 @@ const path = require('path');
const WebpackErrorNotificationPlugin = require('webpack-error-notification');
const CopyWebpackPlugin = require('copy-webpack-plugin');
const HtmlWebpackPlugin = require('html-webpack-plugin');
const CircularDependencyPlugin = require('circular-dependency-plugin');
const Shared = require('./shared');
const DAPPS = require('../src/dapps');
@ -132,13 +131,6 @@ module.exports = {
template: './index.ejs',
favicon: FAVICON,
chunks: [ isProd ? null : 'commons', 'index' ]
}),
new CircularDependencyPlugin({
// exclude detection of files based on a RegExp
exclude: /node_modules/,
// add errors to webpack instead of warnings
failOnError: true
})
], DAPPS.map((dapp) => {
return new HtmlWebpackPlugin({
@ -155,7 +147,8 @@ module.exports = {
plugins.push(
new webpack.optimize.CommonsChunkPlugin({
filename: 'commons.[hash].js',
name: 'commons'
name: 'commons',
minChunks: Infinity
})
);
}