QwikDev / qwik

Instant-loading web apps, without effort
https://qwik.dev
MIT License
20.87k stars 1.31k forks source link

fix(sync$): serialize "minified" function #6944

Closed wmertens closed 1 month ago

wmertens commented 1 month ago

It's not super minified, but it's better than before.

For example, qwik.dev had this in the sync funcs script tag:

() => {
    ((window1, history1) => {
      var _a3;
      if (!window1._qcs && history1.scrollRestoration === "manual") {
        window1._qcs = true;
        const scrollState = (_a3 = history1.state) == null ? void 0 : _a3._qCityScroll;
        if (scrollState) window1.scrollTo(scrollState.x, scrollState.y);
        document.dispatchEvent(new Event("qcinit"));
      }
    })(window, history)})

which was copied verbatim with spacing. Now it will be without spaces.

changeset-bot[bot] commented 1 month ago

🦋 Changeset detected

Latest commit: 24cf2d98f555d8c1d006dcf7949b381eae56181b

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 4 packages | Name | Type | | --------------------- | ----- | | @builder.io/qwik | Patch | | @builder.io/qwik-city | Patch | | eslint-plugin-qwik | Patch | | create-qwik | Patch |

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

pkg-pr-new[bot] commented 1 month ago

Open in Stackblitz

npm i https://pkg.pr.new/@builder.io/qwik@6944
npm i https://pkg.pr.new/@builder.io/qwik-city@6944
npm i https://pkg.pr.new/eslint-plugin-qwik@6944
npm i https://pkg.pr.new/create-qwik@6944

commit: 24cf2d9