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

10th
Sep 2016
Ajay Kumar
@ajayak
Sep 10 2016 05:07
Is there any sample app using webpack to build nodejs server code written in typescript including tests?
Marinho Brandão
@marinho
Sep 10 2016 11:00

hey! I am currently porting an RC4 based project to RC6, first updating for RC5 in baby steps. So, I'm updating first from commit @4cf99473 to @c5b94a4a basing on Github compare ( https://github.com/AngularClass/angular2-webpack-starter/compare/4cf99473...c5b94a4a ).

The new version uses Webpack 2 (and TS 2, but this is was already in my package.json).

My problem: after ported, it complains it cannot find a certain file in a generatedfolder. I'm not sure if that happens by tsc or webpack, but the message is this:

Module build failed: Error: Can't resolve 'apis/myclient' in '/project/src/app'

my tsconfig.json has:

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

my webpack.common.js has:

...
    resolve: {
        extensions: ['', '.ts', '.js', '.json', '.scss'],
        root: helpers.root('src'),
        modulesDirectories: ['node_modules', 'generated'],
    },
...

so, in theory, both are correct for my needs.

Anyone knows what it could be?