Skip to content
This repository was archived by the owner on Aug 7, 2021. It is now read-only.

refactor: Refactor moduleId: __filename to moduleId: module.id #337

Merged
merged 1 commit into from
Dec 12, 2017

Conversation

PanayotCankov
Copy link
Contributor

The angular 5 framework will typecheck the moduleId is a string,
while in webpack scenarios the moduleId is ignored and relative paths
are handled by the angular compiler and the webpack loaders,
module.id is number and fails the typeschecks.

Implemented a loader that will strip the moduleId: module.id when
compiled with webpack, the moduleId: module.id is still necessary for development without webpack.

As a reminder if we manage to setup webpack for watch and debug,
we can recommend removing all moduleId: module.id occurences and delete the loader.

);

if (source != noModuleIdsSource) {
console.log("Before:\n\n" + source + "\n\nAfter:\n\n" + noModuleIdsSource + "\n\n");
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't. Just don't! :D this console.log is a leftover.

…ment compat loader for webpack

The angular 5 framework will typecheck the moduleId is a string,
while in webpack scenarios the moduleId is ignored and relative paths
are handled by the angular compiler and the webpack loaders,
module.id is number and fails the typeschecks.

Implemented a loader that will strip the moduleId: module.id when
compiled with webpack, the moduleId: module.id is still necessary for development without webpack.

As a reminder if we manage to setup webpack for watch and debug,
we can recommend removing all moduleId: module.id occurences and delete the loader.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants