PatrickJS-starter icon indicating copy to clipboard operation
PatrickJS-starter copied to clipboard

Changes not being emitted

Open sky-coding opened this issue 10 years ago • 9 comments

  • I'm submitting a ... [x ] bug report [ ] feature request [ ] question about the decisions made in the repository
  • What is the current behavior? Running webpack or the webpack-dev-server will detect changed files a single time and successfully updates the browser. Subsequent changes trigger a webpack run, but no files are emitted and the browser reports "No Changes". Tried hot mode, normal mode, and every variation of config possible. I'm running Windows 10, and I confirmed that the bug is also present on another machine running Mac OS.

I pulled commit afadc3b7e00fc0a06b4bf9f3ed85bbf41f620f09 and webpack behaves as expected and successfully picks up changes. I expect something has changed in the config between then and now. I will continue to investigate but wanted to start tracking this now.

sky-coding avatar Jun 28 '16 00:06 sky-coding

This problem first occurs in f8698cf2ce16f4293987116910df6d42c8fd4f03 with the introduction of angular2-template-loader, and specifically, the "useWebpackText": true option being set in tsconfig.json. Upgrading awesome-typescript-loader from ^0.17.0 to 2.0.0-rc.17 on master branch resolves this problem, but introduces multiple non-breaking errors, Invalid module name in augmentation, module '../../Observable' cannot be found.

sky-coding avatar Jun 28 '16 01:06 sky-coding

so is this an issue with angular2-template-loader? cc @TheLarkInn

PatrickJS avatar Jun 28 '16 01:06 PatrickJS

@gdi2290 @sky-coding I have been working with @s-panferov in regards to catching new issues from the RC's. I haven't pulled down your changes @gdi2290 from when you added angular2-template-loader. I would also submit an issue to awesome-typescript-loader in regards to the Invalid module name error.

TheLarkInn avatar Jun 28 '16 01:06 TheLarkInn

@gdi2290 I believe version 0.17.0 of awesome-typescript-loader is the cause of the issue. I wouldn't think angular2-template-loader is involved since updating awesome-typescript-loader alone resolves the issue on master. There were build errors related to angular2-template-loader when I was fiddling with fixing f8698cf2ce16f4293987116910df6d42c8fd4f03, but I don't think they were related to the main issue here.

sky-coding avatar Jun 28 '16 01:06 sky-coding

I created an issue https://github.com/s-panferov/awesome-typescript-loader/issues/179. I might have to switch to ts-loader until typescript 2 is out

PatrickJS avatar Jun 28 '16 02:06 PatrickJS

Thanks for looking into this.

Using 1.1.1 of awesome-typescript-loader also resolves my issue, and does not introduce the same errors as 2.0.0-rc.17... so we'll be using 1.1.1 for the forseeable future.

@TheLarkInn Another interesting bug I found is that including a space after templateUrl, e.g. templateUrl : './home.template.html' instead of templateUrl: './home.template.html' causes the router to throw Failed to load about.template.html at runtime.

sky-coding avatar Jun 28 '16 02:06 sky-coding

can you create an issue in angular2-template-loader and mention this issue

PatrickJS avatar Jun 28 '16 03:06 PatrickJS

Sure thing, I realize it's not directly related but both issues were obstacles today while trying to get buy-in to use your awesome seed project. Thanks for pointing me to the correct repo, and for all of your hard work on this project!!

sky-coding avatar Jun 28 '16 05:06 sky-coding

alright I updated to 1.1.1 https://github.com/AngularClass/angular2-webpack-starter/commit/c8a582bcfea90bbd472f1245280433a35a1f7912

PatrickJS avatar Jun 28 '16 15:06 PatrickJS