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

CLI Builtin bundler infinite loop #1049

Closed
airboss001 opened this Issue Feb 15, 2019 · 1 comment

Comments

Projects
None yet
2 participants
@airboss001
Copy link

airboss001 commented Feb 15, 2019

I'm submitting a bug report

  • Library Version:
    aurelia-cli v1.0.0-beta.13

Please tell us about your environment:

  • Operating System:
    Windows 10

  • Node Version:
    v8.11.1

  • NPM Version:
    6.4.0

  • Language:
    TypeScript

  • Loader/bundler:
    BuiltIn - Alameda

Current behavior:
See this discourse for context:
https://discourse.aurelia.io/t/aurelia-cli-built-in-bundler-recreating-the-dist-folder-for-deployments/2271/9

When moving application files to a distribution directory as webpack did (dist) and using copyFiles to move the index.html, script folder, and other resources when using 'au run --watch' the watcher goes into an infinite rebuild loop on changing any file with the following message:

[08:42:30] index.html was changed
Watcher: Adding path index.html to pending build changes...
Watcher: Running file copy tasks on next build...
Starting 'readProjectConfiguration'...
Finished 'readProjectConfiguration'
Starting 'copyFiles'...
Finished 'copyFiles'
Starting 'writeBundles'...
INFO [Bundler] Tracing files ...
INFO [Bundle] Updated file name for vendor-bundle in index.html
Finished 'writeBundles'
Refreshing the browser
[08:42:30] index.html was changed
Watcher: Adding path index.html to pending build changes...
Watcher: Running file copy tasks on next build...
Starting 'readProjectConfiguration'...
Finished 'readProjectConfiguration'
Starting 'copyFiles'...
Finished 'copyFiles'
Starting 'writeBundles'...
INFO [Bundler] Tracing files ...
INFO [Bundle] Updated file name for vendor-bundle in index.html
Finished 'writeBundles'
Refreshing the browser

There are no actual updates being done to the index.html file during this loop as the builtin bundler is not adding a build number to the bundle name.

The work around is to remove the index.html file from copyFiles and just remember to restart 'au run' if that is change currently.

@khuongduybui

This comment has been minimized.

Copy link
Contributor

khuongduybui commented Feb 15, 2019

Clarification: I blacklist index.html in watch

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.