user593029
user593029

Reputation: 521

Angular4 + Webpack : opens file location

I am running Angular4 Webpack starter boilerplate code available on github (location => https://github.com/AngularClass/angular-starter).

On running application using "npm start" command, application instead of opening http://localhost:3000 browser opens up with file location http://c/Users/Public/. Also I see below confusing statement (see last 2 lines "Content not from webpack**" & "404s will fallback**") on my console

Not sure why webpack is opening file location & how ambiguity in the log can be resolved. (Please note if I type manually in http://localhost:3000 example do work.)

    10% building modules 2/2 modules 0 active
    Project is running at http://C:\Users\Public/
    webpack output is served from /
    Content not from webpack is served from C:\wrksp\code\AngularTS\WebpackStarter\src
    404s will fallback to /index.html

Upvotes: 0

Views: 298

Answers (1)

BogdanC
BogdanC

Reputation: 2784

Delete the following lines on config/webpack.dev.js:

const PUBLIC = process.env.PUBLIC || undefined;

public: PUBLIC,

public: METADATA.public,

and it will work.

You can find the issue reported here

Upvotes: 2

Related Questions