webdiscus / html-bundler-webpack-plugin

Alternative to html-webpack-plugin ✅ Renders Eta, EJS, Handlebars, Nunjucks, Pug, Twig templates "out of the box" ✅ Resolves source files of scripts, styles, images in HTML ✅ Uses a template as entry point
ISC License
138 stars 14 forks source link

Inline not working with minify #8

Closed gpoitch closed 1 year ago

gpoitch commented 1 year ago

Current behaviour

When enabling minify, style and scripts are not inlined properly

Expected behaviour

style and scripts are inlined properly with minify on

Reproduction Example

new HtmlBundlerPlugin({
  minify: true,
  js: {
    inline: true
  },
  css: {
    inline: true
  }
})

Page:

<script src="./script.js"></script>
<link rel="stylesheet" href="./style.css" />

Output: Script contains the path, style is empty.

<script>path,to,my,script.js</script>
<style></style>

If I disable minify, it inlines correctly.

Environment

Additional context

webdiscus commented 1 year ago

Hello @gpoitch ,

thanks for the issue report. I will fix it.

webdiscus commented 1 year ago

@gpoitch

the issue is fixed in the new version 1.17.0

gpoitch commented 1 year ago

Working. Thanks!