aboutsummaryrefslogtreecommitdiff
path: root/webpack.config.js
diff options
context:
space:
mode:
Diffstat (limited to 'webpack.config.js')
-rw-r--r--webpack.config.js45
1 files changed, 14 insertions, 31 deletions
diff --git a/webpack.config.js b/webpack.config.js
index 3fd00bcf3..56bd428e4 100644
--- a/webpack.config.js
+++ b/webpack.config.js
@@ -1,7 +1,6 @@
var path = require('path');
var webpack = require('webpack');
const CopyWebpackPlugin = require("copy-webpack-plugin");
-const HtmlWebpackPlugin = require('html-webpack-plugin');
const ForkTsCheckerWebpackPlugin = require("fork-ts-checker-webpack-plugin");
const plugins = [
@@ -9,16 +8,11 @@ const plugins = [
from: "deploy",
to: path.join(__dirname, "build")
}]),
- new HtmlWebpackPlugin({
- title: 'Caching',
- }),
new ForkTsCheckerWebpackPlugin({
tslint: true,
- // memoryLimit: 4096,
useTypescriptIncrementalApi: true
}),
- new webpack.ProvidePlugin({ Buffer: ['buffer', 'Buffer'], }),
- new webpack.ProvidePlugin({ process: 'process/browser', }),
+ new webpack.optimize.OccurrenceOrderPlugin(),
new webpack.HotModuleReplacementPlugin(),
];
@@ -51,29 +45,24 @@ module.exports = {
inkControls: ["./src/mobile/InkControls.tsx", 'webpack-hot-middleware/client?reload=true'],
mobileInterface: ["./src/mobile/MobileMain.tsx", 'webpack-hot-middleware/client?reload=true'],
},
+ optimization: {
+ noEmitOnErrors: true
+ },
devtool: "source-map",
+ node: {
+ fs: 'empty',
+ module: 'empty',
+ dns: 'mock',
+ tls: 'mock',
+ net: 'mock'
+ },
output: {
filename: "[name].js",
path: path.resolve(__dirname, "build"),
- publicPath: "/",
+ publicPath: "/"
},
resolve: {
- extensions: ['.js', '.ts', '.tsx'],
- fallback: {
- fs: false,
- tls: false,
- net: false,
- zlib: false,
- dns: false,
- crypto: false,
- assert: false,
- os: false,
- path: require.resolve("path-browserify"),
- http: require.resolve("http-browserify"),
- https: require.resolve("https-browserify"),
- stream: require.resolve("stream-browserify"),
- buffer: require.resolve("buffer")
- }
+ extensions: ['.js', '.ts', '.tsx']
},
module: {
rules: [{
@@ -86,12 +75,6 @@ module.exports = {
}]
},
{
- test: /\.m?js/,
- resolve: {
- fullySpecified: false
- }
- },
- {
test: /\.(woff|woff2|ttf|eot|otf|svg)$/,
use: 'file-loader?name=fonts/[name].[ext]!static'
},
@@ -130,5 +113,5 @@ module.exports = {
plugins,
externals: [
'child_process'
- ],
+ ]
}; \ No newline at end of file