Skip to content

use webPack watch mode and the terminal always outputs logs between two hashes, although nothing has changed about files #163

@imjeen

Description

@imjeen

Added the [email protected] plugin for webpack config , and got the problem.

Redo

step 1. webpack --config webpack.dll.babel.js --progress
step 2. webpack --config webpack.build.babel.js --watch --progress

and the terminal logs always changed between two kinds of logs, but the files not be modified.

config

below was basic config:

/** webpack.dll.babel.js */
export default {
    entry: {
        common: [
            '@babel/polyfill',
            'es6-promise',
            'vue',
            // ....
        ]
    },
    output: {
        path: path.resolve(__dirname, '../dist'),
        filename: 'manifest/[name].dll.js?[chunkhash]',
        library: '[name]',
    },
    plugins: [
        new webpack.DllPlugin({
            context: '.',
            name: '[name]',
            path: path.resolve(__dirname, `../dist/manifest/[name].dll.json`),
        }),
    ],
}


/** webpack.build.babel.js */
export default {
    entry: {
        main: path.resolve(__dirname, '../app/main.js'),
    },

    output: {
        path: path.resolve(__dirname, '../dist'),
        filename: `js/[name].js?[hash]`,
        chunkFilename: `js/[name].js?[hash]`
    },

    plugins: [
        new webpack.DllReferencePlugin({
            context: '.',
            manifest: require(path.resolve(
                __dirname,
                `../dist/manifest/common.dll.json`,
            )),
        }),
        new HtmlWebpackPlugin({
            template: path.resolve(__dirname, '../app/index.template.html'),
            filename: 'index.html',
        }),
        new AddAssetHtmlPlugin({
            hash: true,
            publicPath: 'manifest/',
            outputPath: 'manifest/',
            filepath: path.resolve(__dirname, '../dist/manifest/*.dll.js'),
        }),
    ],
};

devDependencies

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions