Patch Changes
-
#1368
90f0315
Thanks @askoufis! - walkObject: Use an empty object to initialize a clone instead of calling the input object'sconstructor
This allows
walkObject
to be used on module namespace objects:import { walkObject } from '@vanilla-extract/private'; import * as ns from './foo'; // Runtime error in `vite-node` walkObject(ns, myMappingFunction);
The previous implementation did not work with these objects because they do not have a
constructor
function.
esbuild
seems to have papered over this issue by providing aconstructor
function on these objects, but this seems to not be the case withvite-node
, hence the need for this fix.