Skip to content

Commit

Permalink
Prevented source maps from being injected into html
Browse files Browse the repository at this point in the history
  • Loading branch information
sergey-behavox committed Dec 11, 2017
1 parent d2f3ee3 commit fb45072
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions src/plugin.js
Original file line number Diff line number Diff line change
Expand Up @@ -113,13 +113,15 @@ class AutoDLLPlugin {
compilation.plugin(
'html-webpack-plugin-before-html-generation',
(htmlPluginData, callback) => {
const dllEntriesPaths = flatMap(memory.getStats().entrypoints, 'assets').map(filename =>
getInjectPath({
publicPath: settings.publicPath,
pluginPath: settings.path,
filename,
})
);
const dllEntriesPaths = flatMap(memory.getStats().entrypoints, 'assets')
.filter(filename => !filename.endsWith('.js.map'))
.map(filename =>
getInjectPath({
publicPath: settings.publicPath,
pluginPath: settings.path,
filename,
})
);

htmlPluginData.assets.js = concat(dllEntriesPaths, htmlPluginData.assets.js);

Expand Down

0 comments on commit fb45072

Please sign in to comment.