gajus / gajus/prepack-webpack-plugin
Unfrozen object leaked before end of global code
- Dominant language
- JavaScript
- Stars
- 1k
- Forks
- 31
- PR merge metrics
- No merged PRs in 30d
Description
Tried to run my Webpack production config and getting the following error since I added ``prepack-webpack-plugin``:
```
Error: PP0017: Unfrozen object leaked before end of global code at 2:1 to 2:6378
Error
at app.js:2:2
```
My Webpack config:
```js
'use strict';
const path = require('path');
const webpack = require('webpack');
const PrepackWebpackPlugin = require('prepack-webpack-plugin').default;
const UglifyJsWebpackPLugin = require('uglifyjs-webpack-plugin');
const srcPath = path.resolve(__dirname, 'src');
const appPath = path.resolve(__dirname, 'app');
const webpackConfig = {
context: srcPath,
entry: {
app: path.resolve(srcPath, 'app.jsx'),
vendor: [
'react',
'react-dom',
'react-router-dom',
'glamor',
'glamorous',
'socket.io-client'
]
},
output: {
path: path.resolve(appPath, 'js'),
filename: 'app.js',
publicPath: '/'
},
resolve: {
extensions: ['.js', '.jsx'],
modules: [
path.resolve(__dirname, 'node_modules'),
path.resolve(srcPath, 'fonts'),
path.resolve(srcPath, 'helper'),
path.resolve(srcPath, 'screens'),
path.resolve(srcPath, 'components')
]
},
module: {
rules: [{
test: /\.jsx?$/,
use: 'babel-loader'
}, {
test: /\.(woff2?|jpg|jpeg|png|ico)$/,
use: {
loader: 'file-loader',
options: {
name: '[name].[ext]'
}
}
}]
},
plugins: [
new webpack.optimize.CommonsChunkPlugin({
name: 'vendor',
filename: 'vendor.js'
}),
new webpack.DefinePlugin({
'process.env.NODE_ENV': JSON.stringify('production')
}),
new UglifyJsWebpackPLugin(),
new PrepackWebpackPlugin()
]
};
module.exports = webpackConfig;
```
I'm on the latest version of ``prepack-webpack-plugin``, thought my ``app`` was corrupt, but that isn't the case. I tested it with a basic setup of just importing ``React``, ``React-Dom`` and then just rendering a basic ``Hello World!``.
Any ideas what could cause this?
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.