Skip to content

Commit 3aa3fa1

Browse files
committed
Fixed issue with sourcemaps
* Rather than creating a separate sourcemap file, instead, use the eval option. * Thus, no need for moving the created sourcemap file.
1 parent 5a63445 commit 3aa3fa1

File tree

1 file changed

+1
-12
lines changed

1 file changed

+1
-12
lines changed

webpack/webpack.rails.config.js

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -37,21 +37,10 @@ module.exports = {
3737
var devBuild = (typeof process.env["BUILDPACK_URL"]) === "undefined";
3838
if (devBuild) {
3939
console.log("Webpack dev build for rails");
40-
module.exports.devtool = "source-map";
40+
module.exports.devtool = "eval-source-map";
4141
module.exports.module.loaders.push(
4242
{ test: require.resolve("react"), loader: "expose?React" }
4343
);
44-
module.exports.plugins = [
45-
function () {
46-
this.plugin("emit", function (compilation, callback) {
47-
// CRITICAL: This must be a relative path from the railsJsAssetsDir (where gen file goes)
48-
var asset = compilation.assets[railsBundleMapFile];
49-
compilation.assets[railsBundleMapRelativePath] = asset;
50-
delete compilation.assets[railsBundleMapFile];
51-
callback();
52-
});
53-
}
54-
];
5544
} else {
5645
console.log("Webpack production build for rails");
5746
}

0 commit comments

Comments
 (0)