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

AngularCompilerPlugin doesn't take input from previous loaders #9559

Closed
Necroskillz opened this issue Feb 8, 2018 · 3 comments
Closed

AngularCompilerPlugin doesn't take input from previous loaders #9559

Necroskillz opened this issue Feb 8, 2018 · 3 comments
Labels
area: @ngtools/webpack feature Issue that requests a new feature
Milestone

Comments

@Necroskillz
Copy link

Versions

"@ngtools/webpack": "^1.9.8"

Repro steps

  • Have multiple loaders in webpack.config that are executed before @ngtools/webpack. e.g.
{
   test: /\.ts$/,
   loader: ['@ngtools/webpack', 'ts-nameof-loader']
}
  • Use AngularCompilerPlugin.
new AngularCompilerPlugin({
     tsConfigPath: 'app/tsconfig.json',
     mainPath: helpers.root('app/main.ts'),
     skipCodeGeneration: false
})
  • Run webpack

Observed behavior

The loaders before @ngtools/webpack are executed, but sinse AngularCompilerPlugin ignores the source parameter that was passed in, and instead loads the content directly from the file, any preprocessing done by previous loaders is ignored. The AotPlugin has some special handling for this case.

Desired behavior

Input from loaders that are executed before @ngtools/webpack is considered.

Mention any other details that might be useful (optional)

Maybe I'm missing something, and this scenario is not supposed to supported. But it worked before and we have some code depending on this. If that's the case, please let me know if there any supported way to have this working.

@filipesilva filipesilva added the feature Issue that requests a new feature label Feb 20, 2018
@filipesilva
Copy link
Contributor

This is indeed something we don't support right now. This is similar, but not the same, as #9089. There's some background on that issue about why this is hard.

@alan-agius4
Copy link
Collaborator

Thanks for reporting this issue. Luckily, it has already been fixed in one of the recent releases. Please update to the most recent version to resolve the problem.

If the problem persists in your application after upgrading, please open a new issue, provide a simple repository reproducing the problem, and describe the difference between the expected and current behavior. You can use ng new repro-app to create a new project where you reproduce the problem.

@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Feb 25, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area: @ngtools/webpack feature Issue that requests a new feature
Projects
None yet
Development

No branches or pull requests

4 participants