webpack 3.9.1 → 3.10.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -181,14 +181,14 @@ class SourceMapDevToolPlugin {
|
|
181
181
|
}
|
182
182
|
let sourceMapFile = compilation.getPath(sourceMapFilename, {
|
183
183
|
chunk,
|
184
|
-
filename,
|
184
|
+
filename: options.fileContext ? path.relative(options.fileContext, filename) : filename,
|
185
185
|
query,
|
186
186
|
basename: basename(filename)
|
187
187
|
});
|
188
188
|
if(sourceMapFile.indexOf("[contenthash]") !== -1) {
|
189
189
|
sourceMapFile = sourceMapFile.replace(/\[contenthash\]/g, crypto.createHash("md5").update(sourceMapString).digest("hex"));
|
190
190
|
}
|
191
|
-
const sourceMapUrl = path.relative(path.dirname(file), sourceMapFile).replace(/\\/g, "/");
|
191
|
+
const sourceMapUrl = options.publicPath ? options.publicPath + sourceMapFile.replace(/\\/g, "/") : path.relative(path.dirname(file), sourceMapFile).replace(/\\/g, "/");
|
192
192
|
if(currentSourceMappingURLComment !== false) {
|
193
193
|
asset.__SourceMapDevToolData[file] = compilation.assets[file] = new ConcatSource(new RawSource(source), currentSourceMappingURLComment.replace(/\[url\]/g, sourceMapUrl));
|
194
194
|
}
|
@@ -11,6 +11,14 @@ class RequireIncludeDependency extends ModuleDependency {
|
|
11
11
|
this.range = range;
|
12
12
|
}
|
13
13
|
|
14
|
+
getReference() {
|
15
|
+
if(!this.module) return null;
|
16
|
+
return {
|
17
|
+
module: this.module,
|
18
|
+
importedNames: [] // This doesn't use any export
|
19
|
+
};
|
20
|
+
}
|
21
|
+
|
14
22
|
get type() {
|
15
23
|
return "require.include";
|
16
24
|
}
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "webpack",
|
3
|
-
"version": "3.
|
3
|
+
"version": "3.10.0",
|
4
4
|
"author": "Tobias Koppers @sokra",
|
5
5
|
"description": "Packs CommonJs/AMD modules for the browser. Allows to split your codebase into multiple bundles, which can be loaded on demand. Support loaders to preprocess files, i.e. json, jsx, es7, css, less, ... and your custom stuff.",
|
6
6
|
"dependencies": {
|