1 parent fa2cd8b commit 2935d14Copy full SHA for 2935d14
3 files changed
test/configCases/source-map/sources-array-production/index.js
@@ -0,0 +1,8 @@
1
+it("should include test.js in SourceMap", function() {
2
+ var fs = require("fs");
3
+ var source = fs.readFileSync(__filename + ".map", "utf-8");
4
+ var map = JSON.parse(source);
5
+ map.sources.should.containEql("webpack:///./test.js");
6
+});
7
+
8
+require.include("./test.js");
test/configCases/source-map/sources-array-production/test.js
@@ -0,0 +1,3 @@
+var foo = {};
+module.exports = foo;
test/configCases/source-map/sources-array-production/webpack.config.js
@@ -0,0 +1,11 @@
+var webpack = require("../../../../");
+module.exports = {
+ node: {
+ __dirname: false,
+ __filename: false
+ },
+ devtool: "source-map",
+ plugins: [
9
+ new webpack.optimize.UglifyJsPlugin()
10
+ ]
11
+};
0 commit comments