shellscape/webpack-manifest-plugin

manifest.json generated with wrong filename

Mukhametvaleev opened this issue · 1 comments

Webpack config:

const path = require('path');

const { WebpackManifestPlugin } = require('webpack-manifest-plugin');
const { CleanWebpackPlugin } = require('clean-webpack-plugin');

module.exports = {
    context: path.resolve(__dirname, 'src'),
    entry: ['./index.tsx'],
    mode: 'development',
    module: {
        rules: [
            {
                exclude: /node_modules/,
                test: /\.(ts|tsx)?$/,
                use: ['babel-loader', 'ts-loader'],
            },
        ],
    },
    plugins: [new CleanWebpackPlugin(), new WebpackManifestPlugin()],
    resolve: {
        extensions: ['.ts', '.tsx', '.js'],
    },
    output: {
        path: path.resolve(__dirname, 'static/frontend/'),
        filename: '[name].[hash].js',
    },
};

Expected Behavior

{ "main.js": "main.6b7fd6ac2fd4fec33833.js" }

Actual Behavior

{ "main.js": "automain.6b7fd6ac2fd4fec33833.js" }

Weird "auto" prefix in filename as publicPath.

Duplicate of #229. Please search issues before creating new ones.