marko-js / webpack

A loader for marko files and a plugin for universal bundling
MIT License
13 stars 4 forks source link

Hydrate output mode #52

Closed mlrawlings closed 3 years ago

mlrawlings commented 3 years ago

Description

Uses the new output:hydrate option of the @marko/compiler. This allows removing much of the code in the loader.

This PR also adds a check to see if there is no JS needed for the hydration of a template and eliminates the JS asset if it is empty.

BREAKING CHANGE: requires peer marko/@marko/compiler to be version 5.5.4 or higher.

Motivation and Context

Screenshots (if appropriate):

Checklist: