Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
Gopikrishna19 opened this issue Apr 15, 2019 · 5 comments
Open

Comments

@Gopikrishna19
Copy link

Gopikrishna19 commented Apr 15, 2019

I am using [email protected], [email protected] and [email protected]. 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?

@Gopikrishna19
Copy link
Author

Gopikrishna19 commented Apr 15, 2019

@hxlniada I added a sample repository to replicate the issue as well: https://github.com/Gopikrishna19/webpack-concat-plugin-test

@Gopikrishna19
Copy link
Author

Gopikrishna19 commented Apr 17, 2019

Did some digging to try and fix the problem on my own, and ended up something similar to @Jorybraun's PR #71. Any plan on merging that PR? Is it waiting for html-webpack-plugin v4?

I believe current v3.0.0 of webpack-concat-plugin is not production ready and #71 is compatible with current [email protected]. It would be great if that can be merged and get the master production ready and then await the html-webpack-plugin's release.

Please let me know what you guys think

@Jorybraun
Copy link

Jorybraun commented Apr 17, 2019

@Gopikrishna19 , this was so long ago I don't remember what the issue was. The team I was on never was able to move past this, and the maintainer seems to be MIA

@Jorybraun
Copy link

is this project abandoned @hxlniada ?

@Innovgame
Copy link

you can use 'html-webpack-concat-plugin' which is support 4.x

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants