Working webpack build // Without Hot Reload
This commit is contained in:
parent
353b6c06db
commit
44e099000d
@ -68,7 +68,6 @@
|
|||||||
"chai": "~3.5.0",
|
"chai": "~3.5.0",
|
||||||
"chai-enzyme": "0.4.2",
|
"chai-enzyme": "0.4.2",
|
||||||
"cheerio": "0.20.0",
|
"cheerio": "0.20.0",
|
||||||
"circular-dependency-plugin": "^2.0.0",
|
|
||||||
"copy-webpack-plugin": "~4.0.0",
|
"copy-webpack-plugin": "~4.0.0",
|
||||||
"core-js": "~2.4.1",
|
"core-js": "~2.4.1",
|
||||||
"coveralls": "~2.11.11",
|
"coveralls": "~2.11.11",
|
||||||
|
@ -24,7 +24,9 @@ export default class Contract {
|
|||||||
constructor (api, abi) {
|
constructor (api, abi) {
|
||||||
if (!isInstanceOf(api, Api)) {
|
if (!isInstanceOf(api, Api)) {
|
||||||
throw new Error('API instance needs to be provided to Contract');
|
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');
|
throw new Error('ABI needs to be provided to Contract instance');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -20,7 +20,6 @@ const path = require('path');
|
|||||||
const WebpackErrorNotificationPlugin = require('webpack-error-notification');
|
const WebpackErrorNotificationPlugin = require('webpack-error-notification');
|
||||||
const CopyWebpackPlugin = require('copy-webpack-plugin');
|
const CopyWebpackPlugin = require('copy-webpack-plugin');
|
||||||
const HtmlWebpackPlugin = require('html-webpack-plugin');
|
const HtmlWebpackPlugin = require('html-webpack-plugin');
|
||||||
const CircularDependencyPlugin = require('circular-dependency-plugin');
|
|
||||||
|
|
||||||
const Shared = require('./shared');
|
const Shared = require('./shared');
|
||||||
const DAPPS = require('../src/dapps');
|
const DAPPS = require('../src/dapps');
|
||||||
@ -132,13 +131,6 @@ module.exports = {
|
|||||||
template: './index.ejs',
|
template: './index.ejs',
|
||||||
favicon: FAVICON,
|
favicon: FAVICON,
|
||||||
chunks: [ isProd ? null : 'commons', 'index' ]
|
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) => {
|
], DAPPS.map((dapp) => {
|
||||||
return new HtmlWebpackPlugin({
|
return new HtmlWebpackPlugin({
|
||||||
@ -155,7 +147,8 @@ module.exports = {
|
|||||||
plugins.push(
|
plugins.push(
|
||||||
new webpack.optimize.CommonsChunkPlugin({
|
new webpack.optimize.CommonsChunkPlugin({
|
||||||
filename: 'commons.[hash].js',
|
filename: 'commons.[hash].js',
|
||||||
name: 'commons'
|
name: 'commons',
|
||||||
|
minChunks: Infinity
|
||||||
})
|
})
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user