Skip to content

Commit

Permalink
fix: pass correct entry data in template by multipage
Browse files Browse the repository at this point in the history
  • Loading branch information
webdiscus committed Sep 27, 2023
1 parent 96c640a commit 5c0db10
Show file tree
Hide file tree
Showing 35 changed files with 502 additions and 218 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
# Change log

## 2.14.2 (2023-09-27)

- fix: pass correct entry data in the template when the same template used for many pages with different data, in `serve` mode

## 2.14.1 (2023-09-24)
-
- fix: remove unused `isEntry` property from the `info` argument of the `postprocess` callback
the `isEntry` property was always true, because template is defined as an entrypoint
- chore: code cleanup
Expand Down
16 changes: 11 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

> _HTML as an entry point works in both Vite and Parcel, and now also in Webpack._
This plugin is a simple all-in-one solution for generating HTML containing JS, CSS, images, fonts and other resources, from their source files.
This plugin is a modern solution for generating HTML containing JS, CSS, images, fonts and other resources, from their source files.
The plugin allows to use [any template](#template-engine) file as [entry point](#option-entry).
In an HTML template can be referenced any source files, similar to how it works in [Vite](https://vitejs.dev/guide/#index-html-and-project-root) or [Parcel](https://parceljs.org/).

Expand All @@ -37,6 +37,11 @@ In an HTML template can be referenced any source files, similar to how it works

#### See: [install and quick start](#install) | [contents](#contents) | [simple example](#example)


> **Mozilla** already uses this plugin to build static HTML files for the [Mozilla AI GUIDE](https://github.com/mozilla/ai-guide) site.\
> Don’t hesitate, switch to using this modern plugin too 😉.

## ❤️ Sponsors

<table>
Expand Down Expand Up @@ -74,15 +79,16 @@ See the [example](#example).

## ✅ Profit

**Start from HTML**, not from JS. Define an **HTML** file as an **entry point**.
- **Simplify Webpack config** using one powerful plugin instead of many [different plugins and loaders](#list-of-plugins).

- **Start from HTML**, not from JS. Define an **HTML** file as an **entry point**.

Specify script and style **source files** directly in an **HTML** template,
- Specify script and style **source files** directly in an **HTML** template,
and you no longer need to define them in Webpack entry or import styles in JavaScript.

Use **any template engine** without additional plugins and loaders.
- Use **any template engine** without additional plugins and loaders.
Most popular template engines supported "**out of the box**".

Use one powerful plugin instead of [many different plugins](#list-of-plugins).

## ❓Question / Feature Request / Bug

Expand Down
Loading

0 comments on commit 5c0db10

Please sign in to comment.