Skip to content

Commit

Permalink
chore(all): prepare release 2.0.0-rc.5
Browse files Browse the repository at this point in the history
  • Loading branch information
EisenbergEffect committed Aug 27, 2017
1 parent f09f5c0 commit 5177bb3
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 8 deletions.
20 changes: 13 additions & 7 deletions dist/PreserveModuleNamePlugin.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,19 +27,25 @@ class PreserveModuleNamePlugin {
modulesBeforeConcat.splice(i--, 1, ...m["modules"]);
}
for (let module of getPreservedModules(modules)) {
let preserve = module[exports.preserveModuleName];
// Even though it's imported by Aurelia, it's still possible that the module
// became the _root_ of a ConcatenatedModule.
// We use `constructor.name` rather than `instanceof` for compat. with Webpack 2.
let realModule = module;
if (module.constructor.name === "ConcatenatedModule")
realModule = module["rootModule"];
let preserve = realModule[exports.preserveModuleName];
let id = typeof preserve === "string" ? preserve : null;
// No absolute request to preserve, we try to normalize the module resource
if (!id && module.resource)
id = fixNodeModule(module, modulesBeforeConcat) ||
makeModuleRelative(roots, module.resource) ||
aliasRelative(alias, module.resource);
if (!id && realModule.resource)
id = fixNodeModule(realModule, modulesBeforeConcat) ||
makeModuleRelative(roots, realModule.resource) ||
aliasRelative(alias, realModule.resource);
if (!id)
throw new Error(`Can't figure out a normalized module name for ${module.rawRequest}, please call PLATFORM.moduleName() somewhere to help.`);
throw new Error(`Can't figure out a normalized module name for ${realModule.rawRequest}, please call PLATFORM.moduleName() somewhere to help.`);
// Remove default extensions
normalizers.forEach(n => id = id.replace(n, ""));
// Keep "async!" in front of code splits proxies, they are used by aurelia-loader
if (/^async[?!]/.test(module.rawRequest))
if (/^async[?!]/.test(realModule.rawRequest))
id = "async!" + id;
id = id.replace(/\\/g, "/");
if (module.meta)
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "aurelia-webpack-plugin",
"version": "2.0.0-rc.4",
"version": "2.0.0-rc.5",
"description": "A plugin for webpack that enables bundling Aurelia applications.",
"keywords": [
"aurelia",
Expand Down

0 comments on commit 5177bb3

Please sign in to comment.