You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Came across an subtle bug while setting up a config.
config.buildPathToModuleIndex stores the module paths 'as-is' from the strings in the build.js file, but it looks like it doesn't normalise the path. This causes issues if ../ or ./ is used in the build.js file path
The common.js absolute file path that you get from globbing etc. ( /dev/requirejs-example-multipage-shim-withbower/www-built/js/common.js ) will never match this path so optimizing steps that depend on this will not be performed.
The bug came up when I was looking at the uglify step, as common.js was never uglified. Sorry I can't do a pull request (deadlines!) at the moment but it should just need a path.normalize on the config paths before they're stored in buildPathToModuleIndex.
The text was updated successfully, but these errors were encountered:
Came across an subtle bug while setting up a config.
config.buildPathToModuleIndex
stores the module paths 'as-is' from the strings in the build.js file, but it looks like it doesn't normalise the path. This causes issues if../
or./
is used in the build.js file pathFor example,
build.js
module config isthen the
buildPathToModuleIndex
is :The common.js absolute file path that you get from globbing etc. ( /dev/requirejs-example-multipage-shim-withbower/www-built/js/common.js ) will never match this path so optimizing steps that depend on this will not be performed.
The bug came up when I was looking at the uglify step, as common.js was never uglified. Sorry I can't do a pull request (deadlines!) at the moment but it should just need a
path.normalize
on the config paths before they're stored inbuildPathToModuleIndex
.The text was updated successfully, but these errors were encountered: