Skip to content

Commit

Permalink
fix(source-inclusion): incorrect module ids on windows
Browse files Browse the repository at this point in the history
  • Loading branch information
EisenbergEffect committed Jul 22, 2016
1 parent 3708893 commit 24eb22a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/build/source-inclusion.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,13 +40,14 @@ exports.SourceInclusion = class {

addAllMatchingResources(loaderConfig) {
const vfs = require('vinyl-fs');

let bundler = this.bundle.bundler;
let root = path.resolve(bundler.project.paths.root, loaderConfig.path);
let pattern = path.resolve(bundler.project.paths.root, this.pattern);

var subsume = (file, cb) => {
let moduleId = path.join(loaderConfig.name, file.path.replace(root, ''));
moduleId = moduleId.replace(/\\/g, '/');
let ext = path.extname(moduleId);
let item = new BundledSource(bundler, file);
item.moduleId = moduleId.substring(0, moduleId.length - ext.length);
Expand Down

0 comments on commit 24eb22a

Please sign in to comment.