I need to exclude from my build file ending/containing
.js.map
and
.js.uncompressed.js
I am trying using some regex with no success
ignore: function(t) {
return /\.js.map$/.test(t)
},
miniExclude: function(t) {
return /\.js.map$/.test(t)
}
I am using DOJO 1.10.
What am I doing wrong here?
var profile = function() {
return {
basePath: "../",
releaseDir: "dist",
releaseName: "build",
optimize: "closure",
action: "release",
layerOptimize: "closure",
copyTests: !1,
stripConsole: "all",
version: "ntv-0.0.0",
cssOptimize: "comments",
mini: !0,
staticHasFeatures: {
"dojo-trace-api": !1,
"dojo-log-api": !1,
"dojo-publish-privates": !1,
"dojo-sync-loader": !1,
"dojo-xhr-factory": !1,
"dojo-test-sniff": !1
},
resourceTags: {
amd: function(t) {
return /\.js$/.test(t)
},
ignore: function(t) {
return /\.js.map$/.test(t)
},
miniExclude: function(t) {
return /\.js.map$/.test(t)
}
},
packages: [{
name: "dojo",
location: "dojo"
}, {
name: "test",
location: "test"
}],
layers: {
"dojo/dojo": {
include: ["dojo/dojo"],
customBase: !0,
boot: !0
},
"test/c": {
include: ["test/c/c"],
customBase: !0,
boot: !1
},
"test/b": {
include: ["test/b/b"],
customBase: !0,
boot: !1
},
"test/a": {
include: ["test/a/a"],
customBase: !0,
boot: !1
}
}
}
}();
First of all, the word "exclude" used in the question isn't quite accurate. These are files that are generated by the build system - they're not files existing in the source to be excluded in the first place.
If you don't want the build to generate source maps, set
useSourceMaps: falsein your build profile.As for the
*.uncompressed.jsfiles, the build generates these automatically for any module or layer that it minifies. If you really don't want them in the build output, you'll need to remove them afterwards with a command like frank suggested in the comments.The reason both of these files are included ordinarily is to assist in debugging of built applications. Neither of these files will be downloaded by a browser during normal use; they will only be requested by developer tools.