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

Bundler does not support updating revisions on scripts without quotes on src attribute #639

Closed
AustinBrunkhorst opened this issue Jun 4, 2017 · 0 comments

Comments

@AustinBrunkhorst
Copy link
Contributor

I'm submitting a bug report

  • Library Version:
    0.29.0

Please tell us about your environment:

  • Operating System:
    Windows 10

  • Node Version:
    6.9.5

  • NPM Version:
    5.0.2
  • Browser:
    all

  • Language:
    all

Current behavior:
The bundler is unable to match <script> src attribute without quotes while attempting to update revisioned bundles.

Given a minified index.html:

<script src=bundles/core.js data-main=aurelia-bootstrapper></script>

CLI outputs:

Error: Unable to update core path to bundles/core-a2ff804d88.js, could not find existing reference to replace

Expected/desired behavior:

  1. Configure the CLI to revision bundles with the following configuration in aurelia.json
{
  // ...
  "build": {
    // ...
    "options": {
      // ...
      "rev": true
    }
  }
}
  1. Include a bundle without quotes around the src attribute in your platform index.html
  • What is the expected behavior?
    The bundler should be able to replace revisioned script paths without quotes on the src attribute.

  • What is the motivation / use case for changing the behavior?
    I would like to feed the bundler a minified index.html

AustinBrunkhorst added a commit to AustinBrunkhorst/cli that referenced this issue Jun 4, 2017
Fixes aurelia#639

Makes the capture groups optional for single/double quotes in the source file regular expression.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants