Skip to content
This repository was archived by the owner on May 1, 2020. It is now read-only.

Commit fdd86be

Browse files
committed
fix(webpack): use source-maps instead of eval for prod builds
use source-maps instead of eval for prod builds
1 parent a3238d8 commit fdd86be

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

config/webpack.config.js

+10-1
Original file line numberDiff line numberDiff line change
@@ -43,13 +43,22 @@ function getSourcemapLoader() {
4343
];
4444
}
4545

46+
function getDevtool() {
47+
if (process.env.IONIC_ENV === 'prod') {
48+
// for now, just force source-map for prod builds
49+
return 'source-map';
50+
}
51+
52+
return process.env.IONIC_SOURCE_MAP;
53+
}
54+
4655
module.exports = {
4756
entry: getEntryPoint(),
4857
output: {
4958
path: '{{BUILD}}',
5059
filename: 'main.js'
5160
},
52-
devtool: process.env.IONIC_SOURCE_MAP,
61+
devtool: getDevtool(),
5362

5463
resolve: {
5564
extensions: ['.js', '.ts', '.json']

0 commit comments

Comments
 (0)