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 unable to find ES6 modules after a rename/move/delete #311

Closed
mtfurlan opened this issue Feb 23, 2017 · 3 comments
Closed

Webpack unable to find ES6 modules after a rename/move/delete #311

mtfurlan opened this issue Feb 23, 2017 · 3 comments

Comments

@mtfurlan
Copy link

If I move or rename a module, webpack throws errors about how it can't find the moved module.

[at-loader] src/app/event/event-detail/event-detail.service.ts:3:29 
    TS2307: Cannot find module './event-detail'.

In this example, src/app/event/event-detail/event-detail.service.ts and src/app/event/event-detail/event-detail.ts were moved or deleted.

It seems like this may just be an issue with webpack, but I don't find this issue in a few different searches so I'm wondering if it's an issue with this seed.

How should I go about debugging this? It's not reasonable to have to restart webpack every time I check out a different branch.

@Foxandxss
Copy link
Member

Restarting webpack after moving different branches sounds reasonable to me. Now, if that were happening say after a copy and paste, sounds more weird.

@mtfurlan
Copy link
Author

Well, if I just delete a module that isn't used yet with rm, it still happens. Checking out a new branch is just the use case I hit more.

@mcescalante
Copy link
Contributor

There is a (new) discussion in the webpack-cli issues about if "watching" a webpack config file for changes and reloading it should be added as a feature: webpack/webpack-cli#15

Until then, using the "nodemon trick" to restart webpack-dev-server after a file change will work fine. See here for that trick: webpack/webpack-dev-server#440 (comment)

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