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

Webpack is not watching my changes in a new directory. #857

Closed
bfwg opened this issue Aug 14, 2016 · 2 comments
Closed

Webpack is not watching my changes in a new directory. #857

bfwg opened this issue Aug 14, 2016 · 2 comments

Comments

@bfwg
Copy link

bfwg commented Aug 14, 2016

I'm submitting a question about the decisions made in the repository

I create a new directory called services under app:

app/
    services/
        some-service.ts
        index.ts

Added to index.ts

export * from './services';
export * from './app.component';
export * from './app.service';
export * from './app.routes';

import { AppState } from './app.service';

// Application wide providers
export const APP_PROVIDERS = [
  AppState,
];

Every time I make a change in some-service.ts, webpack-dev-server will restart, but the changes will not get picked up.

Only compilation errors not updated on change. Like:

   Property 'callback' does not exist on type '{}'.
   Supplied parameters do not match any signature of call target.

I have to manually shutdown and restart dev-server to recompile.

@IAMtheIAM
Copy link

Post more of your typescript code as well as full error details for us to diagnose. It's not enough info to give an accurate answer yet. I was able to add a new services directory with no problem.

@bfwg
Copy link
Author

bfwg commented Sep 1, 2016

Here is some more code:

@Component({
  selector: 'test',
  providers: [
  ],
  directives: [],
  pipes: [],
  template: `
    <div class="abc">
       abc
    </div>
  `,
  styles: [
    .abc {
       width: '20%',
       margin: '10px'
    }
  ]
})

I worte the styles in a wrong way, and here are the errors.

[default] /Users/sss/code/asdfkj/src/test.component.ts:19:5
    Expression or comma exected.
[default] /Users/sss/code/asdfkj/src/test.component.ts:19:6
    Cannot find name 'abc'
[default] /Users/sss/code/asdfkj/src/test.component.ts:19:10
    ',' expected.

I correct it by changing the style to

  styles: [`
    .abc {
      width: '20%';
      margin: '10px;
    }
  `]

Webpack pickup my change and reload. But the same errors appear again.
I only gose away if I ctrl+c stop webpack and restart it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants