preboot / angular-webpack

A complete, yet simple, starter for Angular v2+ using webpack
MIT License
1.29k stars 557 forks source link

Since latest version, direct links don't work anymore #204

Closed kristof-mattei closed 8 years ago

kristof-mattei commented 8 years ago

How to reproduce:

git clone repo.git my-app
cd my-app
npm install
npm run start:hmr # or npm run start

Now navigate to http://localhost:8080/about. Doesn't work.

Navigating from http://localhost:8080/, and clicking About on top does work.

If we check what gets offered by the webserver, we can clearly see that for http://localhost:8080/about there are no scripts.

Foxandxss commented 8 years ago

Weird. I will investigate.

allanharris commented 8 years ago

Route like this should be somewhere in serving (nodejs) code:

    // Angular routes support
    app.use("*", function (req, res) {
        res.sendFile(path.join(__dirname, "../public/index.html"));
    });
Foxandxss commented 8 years ago

The problem is the dev server. I reported it here https://github.com/webpack/webpack-dev-server/issues/640

Foxandxss commented 8 years ago

I reverted to beta 5 which works. As soon as the bug gets fixed, I updated the server again.