mirror of https://github.com/webpack/webpack.git
feat(app): Fix merge conflict
This commit is contained in:
commit
6d1d9afe58
|
@ -5,4 +5,5 @@
|
|||
/benchmark/fixtures
|
||||
/examples/*/js
|
||||
/coverage
|
||||
.DS_Store
|
||||
.DS_Store
|
||||
*.log
|
||||
|
|
|
@ -97,6 +97,7 @@ Please see [Using Loaders](http://webpack.github.io/docs/using-loaders.html) for
|
|||
**styling**
|
||||
* [`style`](https://github.com/webpack/style-loader): Add exports of a module as style to DOM
|
||||
* [`css`](https://github.com/webpack/css-loader): Loads css file with resolved imports and returns css code
|
||||
* [`cssnext`](https://github.com/cssnext/cssnext-loader): Loads and compiles a css file using [cssnext](http://cssnext.io/)
|
||||
* [`less`](https://github.com/webpack/less-loader): Loads and compiles a less file
|
||||
* [`sass`](https://github.com/jtangelder/sass-loader): Loads and compiles a scss file
|
||||
* [`stylus`](https://github.com/shama/stylus-loader): Loads and compiles a stylus file
|
||||
|
|
|
@ -66,6 +66,19 @@ ModuleFilenameHelpers.createFilename = function createFilename(module, moduleFil
|
|||
var allLoaders = getBefore(identifier, "!");
|
||||
var query = getAfter(resource, "?");
|
||||
var resourcePath = resource.substr(0, resource.length - query.length);
|
||||
if(typeof moduleFilenameTemplate === "function") {
|
||||
return moduleFilenameTemplate({
|
||||
identifier: identifier,
|
||||
shortIdentifier: shortIdentifier,
|
||||
resource: resource,
|
||||
resourcePath: resourcePath,
|
||||
absoluteResourcePath: absoluteResourcePath,
|
||||
allLoaders: allLoaders,
|
||||
query: query,
|
||||
moduleId: moduleId,
|
||||
hash: hash
|
||||
});
|
||||
}
|
||||
return (moduleFilenameTemplate
|
||||
.replace(ModuleFilenameHelpers.REGEXP_ALL_LOADERS_RESOURCE, identifier)
|
||||
.replace(ModuleFilenameHelpers.REGEXP_LOADERS_RESOURCE, shortIdentifier)
|
||||
|
|
|
@ -0,0 +1,9 @@
|
|||
it("should include test.js in SourceMap", function() {
|
||||
var fs = require("fs");
|
||||
var source = fs.readFileSync(__filename + ".map", "utf-8");
|
||||
var map = JSON.parse(source);
|
||||
map.sources.should.containEql("dummy:///./test.js");
|
||||
});
|
||||
|
||||
require.include("./test.js");
|
||||
|
|
@ -0,0 +1,14 @@
|
|||
module.exports = {
|
||||
output: {
|
||||
lineToLine: true,
|
||||
devtoolModuleFilenameTemplate: function(info) {
|
||||
return "dummy:///" + info.resourcePath;
|
||||
}
|
||||
},
|
||||
node: {
|
||||
__dirname: false,
|
||||
__filename: false
|
||||
},
|
||||
devtool: "cheap-source-map"
|
||||
|
||||
};
|
Loading…
Reference in New Issue