Skip to content

Concatenated output is not emitted to html file after upgrade #74

Description

@Gopikrishna19

I am using webpack@4.x, html-webpack-plugin@3.2.0 and webpack-concat-plugin@3.0.0. I have two instances of the plugin concatenating different sets of js files. After upgrading to webpack 4 and respective 3.0.0 version, the plugin is building the assets but not injecting the script tags into the html document. Here is my config:

config.plugins = [
    new WebpackPluginConcat({       
        filesToConcat: appConfig.externals,
        name: 'externals'
    }),
    new WebpackPluginConcat({
        filesToConcat: appConfig.vendor,
        name: 'vendor'
    }),
    new WebpackPluginHtml({
        favicon: './src/img/favicon.ico',
        template: './src/index.html'
    }),
];

And the output html file:

<html>
    <head>
        <meta charset="UTF-8">
        <title>My Application</title>
    </head>
    <body>
        <main id="content"></main>
        <!-- Nothing inserted here after the upgrade -->
        <script src="bundle.js">
    </body>
</html>

Although I have files in the output directory:

+ public/
|
+-- bundle.js
+-- externals.js
+-- index.html
+-- vendor.js

The Changelog doesn't mention anything about migration after the upgrade. Am I missing something?

One thing I noticed was this warning from #68 and #73 in the log when building. Is there a mismatch may be between the html-webpack-plugin and this module?

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