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

Commit

Permalink
fix(webpack): use source-maps instead of eval for prod builds
Browse files Browse the repository at this point in the history
use source-maps instead of eval for prod builds
  • Loading branch information
danbucholtz committed Nov 7, 2016
1 parent a3238d8 commit fdd86be
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion config/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,13 +43,22 @@ function getSourcemapLoader() {
];
}

function getDevtool() {
if (process.env.IONIC_ENV === 'prod') {
// for now, just force source-map for prod builds
return 'source-map';
}

return process.env.IONIC_SOURCE_MAP;
}

module.exports = {
entry: getEntryPoint(),
output: {
path: '{{BUILD}}',
filename: 'main.js'
},
devtool: process.env.IONIC_SOURCE_MAP,
devtool: getDevtool(),

resolve: {
extensions: ['.js', '.ts', '.json']
Expand Down

0 comments on commit fdd86be

Please sign in to comment.