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

Commit

Permalink
Merge pull request #161 from cloudflare/js-source-maps
Browse files Browse the repository at this point in the history
Enable source map generation in webpack
  • Loading branch information
prymitive committed Aug 8, 2017
2 parents 987013d + 404cc47 commit 7d1f40e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ const CleanWebpackPlugin = require("clean-webpack-plugin");
var config = {
cache: true,
context: path.resolve(__dirname, "assets/static"),
devtool: "cheap-source-map",
entry: {
unsee: "./unsee.js",
help: "./help.js"
Expand Down Expand Up @@ -37,7 +38,7 @@ var config = {
fs.mkdirSync(path.join(__dirname, "assets/static/dist/templates"));
for (var chunkName in stats.assetsByChunkName) {
var loaderName = "loader_" + chunkName + ".html";
var loaderScript = "<script type='text/javascript' src='static/dist/" + stats.assetsByChunkName[chunkName] + "'></script>";
var loaderScript = "<script type='text/javascript' src='static/dist/" + stats.assetsByChunkName[chunkName][0] + "'></script>";
fs.writeFileSync(path.join(__dirname, "assets/static/dist/templates", loaderName), loaderScript);
}
}
Expand Down

0 comments on commit 7d1f40e

Please sign in to comment.