Skip to content

Commit e808452

Browse files
randyaajelbourn
authored andcommitted
fix(release): make resource-inlining regex non-greedy (#653)
Change the template regex to support minified js files. This partially addresses inlining resources for an angular-cli prod build. (cherry picked from commit ba47c8d)
1 parent 4bee178 commit e808452

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

scripts/release/inline-resources.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ for (let arg of process.argv.slice(2)) {
6262
* @return {string} The content with all templates inlined.
6363
*/
6464
function inlineTemplate(filePath, content) {
65-
return content.replace(/templateUrl:\s*'([^']+\.html)'/g, function(m, templateUrl) {
65+
return content.replace(/templateUrl:\s*'([^']+?\.html)'/g, function(m, templateUrl) {
6666
const templateFile = path.join(path.dirname(filePath), templateUrl);
6767
const templateContent = fs.readFileSync(templateFile, 'utf-8');
6868
const shortenedTemplate = templateContent

0 commit comments

Comments
 (0)