Skip to content

Commit

Permalink
fixes rxaviers#7
Browse files Browse the repository at this point in the history
initial changes to get webpack to complete successfully
  • Loading branch information
aruberto committed Jan 19, 2016
1 parent 437c800 commit 8b7268a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion GlobalizeCompilerHelper.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ GlobalizeCompilerHelper.prototype.createCompiledDataModule = function(request) {
};

GlobalizeCompilerHelper.prototype.getModuleFilepath = function(request) {
return path.join(this.tmpdir, request.replace(/.*!/, "").replace(/[/?" ]/g, "-"));
return path.join(this.tmpdir, request.replace(/.*!/, "").replace(/[\/\\?" :]/g, "-"));
};

GlobalizeCompilerHelper.prototype.compile = function(locale, request) {
Expand Down
8 changes: 4 additions & 4 deletions ProductionModePlugin.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,13 +45,13 @@ ProductionModePlugin.prototype.apply = function(compiler) {

compiler.apply(
// Skip AMD part of Globalize Runtime UMD wrapper.
globalizeSkipAMDPlugin = new SkipAMDPlugin(/(^|\/)globalize($|\/)/),
globalizeSkipAMDPlugin = new SkipAMDPlugin(/(^|[\/\\])globalize($|[\/\\])/),

// Replaces `require("globalize")` with `require("globalize/dist/globalize-runtime")`.
new NormalModuleReplacementPlugin(/(^|\/)globalize$/, "globalize/dist/globalize-runtime"),
new NormalModuleReplacementPlugin(/(^|[\/\\])globalize$/, "globalize/dist/globalize-runtime"),

// Skip AMD part of Globalize Runtime UMD wrapper.
new SkipAMDPlugin(/(^|\/)globalize-runtime($|\/)/)
new SkipAMDPlugin(/(^|[\/\\])globalize-runtime($|[\/\\])/)
);

// Map each AST and its request filepath.
Expand Down Expand Up @@ -89,7 +89,7 @@ ProductionModePlugin.prototype.apply = function(compiler) {
// 1: Removes the leading and the trailing `/` from the regexp string.
globalizeSkipAMDPlugin.requestRegExp = new RegExp([
globalizeSkipAMDPlugin.requestRegExp.toString().slice(1, -1)/* 1 */,
compiledDataFilepath
compiledDataFilepath.replace(/(?=[\/\\^$*+?.()|{}[\]])/g, "\\")
].join("|"));

// Replace require("globalize") with require(<custom precompiled module>).
Expand Down

0 comments on commit 8b7268a

Please sign in to comment.