webpack - weird console messages (output served, 404s will fallback, content not from webpack is served ... etc.)

11.4k Views Asked by At

After bundling in development mode, I get these messages in console:

webpack output is served from /
i 「wds」: Content not from webpack is served from C:\projectName\dist
i 「wds」: 404s will fallback to /index.html

In webpack.dev.config.js I have:

output: {
    path: path.resolve(__dirname, 'dist'),
    filename: '[name].bundle.js'
},
devtool: 'inline-source-map',
devServer: {
      contentBase: path.join(__dirname, 'dist'),
      disableHostCheck: true,
      hot: true,
      open: true,
      historyApiFallback: true,
      port: 8081
  },

Can someone explain these messages? When I check sources in console, after launching app, I have these files:

enter image description here

Is everything ok here?

1

There are 1 best solutions below

0
On

I would like to know if everything worked fine in the browser or not? I have the same issue so I changed my output key in the webpack.config.js like following:

output: {
        path: __dirname + '/dist',
        filename: 'bundle.js'
    },

but I still get the following thingy in terminal whenever I run npm run start

ℹ 「wds」: Project is running at http://localhost:8080/
ℹ 「wds」: webpack output is served from /
ℹ 「wds」: Content not from webpack is served from ./dist

So I can't see bundle.js file anywhere, either in my ./dist folder or anywhere else but everything works in the browser with out the console giving any errors

We will be able to see the bundle.js file appearing in the ./dist folder when we build the whole app with something like npm run build. It won't appear in the development phase.