These are chat archives for AngularClass/angular2-webpack-starter

14th
Sep 2016
Marinho Brandão
@marinho
Sep 14 2016 10:13

hi guys, I just upgraded to webpack2, reflecting updates from angular2-webpack-start in master branch (from RC4 to RC6: e53e69f...master). Suddenly after that, imports pointing to a folder I have for generated code don't find files anymore.

Giving a bit of context, the generated folder has only generated code and is visible through both tsconfig.json and webpack.common.js configurations, respectively:

"paths": {
        "*": [
            "./src/*",
            "./generated/*"
        ]
    },

and

resolve: {
      ...
      // remove other default values
      modulesDirectories: ['node_modules', 'generated'],
    },

tsc still find the files correctly, but the browser doesn't.

do you guys know what can be missing?

Jacques Alberts
@Skaapie
Sep 14 2016 10:53

Hi guys,
New to Angular2 and TypeScript.
Just picked this up and wasn't sure if it is an issue(not a bug or anything):
In the file located at '../src/app/+detail/index.ts'
should:

export default class AboutModule {
  static routes = routes;
}

not be:

export default class DetailModule {
  static routes = routes;
}

?

Marinho Brandão
@marinho
Sep 14 2016 12:13
well, I solved my issue by adding an alias, as below:
    resolve: {
      extensions: ['', '.ts', '.js', '.json', '.scss'],
      root: helpers.root('src'),
      alias: {
          apis: path.resolve(__dirname, '../generated/apis')
      },
      modulesDirectories: ['node_modules'],
    },
Abhishek Srivastava
@abhilive
Sep 14 2016 13:59
Guys!!, Going to start with node & expressJs. I want to save my angular2 form data using services. Any reference link ?