sonicoder86 / angular2-aot-webpack

Angular AOT (Ahead Of Time) offline compilation example with Webpack
https://blacksonic.github.io/angular2-aot-webpack/
312 stars 51 forks source link

Absolute path not working #46

Open opiepj opened 7 years ago

opiepj commented 7 years ago

Having an issue with using absolute path's

in main.module:

import { HelloWorldComponent } from 'src/app/components/hello-world.component';

getting: UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 2): Error: Unexpected value 'HelloWorldComponent' declared by the module 'MainModule'

Thoughts?

sonicoder86 commented 7 years ago

@opiepj Why would you use it without relative path?

opiepj commented 7 years ago

To avoid situations like:

import { HelloWorldComponent } from '../../../../components/hello-world.component';
sonicoder86 commented 7 years ago

@opiepj Can you show Webpack configurations where it works?

opiepj commented 7 years ago

@blacksonic Was able to do it with https://github.com/AngularClass/angular2-webpack-starter

sonicoder86 commented 7 years ago

What is the difference between the two configurations that makes it possible?

alvaro9210 commented 7 years ago

@opiepj How did you solve this?!