preactjs / prefresh

Hot Module Reloading for Preact

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Transform options: cannot read property 'ssr' of undefined

craftedsystems opened this issue · comments

Transform fails if options is undefined.

const ssr = typeof options === 'boolean' ? options : options.ssr;

Full error log

vite v2.7.6 building for production...
✓ 0 modules transformed.
[prefresh] Cannot read property 'ssr' of undefined
file: /project-path/index.html
error during build:
TypeError: Cannot read property 'ssr' of undefined
    at Object.transform (/project-path/node_modules/@prefresh/vite/src/index.js:16:68)
    at /project-path/node_modules/rollup/dist/shared/rollup.js:22681:25

When is this undefined, I thought vite 2.7.0 did a breaking change to always make this an object 😅

EDIT: created PR with fix