Fix source maps

This commit is contained in:
Paulus Schoutsen 2019-06-24 22:05:34 -07:00
parent 999c243c94
commit be5c3efb23

View File

@ -19,7 +19,7 @@ version = version[0];
const genMode = (isProdBuild) => (isProdBuild ? "production" : "development"); const genMode = (isProdBuild) => (isProdBuild ? "production" : "development");
const genDevTool = (isProdBuild) => const genDevTool = (isProdBuild) =>
isProdBuild ? "cheap-source-map" : "inline-cheap-module-source-map"; isProdBuild ? "source-map" : "inline-cheap-module-source-map";
const genFilename = (isProdBuild, dontHash = new Set()) => ({ chunk }) => { const genFilename = (isProdBuild, dontHash = new Set()) => ({ chunk }) => {
if (!isProdBuild || dontHash.has(chunk.name)) { if (!isProdBuild || dontHash.has(chunk.name)) {
return `${chunk.name}.js`; return `${chunk.name}.js`;
@ -81,6 +81,7 @@ const optimization = (latestBuild) => ({
cache: true, cache: true,
parallel: true, parallel: true,
extractComments: true, extractComments: true,
sourceMap: true,
terserOptions: { terserOptions: {
safari10: true, safari10: true,
ecma: latestBuild ? undefined : 5, ecma: latestBuild ? undefined : 5,