toolz icon indicating copy to clipboard operation
toolz copied to clipboard

chore: optimise webpack config for using html-bundler-webpack-plugin

Open webdiscus opened this issue 1 year ago • 0 comments

Hello @d3ward,

You have very useful tools, thanks.

But in your project is used outdated Webpack loader template-ejs-loader which is doesn't maintained over 2 years.

I'm the author of the html-bundler-webpack-plugin and I want help you to optimise and simplify the Webpack configuration.

Using the Bundler Plugin, an entry point is a template. All your source asset files (scripts, styles, images, etc.) can be specified directly in the HTML template. The plugin resolves source files of assets in templates and replaces them with correct output URLs in the generated HTML. The resolved assets will be processed via Webpack plugins/loaders and placed into the output directory.

The Bundler Plugin replaces the functionality of many plugins and loaders such as:

  • html-webpack-plugin
  • mini-css-extract-plugin
  • ejs-loader
  • template-ejs-loader
  • html-loader
  • style-loader
  • copy-webpack-plugin

How to test

You can see how it works in the forked branch:

git clone https://github.com/webdiscus/demo-toolz.git
cd demo-toolz
npm i
npm run dev

webdiscus avatar Sep 28 '24 22:09 webdiscus