0

Running a pretty standard webpacvk-dev-server. Termial output shows the build runs fine, but nothing changes on the browser end.

I know there have been a bunch of questions on SO about this exact problem, but I've tried all the fixes there and none of them seem to be working.

Here's my config:

const PATHS = {
    app: path.resolve(__dirname, 'app'),
    bin: path.resolve(__dirname, 'app/bin'),
};

...

    output: {
        path: PATHS.bin,
        publicPath: 'bin/',
        filename: "bundle.min.js"
    }

...

const devConfig = {
    devtool: 'source-map',
    devServer: {
        hot: true,
        inline: true,
        progress: true,
        historyApiFallback: {
            index: path.resolve(PATHS.app, 'index.html'),
        },
        contentBase: PATHS.app,
        // Display only errors to reduce the amount of output.
        stats: 'errors-only',
        port: '8888',

    },
    plugins: basePlugins.concat(devPlugins),
};

When I run the standard webpack command it outputs to app/bin/bundle.min.js and I can load that from app/index.html.

It's probably a pathing issue with output.publicPath or something, but I've tried changing it to app/, and also changing output.path to PATHS.bin. Neither change anything.

banjo78910
  • 25
  • 3
  • What URL are you using in your browser? I've had issues before if I use a URL other than localhost:{port}/webpack-dev-server - it should have the little grey bar at the top of the page with the webpack status updates in (Ready/Building etc.) – jonifen Feb 24 '17 at 23:39
  • Just localhost:8888, which is what I've always used in webpack projects.I tried going to /webpack-dev-server and I had to click a link to get me to `http://localhost:8888/webpack-dev-server/bin/bundle.min`. That looks like it's hitting the bundle properly, but doesn't give me source maps. It also gets me that grey bar you described, but I've also never seen that before and I've been working successfully with wds for a few months now. – banjo78910 Feb 24 '17 at 23:48
  • You could try `webpack-dev-server -d` as per http://stackoverflow.com/questions/32296967/webpack-dev-server-doesnt-generate-source-maps - that looks like it would work for creating your sourcemaps. -- edit -- or you could try changing the `devtool: 'source-map'` line to use `devtool: '#inline-source-map'` instead... – jonifen Feb 24 '17 at 23:53

0 Answers0