Skip to content

Commit 60a42ae

Browse files
committed
Re-enable uglify
1 parent dc15217 commit 60a42ae

File tree

1 file changed

+28
-11
lines changed

1 file changed

+28
-11
lines changed

packages/react-error-overlay/webpack.config.iframe.js

+28-11
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,24 @@ module.exports = {
1919
rules: [
2020
{
2121
test: /\.js$/,
22-
include: path.resolve(__dirname, './src'),
22+
include: [
23+
path.resolve(__dirname, './src'),
24+
path.dirname(
25+
require.resolve('chalk', {
26+
paths: path.dirname(require.resolve('@babel/code-frame')),
27+
})
28+
),
29+
path.dirname(
30+
require.resolve(
31+
'ansi-styles',
32+
path.dirname(
33+
require.resolve('chalk', {
34+
paths: path.dirname(require.resolve('@babel/code-frame')),
35+
})
36+
)
37+
)
38+
),
39+
],
2340
use: 'babel-loader',
2441
},
2542
],
@@ -34,15 +51,15 @@ module.exports = {
3451
}),
3552
// This code is embedded as a string, so it would never be optimized
3653
// elsewhere.
37-
// new webpack.optimize.UglifyJsPlugin({
38-
// compress: {
39-
// warnings: false,
40-
// comparisons: false,
41-
// },
42-
// output: {
43-
// comments: false,
44-
// ascii_only: false,
45-
// },
46-
// }),
54+
new webpack.optimize.UglifyJsPlugin({
55+
compress: {
56+
warnings: false,
57+
comparisons: false,
58+
},
59+
output: {
60+
comments: false,
61+
ascii_only: false,
62+
},
63+
}),
4764
],
4865
};

0 commit comments

Comments
 (0)