webdiscus

Results 90 comments of webdiscus

@davidmurdoch Alternatively, can be used another minify lib. Just disable build-in [minify](https://github.com/webdiscus/html-bundler-webpack-plugin#option-minify) option: `minify: false` and use the [postprocess](https://github.com/webdiscus/html-bundler-webpack-plugin?tab=readme-ov-file#option-postprocess) callback option with other minify: ```js const HtmlBundlerPlugin = require('html-bundler-webpack-plugin'); const...

@davidmurdoch thanks to @vralle, provided an example of using more efficient and faster HTML minimizer [html-minimizer-webpack-plugin](https://github.com/webpack-contrib/html-minimizer-webpack-plugin) plugin with the [@swc/html](https://github.com/swc-project/swc/tree/main/packages/html) module, which keep the `content` value unchanged. ```js const HtmlBundlerPlugin...

@Bessonov please try the `v4.10.0`. Note: the helpers should not contains code for Node.JS or file system, e.g. `path.resolve()`, `fs.readFile()`, etc., because the helper's code will be called in browser...

@Bessonov > If I understand it correctly, you are stringifying functions, which comes with several limitations. For example, I encountered the following issues yes, functions will be stringified. By stringify...

@Bessonov If I understand, my solution works only partially and can not cover all your use cases?

> could you use webpack for compiling helpers? Webpack already parses the JS code generated by the plugin, resolves all `require` and `import` statements, and injects the compiled code into...

> this would solve the issue if everything is in the helpers folder, but not if some helpers require/import external modules. (At least after packaging the project, there will be...

> I haven't explored the internals of handlebars-loader, but perhaps this could be useful for you: https://github.com/pcardune/handlebars-loader/blob/e678ba7aec1eb56bf70767ff1c11ef39281c22b7/index.js#L88 The `handlebars-loader` does the same as I wrote above: ```js Line: 112 ----...

> Happy to take a PR switching to `picocolors` (which babel etc. uses) or something else if there are better alternatives 👍 If we are talking about _better alternatives_, it...

@SukkaW, I'll prepare a commit in my fork repository to demonstrate how easy it would be to switch to ansis, requiring significantly fewer code changes, since ansis supports the chained...