Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix inline-resources regex so it can find references in a component's minified js #653

Merged
merged 1 commit into from
Jun 8, 2016

Conversation

randyaa
Copy link
Contributor

@randyaa randyaa commented Jun 8, 2016


Overview

Modify the regex used to identify and replace templateUrl references so that it's not greedy. This means that components can be included in a bundle and the resources can still be inlined.

Changes

  • modified the regex /templateUrl:\s*'([^']+\.html)'/g to include the greedy modifier resulting in /templateUrl:\s*'([^']+?\.html)'/g

Additional Notes

  • bundled components will still have resource references that are relative to the directory the component started in. For this reason any components that don't exist in the same directory as the bundle will throw errors about not being able to find the reference resource.

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)
@googlebot googlebot added the cla: yes PR author has agreed to Google's Contributor License Agreement label Jun 8, 2016
@jelbourn
Copy link
Member

jelbourn commented Jun 8, 2016

LGTM

@jelbourn jelbourn merged commit e808452 into angular:master Jun 8, 2016
@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Sep 6, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
cla: yes PR author has agreed to Google's Contributor License Agreement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants