Add memory leak test-suite

This commit is contained in:
Thomas Nordquist
2019-04-25 13:50:15 +02:00
parent 8cd11cde3b
commit af2ff0149d
13 changed files with 700 additions and 36 deletions

View File

@@ -14,6 +14,7 @@ module.exports = {
path: `${__dirname}/build`,
},
optimization: {
minimize: false,
splitChunks: {
chunks: 'all',
minSize: 30000,
@@ -47,7 +48,7 @@ module.exports = {
devtool: 'source-map',
resolve: {
// Add '.ts' and '.tsx' as resolvable extensions.
extensions: ['.ts', '.tsx', '.js', '.json'],
extensions: ['.ts', '.tsx', '.js', '.json', '.node'],
},
module: {
rules: [
@@ -77,6 +78,15 @@ module.exports = {
},
],
},
{
test: /\.node$/,
use: {
loader: 'node-loader',
options: {
modules: true,
}
}
},
],
},
@@ -84,7 +94,11 @@ module.exports = {
new HtmlWebpackPlugin({ template: './index.html', file: './build/index.html', inject: false }),
// new BundleAnalyzerPlugin(),
new HardSourceWebpackPlugin(),
new webpack.HotModuleReplacementPlugin()
new webpack.HotModuleReplacementPlugin(),
new webpack.IgnorePlugin({
resourceRegExp: /\.\/build\/Debug\/addon/,
contextRegExp: /heapdump$/
}),
],
// When importing a module whose path matches one of the following, just