From 6346faaa2fcb4d35733ffe5a4c7b7e316bfdf851 Mon Sep 17 00:00:00 2001 From: Ryan Carniato Date: Mon, 2 Mar 2026 15:49:24 -0800 Subject: [PATCH 01/16] feat: Solid 2.0 compatibility + transparent HMR memo - Add transparent: true to HMRComp's createMemo so HMR wrapper doesn't shift hydration IDs - Fix createSignal to avoid Solid 2.0 function-as-compute-fn overload - Fix createMemo signature (options now 3rd arg in Solid 2.0) - Unify context HMR with component HMR (Context IS a component in Solid 2.0) - Remove separate $$context path, route through $$component with .id preservation - Update to solid-js@2.0.0-experimental.16 and babel-preset-solid@2.0.0-experimental.16 - Bump version to 0.8.0-next.0 Made-with: Cursor --- package.json | 8 +- pnpm-lock.yaml | 44 +- src/babel/index.ts | 7 +- src/runtime/create-proxy.ts | 2 + src/runtime/index.ts | 78 +-- .../__snapshots__/esm.test.ts.snap | 290 +++++----- .../__snapshots__/rspack-esm.test.ts.snap | 290 +++++----- .../__snapshots__/standard.test.ts.snap | 290 +++++----- .../__snapshots__/vite.test.ts.snap | 290 +++++----- .../__snapshots__/webpack5.test.ts.snap | 290 +++++----- tests/client/__snapshots__/esm.test.ts.snap | 204 +++---- .../__snapshots__/rspack-esm.test.ts.snap | 204 +++---- .../__snapshots__/standard.test.ts.snap | 204 +++---- tests/client/__snapshots__/vite.test.ts.snap | 204 +++---- .../__snapshots__/webpack5.test.ts.snap | 204 +++---- .../__snapshots__/esm.test.ts.snap | 531 ++++++++++++------ .../__snapshots__/rspack-esm.test.ts.snap | 531 ++++++++++++------ .../__snapshots__/standard.test.ts.snap | 531 ++++++++++++------ .../__snapshots__/vite.test.ts.snap | 531 ++++++++++++------ .../__snapshots__/webpack5.test.ts.snap | 531 ++++++++++++------ tests/server/__snapshots__/esm.test.ts.snap | 237 ++++---- .../__snapshots__/rspack-esm.test.ts.snap | 237 ++++---- .../__snapshots__/standard.test.ts.snap | 237 ++++---- tests/server/__snapshots__/vite.test.ts.snap | 237 ++++---- .../__snapshots__/webpack5.test.ts.snap | 237 ++++---- 25 files changed, 3670 insertions(+), 2779 deletions(-) diff --git a/package.json b/package.json index 201f58b..3467912 100644 --- a/package.json +++ b/package.json @@ -4,7 +4,7 @@ "description": "Universal HMR for SolidJS", "author": "Ryan Carniato", "license": "MIT", - "version": "0.7.6", + "version": "0.8.0-next.0", "homepage": "https://github.com/solidjs/solid-refresh#readme", "repository": { "type": "git", @@ -58,15 +58,15 @@ "@types/babel__core": "^7.20.5", "@types/babel__generator": "^7.27.0", "@types/node": "^25.3.0", - "babel-preset-solid": "^1.9.10", + "babel-preset-solid": "^2.0.0-experimental.16", "rollup": "^4.59.0", - "solid-js": "^1.9.11", + "solid-js": "^2.0.0-experimental.16", "tslib": "^2.6.2", "typescript": "^5.9.3", "vitest": "^4.0.18" }, "peerDependencies": { - "solid-js": "^1.3" + "solid-js": "^2.0.0-experimental" }, "dependencies": { "@babel/generator": "^7.29.1", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index adfafe6..7bebd84 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -37,14 +37,14 @@ importers: specifier: ^25.3.0 version: 25.3.0 babel-preset-solid: - specifier: ^1.9.10 - version: 1.9.10(@babel/core@7.29.0)(solid-js@1.9.11) + specifier: ^2.0.0-experimental.16 + version: 2.0.0-experimental.16(@babel/core@7.29.0)(solid-js@2.0.0-experimental.16) rollup: specifier: ^4.59.0 version: 4.59.0 solid-js: - specifier: ^1.9.11 - version: 1.9.11 + specifier: ^2.0.0-experimental.16 + version: 2.0.0-experimental.16 tslib: specifier: ^2.6.2 version: 2.8.1 @@ -980,6 +980,9 @@ packages: cpu: [x64] os: [win32] + '@solidjs/signals@0.11.1': + resolution: {integrity: sha512-//nvM/Vjmp34utkMtf3l99+zuiT9gEF9709cGA5xHIsJgkKd4xhfU0getn8gujnypijddcS0VMTZrUhWsqoDfA==} + '@standard-schema/spec@1.1.0': resolution: {integrity: sha512-l2aFy5jALhniG5HgqrD6jXLi/rUWrKvqN/qJx6yoJsgKhblVd+iqqU4RCXavm/jPityDo5TCvKMnpjKnOriy0w==} @@ -1125,16 +1128,16 @@ packages: resolution: {integrity: sha512-Izi8RQcffqCeNVgFigKli1ssklIbpHnCYc6AknXGYoB6grJqyeby7jv12JUQgmTAnIDnbck1uxksT4dzN3PWBA==} engines: {node: '>=12'} - babel-plugin-jsx-dom-expressions@0.40.5: - resolution: {integrity: sha512-8TFKemVLDYezqqv4mWz+PhRrkryTzivTGu0twyLrOkVZ0P63COx2Y04eVsUjFlwSOXui1z3P3Pn209dokWnirg==} + babel-plugin-jsx-dom-expressions@0.41.0-next.9: + resolution: {integrity: sha512-6EZcgFC8AM2lM2jSe7W/5fuREMC/PErTUD2O5YNuV267p8xaLFpoJPlM8PL0NY2Pu0a49gb3JbYvt5/yv2Z7Ww==} peerDependencies: '@babel/core': ^7.20.12 - babel-preset-solid@1.9.10: - resolution: {integrity: sha512-HCelrgua/Y+kqO8RyL04JBWS/cVdrtUv/h45GntgQY+cJl4eBcKkCDV3TdMjtKx1nXwRaR9QXslM/Npm1dxdZQ==} + babel-preset-solid@2.0.0-experimental.16: + resolution: {integrity: sha512-I8UfX7Er2i3XaqC8pr7klEHl/AWUUFmpgWDvzipQofthcBwrlWUk8pVbQZ6PuBOnr4XRBVF3ijzOicfzmj4uBA==} peerDependencies: '@babel/core': ^7.0.0 - solid-js: ^1.9.10 + solid-js: 2.0.0-experimental.16 peerDependenciesMeta: solid-js: optional: true @@ -1506,8 +1509,8 @@ packages: siginfo@2.0.0: resolution: {integrity: sha512-ybx0WO1/8bSBLEWXZvEd7gMW3Sn3JFlW3TvX1nREbDLRNQNaeNN8WK0meBwPdAaOI7TtRRRJn/Es1zhrrCHu7g==} - solid-js@1.9.11: - resolution: {integrity: sha512-WEJtcc5mkh/BnHA6Yrg4whlF8g6QwpmXXRg4P2ztPmcKeHHlH4+djYecBLhSpecZY2RRECXYUwIc/C2r3yzQ4Q==} + solid-js@2.0.0-experimental.16: + resolution: {integrity: sha512-zZ1dU7cR0EnvLnrYiRLQbCFiDw5blLdlqmofgLzKUYE1TCMWDcisBlSwz0Ez8l4yXB4adbdhtaYCuynH4xSq9A==} source-map-js@1.2.1: resolution: {integrity: sha512-UXWMKhLOwVKb728IUtQPXxfYU+usdybtUrK/8uGE8CQMvrhOpwvzDBwj0QhSL7MQc7vIsISBG8VQ8+IDQxpfQA==} @@ -1571,6 +1574,9 @@ packages: resolution: {integrity: sha512-6Z7Ma2aVEWisaL6TvBCy7P8rm2LQoPv6dJ7ecIaIixHcwfbJ0x7mWdbcwlIM5IGQxPZSFYeqRCqlOOeKoJYMkw==} engines: {node: '>= 4'} + validate-html-nesting@1.2.4: + resolution: {integrity: sha512-doQi7e8EJ2OWneSG1aZpJluS6A49aZM0+EICXWKm1i6WvqTLmq0tpUcImc4KTWG50mORO0C4YDBtOCSYvElftw==} + vite@7.3.1: resolution: {integrity: sha512-w+N7Hifpc3gRjZ63vYBXA56dvvRlNWRczTdmCBBa+CotUzAPf5b7YMdMR/8CQoeYE5LX3W4wj6RYTgonm1b9DA==} engines: {node: ^20.19.0 || >=22.12.0} @@ -2699,6 +2705,8 @@ snapshots: '@rollup/rollup-win32-x64-msvc@4.59.0': optional: true + '@solidjs/signals@0.11.1': {} + '@standard-schema/spec@1.1.0': {} '@swc/core-darwin-arm64@1.15.13': @@ -2839,7 +2847,7 @@ snapshots: assertion-error@2.0.1: {} - babel-plugin-jsx-dom-expressions@0.40.5(@babel/core@7.29.0): + babel-plugin-jsx-dom-expressions@0.41.0-next.9(@babel/core@7.29.0): dependencies: '@babel/core': 7.29.0 '@babel/helper-module-imports': 7.18.6 @@ -2847,13 +2855,14 @@ snapshots: '@babel/types': 7.29.0 html-entities: 2.3.3 parse5: 7.3.0 + validate-html-nesting: 1.2.4 - babel-preset-solid@1.9.10(@babel/core@7.29.0)(solid-js@1.9.11): + babel-preset-solid@2.0.0-experimental.16(@babel/core@7.29.0)(solid-js@2.0.0-experimental.16): dependencies: '@babel/core': 7.29.0 - babel-plugin-jsx-dom-expressions: 0.40.5(@babel/core@7.29.0) + babel-plugin-jsx-dom-expressions: 0.41.0-next.9(@babel/core@7.29.0) optionalDependencies: - solid-js: 1.9.11 + solid-js: 2.0.0-experimental.16 base-x@3.0.11: dependencies: @@ -3207,8 +3216,9 @@ snapshots: siginfo@2.0.0: {} - solid-js@1.9.11: + solid-js@2.0.0-experimental.16: dependencies: + '@solidjs/signals': 0.11.1 csstype: 3.2.3 seroval: 1.5.0 seroval-plugins: 1.5.0(seroval@1.5.0) @@ -3254,6 +3264,8 @@ snapshots: utility-types@3.11.0: {} + validate-html-nesting@1.2.4: {} + vite@7.3.1(@types/node@25.3.0)(lightningcss@1.31.1): dependencies: esbuild: 0.27.3 diff --git a/src/babel/index.ts b/src/babel/index.ts index 9fcbd57..45dc2f2 100644 --- a/src/babel/index.ts +++ b/src/babel/index.ts @@ -4,7 +4,6 @@ import path from 'path'; import { isComponentishName } from './core/checks'; import { IMPORT_COMPONENT, - IMPORT_CONTEXT, IMPORT_SPECIFIERS, } from './core/constants'; import { createRegistry } from './core/create-registry'; @@ -165,13 +164,13 @@ function wrapContext( if (statementPath) { const registry = createRegistry(state, statementPath); const hotName = t.stringLiteral(identifier.name); - const contextCall = getImportIdentifier( + const componentCall = getImportIdentifier( state, statementPath, - IMPORT_CONTEXT, + IMPORT_COMPONENT, ); - return t.callExpression(contextCall, [registry, hotName, context]); + return t.callExpression(componentCall, [registry, hotName, context]); } return context; } diff --git a/src/runtime/create-proxy.ts b/src/runtime/create-proxy.ts index f918d85..c78e746 100644 --- a/src/runtime/create-proxy.ts +++ b/src/runtime/create-proxy.ts @@ -43,8 +43,10 @@ export default function createProxy, P>( } return undefined; }, + undefined, { name: refreshName, + transparent: true, }, ) as unknown as JSX.Element; } diff --git a/src/runtime/index.ts b/src/runtime/index.ts index d21510f..49ed369 100644 --- a/src/runtime/index.ts +++ b/src/runtime/index.ts @@ -1,4 +1,4 @@ -import type { Context, JSX } from 'solid-js'; +import type { Accessor, JSX } from 'solid-js'; import { createSignal, DEV } from 'solid-js'; import type { ESMRuntimeType, StandardRuntimeType } from '../shared/types'; import createProxy from './create-proxy'; @@ -26,24 +26,13 @@ export interface ComponentRegistrationData

extends ComponentOptions { update: (action: () => (props: P) => JSX.Element) => void; } -// The registration data for the context -export interface ContextRegistrationData { - // A compile-time ID generated for the context, this is usually - // derived from the context's name - id: string; - // The context instance - context: Context; -} - export interface Registry { components: Map>; - contexts: Map>; } export function $$registry(): Registry { return { components: new Map(), - contexts: new Map(), }; } @@ -53,9 +42,10 @@ export function $$component

( component: (props: P) => JSX.Element, options: ComponentOptions = {}, ): (props: P) => JSX.Element { - const [comp, setComp] = createSignal(component, { internal: true }); + const [comp, setComp] = createSignal<(props: P) => JSX.Element>(); + setComp(() => component); const proxy = createProxy<(props: P) => JSX.Element, P>( - comp, + comp as Accessor<(props: P) => JSX.Element>, id, options.location, ); @@ -69,22 +59,18 @@ export function $$component

( return proxy; } -export function $$context( - registry: Registry, - id: string, - context: Context, -): Context { - registry.contexts.set(id, { - id, - context, - }); - return context; -} - function patchComponent

( oldData: ComponentRegistrationData

, newData: ComponentRegistrationData

, ) { + // Preserve context identity: contexts (createContext) are components in Solid 2.0 + // but useContext relies on a stable Symbol .id for lookups + const oldComp = oldData.component as any; + const newComp = newData.component as any; + if (oldComp.id != null && typeof oldComp.id === 'symbol') { + newComp.id = oldComp.id; + } + // Check if incoming module has signature if (newData.signature) { // Compare signatures @@ -136,46 +122,8 @@ function patchComponents(oldData: Registry, newData: Registry) { return false; } -function patchContext( - oldData: ContextRegistrationData, - newData: ContextRegistrationData, -) { - oldData.context.defaultValue = newData.context.defaultValue; - newData.context.id = oldData.context.id; - newData.context.Provider = oldData.context.Provider; -} - -function patchContexts(oldData: Registry, newData: Registry) { - const contexts = new Set([ - ...oldData.contexts.keys(), - ...newData.contexts.keys(), - ]); - for (const key of contexts) { - const oldContext = oldData.contexts.get(key); - const newContext = newData.contexts.get(key); - - if (oldContext) { - if (newContext) { - patchContext(oldContext, newContext); - } else { - // We need to invalidate - return true; - } - } else if (newContext) { - oldData.contexts.set(key, newContext); - } - } - return false; -} - function patchRegistry(oldRegistry: Registry, newRegistry: Registry) { - const shouldInvalidateByContext = patchContexts(oldRegistry, newRegistry); - const shouldInvalidateByComponents = patchComponents( - oldRegistry, - newRegistry, - ); - // In the future we may add other HMR features here - return shouldInvalidateByComponents || shouldInvalidateByContext; + return patchComponents(oldRegistry, newRegistry); } const SOLID_REFRESH = 'solid-refresh'; diff --git a/tests/client-hydratable/__snapshots__/esm.test.ts.snap b/tests/client-hydratable/__snapshots__/esm.test.ts.snap index 29d9702..f966937 100644 --- a/tests/client-hydratable/__snapshots__/esm.test.ts.snap +++ b/tests/client-hydratable/__snapshots__/esm.test.ts.snap @@ -8,32 +8,32 @@ if (someCond) { `; exports[`esm (client, hydratable) > Context API > should support ExportNamedDeclaration 1`] = ` -"import { $$context as _$$context } from "solid-refresh"; +"import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; import { createContext } from 'solid-js'; const _REGISTRY = _$$registry(); -export const Example = _$$context(_REGISTRY, "Example", createContext()); +export const Example = _$$component(_REGISTRY, "Example", createContext()); if (import.meta.hot) { _$$refresh("esm", import.meta.hot, _REGISTRY); }" `; exports[`esm (client, hydratable) > Context API > should support top-level VariableDeclaration 1`] = ` -"import { $$context as _$$context } from "solid-refresh"; +"import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; import { createContext } from 'solid-js'; const _REGISTRY = _$$registry(); -const Example = _$$context(_REGISTRY, "Example", createContext()); +const Example = _$$component(_REGISTRY, "Example", createContext()); if (import.meta.hot) { _$$refresh("esm", import.meta.hot, _REGISTRY); }" `; exports[`esm (client, hydratable) > ExportDefaultDeclaration w/ FunctionExpression > should skip ExportDefaultDeclaration w/ FunctionExpression with @refresh reload 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { getNextElement as _$getNextElement } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { getNextElement as _$getNextElement } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$decline as _$$decline } from "solid-refresh"; // @refresh reload @@ -46,8 +46,8 @@ if (import.meta.hot) { `; exports[`esm (client, hydratable) > ExportDefaultDeclaration w/ FunctionExpression > should skip ExportDefaultDeclaration w/ FunctionExpression with @refresh skip 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { getNextElement as _$getNextElement } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { getNextElement as _$getNextElement } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); // @refresh skip export default function Foo() { @@ -56,9 +56,9 @@ export default function Foo() { `; exports[`esm (client, hydratable) > ExportDefaultDeclaration w/ FunctionExpression > should skip ExportDefaultDeclaration w/ FunctionExpression with invalid Component name 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; -import { getNextElement as _$getNextElement } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; +import { getNextElement as _$getNextElement } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -77,9 +77,9 @@ if (import.meta.hot) { `; exports[`esm (client, hydratable) > ExportDefaultDeclaration w/ FunctionExpression > should skip ExportDefaultDeclaration w/ FunctionExpression with valid Component name and >1 params 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; -import { getNextElement as _$getNextElement } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; +import { getNextElement as _$getNextElement } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -98,9 +98,9 @@ if (import.meta.hot) { `; exports[`esm (client, hydratable) > ExportDefaultDeclaration w/ FunctionExpression > should transform ExportDefaultDeclaration w/ FunctionExpression with valid Component name and params 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; -import { getNextElement as _$getNextElement } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; +import { getNextElement as _$getNextElement } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -123,9 +123,9 @@ if (import.meta.hot) { `; exports[`esm (client, hydratable) > ExportDefaultDeclaration w/ FunctionExpression > should transform ExportDefaultDeclaration w/ FunctionExpression with valid Component name and params 2`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; -import { getNextElement as _$getNextElement } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; +import { getNextElement as _$getNextElement } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -148,10 +148,10 @@ if (import.meta.hot) { `; exports[`esm (client, hydratable) > ExportDefaultDeclaration w/ FunctionExpression > should transform ExportDefaultDeclaration w/ FunctionExpression with valid Component name and params 3`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; -import { getNextElement as _$getNextElement } from "solid-js/web"; -import { insert as _$insert } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; +import { getNextElement as _$getNextElement } from "@solidjs/web"; +import { insert as _$insert } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -184,7 +184,7 @@ if (import.meta.hot) { `; exports[`esm (client, hydratable) > ExportDefaultDeclaration w/ FunctionExpression > should transform ExportDefaultDeclaration w/ FunctionExpression with valid Component name and params 4`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; @@ -216,9 +216,9 @@ if (import.meta.hot) { `; exports[`esm (client, hydratable) > ExportDefaultDeclaration w/ FunctionExpression > should transform ExportDefaultDeclaration w/ FunctionExpression with valid Component name and params 5`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; -import { getNextElement as _$getNextElement } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; +import { getNextElement as _$getNextElement } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`
foo\`), _tmpl$2 = /*#__PURE__*/_$template(\`
bar\`); import { $$component as _$$component } from "solid-refresh"; @@ -260,8 +260,8 @@ if (import.meta.hot) { `; exports[`esm (client, hydratable) > ExportNamedDeclaration w/ FunctionExpression > should skip ExportNamedDeclaration w/ FunctionExpression with @refresh reload 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { getNextElement as _$getNextElement } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { getNextElement as _$getNextElement } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$decline as _$$decline } from "solid-refresh"; // @refresh reload @@ -274,8 +274,8 @@ if (import.meta.hot) { `; exports[`esm (client, hydratable) > ExportNamedDeclaration w/ FunctionExpression > should skip ExportNamedDeclaration w/ FunctionExpression with @refresh skip 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { getNextElement as _$getNextElement } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { getNextElement as _$getNextElement } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); // @refresh skip export function Foo() { @@ -284,9 +284,9 @@ export function Foo() { `; exports[`esm (client, hydratable) > ExportNamedDeclaration w/ FunctionExpression > should skip ExportNamedDeclaration w/ FunctionExpression with invalid Component name 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; -import { getNextElement as _$getNextElement } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; +import { getNextElement as _$getNextElement } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -309,9 +309,9 @@ if (import.meta.hot) { `; exports[`esm (client, hydratable) > ExportNamedDeclaration w/ FunctionExpression > should skip ExportNamedDeclaration w/ FunctionExpression with valid Component name and >1 params 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; -import { getNextElement as _$getNextElement } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; +import { getNextElement as _$getNextElement } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -330,9 +330,9 @@ if (import.meta.hot) { `; exports[`esm (client, hydratable) > ExportNamedDeclaration w/ FunctionExpression > should transform ExportNamedDeclaration w/ FunctionExpression with valid Component name and params 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; -import { getNextElement as _$getNextElement } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; +import { getNextElement as _$getNextElement } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -355,9 +355,9 @@ if (import.meta.hot) { `; exports[`esm (client, hydratable) > ExportNamedDeclaration w/ FunctionExpression > should transform ExportNamedDeclaration w/ FunctionExpression with valid Component name and params 2`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; -import { getNextElement as _$getNextElement } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; +import { getNextElement as _$getNextElement } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -380,10 +380,10 @@ if (import.meta.hot) { `; exports[`esm (client, hydratable) > ExportNamedDeclaration w/ FunctionExpression > should transform ExportNamedDeclaration w/ FunctionExpression with valid Component name and params 3`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; -import { getNextElement as _$getNextElement } from "solid-js/web"; -import { insert as _$insert } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; +import { getNextElement as _$getNextElement } from "@solidjs/web"; +import { insert as _$insert } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -416,7 +416,7 @@ if (import.meta.hot) { `; exports[`esm (client, hydratable) > ExportNamedDeclaration w/ FunctionExpression > should transform ExportNamedDeclaration w/ FunctionExpression with valid Component name and params 4`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; @@ -448,9 +448,9 @@ if (import.meta.hot) { `; exports[`esm (client, hydratable) > ExportNamedDeclaration w/ FunctionExpression > should transform ExportNamedDeclaration w/ FunctionExpression with valid Component name and params 5`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; -import { getNextElement as _$getNextElement } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; +import { getNextElement as _$getNextElement } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`
foo\`), _tmpl$2 = /*#__PURE__*/_$template(\`
bar\`); import { $$component as _$$component } from "solid-refresh"; @@ -502,8 +502,8 @@ if (import.meta.hot) { `; exports[`esm (client, hydratable) > FunctionDeclaration > should skip FunctionDeclaration with @refresh reload 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { getNextElement as _$getNextElement } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { getNextElement as _$getNextElement } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$decline as _$$decline } from "solid-refresh"; // @refresh reload @@ -516,8 +516,8 @@ if (import.meta.hot) { `; exports[`esm (client, hydratable) > FunctionDeclaration > should skip FunctionDeclaration with @refresh skip 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { getNextElement as _$getNextElement } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { getNextElement as _$getNextElement } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); // @refresh skip function Foo() { @@ -526,9 +526,9 @@ function Foo() { `; exports[`esm (client, hydratable) > FunctionDeclaration > should skip FunctionDeclaration with invalid Component name 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; -import { getNextElement as _$getNextElement } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; +import { getNextElement as _$getNextElement } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -547,9 +547,9 @@ if (import.meta.hot) { `; exports[`esm (client, hydratable) > FunctionDeclaration > should skip FunctionDeclaration with valid Component name and >1 params 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; -import { getNextElement as _$getNextElement } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; +import { getNextElement as _$getNextElement } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -568,9 +568,9 @@ if (import.meta.hot) { `; exports[`esm (client, hydratable) > FunctionDeclaration > should transform FunctionDeclaration with valid Component name and params 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; -import { getNextElement as _$getNextElement } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; +import { getNextElement as _$getNextElement } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -592,9 +592,9 @@ if (import.meta.hot) { `; exports[`esm (client, hydratable) > FunctionDeclaration > should transform FunctionDeclaration with valid Component name and params 2`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; -import { getNextElement as _$getNextElement } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; +import { getNextElement as _$getNextElement } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -616,10 +616,10 @@ if (import.meta.hot) { `; exports[`esm (client, hydratable) > FunctionDeclaration > should transform FunctionDeclaration with valid Component name and params 3`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; -import { getNextElement as _$getNextElement } from "solid-js/web"; -import { insert as _$insert } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; +import { getNextElement as _$getNextElement } from "@solidjs/web"; +import { insert as _$insert } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -651,7 +651,7 @@ if (import.meta.hot) { `; exports[`esm (client, hydratable) > FunctionDeclaration > should transform FunctionDeclaration with valid Component name and params 4`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; @@ -682,9 +682,9 @@ if (import.meta.hot) { `; exports[`esm (client, hydratable) > FunctionDeclaration > should transform FunctionDeclaration with valid Component name and params 5`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; -import { getNextElement as _$getNextElement } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; +import { getNextElement as _$getNextElement } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`
bar\`), _tmpl$2 = /*#__PURE__*/_$template(\`
foo\`); import { $$component as _$$component } from "solid-refresh"; @@ -725,8 +725,8 @@ if (import.meta.hot) { `; exports[`esm (client, hydratable) > VariableDeclarator > ArrowFunctionExpression > should skip VariableDeclarator w/ ArrowFunctionExpression with @refresh reload 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { getNextElement as _$getNextElement } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { getNextElement as _$getNextElement } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$decline as _$$decline } from "solid-refresh"; // @refresh reload @@ -739,8 +739,8 @@ if (import.meta.hot) { `; exports[`esm (client, hydratable) > VariableDeclarator > ArrowFunctionExpression > should skip VariableDeclarator w/ ArrowFunctionExpression with @refresh skip 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { getNextElement as _$getNextElement } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { getNextElement as _$getNextElement } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); // @refresh skip const Foo = () => { @@ -749,9 +749,9 @@ const Foo = () => { `; exports[`esm (client, hydratable) > VariableDeclarator > ArrowFunctionExpression > should skip VariableDeclarator w/ ArrowFunctionExpression with invalid Component name 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; -import { getNextElement as _$getNextElement } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; +import { getNextElement as _$getNextElement } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -770,9 +770,9 @@ if (import.meta.hot) { `; exports[`esm (client, hydratable) > VariableDeclarator > ArrowFunctionExpression > should skip VariableDeclarator w/ ArrowFunctionExpression with valid Component name and >1 params 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; -import { getNextElement as _$getNextElement } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; +import { getNextElement as _$getNextElement } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -791,9 +791,9 @@ if (import.meta.hot) { `; exports[`esm (client, hydratable) > VariableDeclarator > ArrowFunctionExpression > should transform VariableDeclarator w/ ArrowFunctionExpression with valid Component name and params 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; -import { getNextElement as _$getNextElement } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; +import { getNextElement as _$getNextElement } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -815,9 +815,9 @@ if (import.meta.hot) { `; exports[`esm (client, hydratable) > VariableDeclarator > ArrowFunctionExpression > should transform VariableDeclarator w/ ArrowFunctionExpression with valid Component name and params 2`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; -import { getNextElement as _$getNextElement } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; +import { getNextElement as _$getNextElement } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -839,10 +839,10 @@ if (import.meta.hot) { `; exports[`esm (client, hydratable) > VariableDeclarator > ArrowFunctionExpression > should transform VariableDeclarator w/ ArrowFunctionExpression with valid Component name and params 3`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; -import { getNextElement as _$getNextElement } from "solid-js/web"; -import { insert as _$insert } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; +import { getNextElement as _$getNextElement } from "@solidjs/web"; +import { insert as _$insert } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -874,7 +874,7 @@ if (import.meta.hot) { `; exports[`esm (client, hydratable) > VariableDeclarator > ArrowFunctionExpression > should transform VariableDeclarator w/ ArrowFunctionExpression with valid Component name and params 4`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; @@ -905,9 +905,9 @@ if (import.meta.hot) { `; exports[`esm (client, hydratable) > VariableDeclarator > ArrowFunctionExpression > should transform VariableDeclarator w/ ArrowFunctionExpression with valid Component name and params 5`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; -import { getNextElement as _$getNextElement } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; +import { getNextElement as _$getNextElement } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`
bar\`), _tmpl$2 = /*#__PURE__*/_$template(\`
foo\`); import { $$component as _$$component } from "solid-refresh"; @@ -948,8 +948,8 @@ if (import.meta.hot) { `; exports[`esm (client, hydratable) > VariableDeclarator > FunctionExpression > should skip VariableDeclarator w/ FunctionExpression with @refresh reload 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { getNextElement as _$getNextElement } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { getNextElement as _$getNextElement } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$decline as _$$decline } from "solid-refresh"; // @refresh reload @@ -962,8 +962,8 @@ if (import.meta.hot) { `; exports[`esm (client, hydratable) > VariableDeclarator > FunctionExpression > should skip VariableDeclarator w/ FunctionExpression with @refresh skip 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { getNextElement as _$getNextElement } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { getNextElement as _$getNextElement } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); // @refresh skip const Foo = function () { @@ -972,9 +972,9 @@ const Foo = function () { `; exports[`esm (client, hydratable) > VariableDeclarator > FunctionExpression > should skip VariableDeclarator w/ FunctionExpression with invalid Component name 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; -import { getNextElement as _$getNextElement } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; +import { getNextElement as _$getNextElement } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -993,9 +993,9 @@ if (import.meta.hot) { `; exports[`esm (client, hydratable) > VariableDeclarator > FunctionExpression > should skip VariableDeclarator w/ FunctionExpression with valid Component name and >1 params 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; -import { getNextElement as _$getNextElement } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; +import { getNextElement as _$getNextElement } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -1014,9 +1014,9 @@ if (import.meta.hot) { `; exports[`esm (client, hydratable) > VariableDeclarator > FunctionExpression > should transform VariableDeclarator w/ FunctionExpression with valid Component name and params 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; -import { getNextElement as _$getNextElement } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; +import { getNextElement as _$getNextElement } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -1038,9 +1038,9 @@ if (import.meta.hot) { `; exports[`esm (client, hydratable) > VariableDeclarator > FunctionExpression > should transform VariableDeclarator w/ FunctionExpression with valid Component name and params 2`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; -import { getNextElement as _$getNextElement } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; +import { getNextElement as _$getNextElement } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -1062,10 +1062,10 @@ if (import.meta.hot) { `; exports[`esm (client, hydratable) > VariableDeclarator > FunctionExpression > should transform VariableDeclarator w/ FunctionExpression with valid Component name and params 3`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; -import { getNextElement as _$getNextElement } from "solid-js/web"; -import { insert as _$insert } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; +import { getNextElement as _$getNextElement } from "@solidjs/web"; +import { insert as _$insert } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -1097,7 +1097,7 @@ if (import.meta.hot) { `; exports[`esm (client, hydratable) > VariableDeclarator > FunctionExpression > should transform VariableDeclarator w/ FunctionExpression with valid Component name and params 4`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; @@ -1128,9 +1128,9 @@ if (import.meta.hot) { `; exports[`esm (client, hydratable) > VariableDeclarator > FunctionExpression > should transform VariableDeclarator w/ FunctionExpression with valid Component name and params 5`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; -import { getNextElement as _$getNextElement } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; +import { getNextElement as _$getNextElement } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`
bar\`), _tmpl$2 = /*#__PURE__*/_$template(\`
foo\`); import { $$component as _$$component } from "solid-refresh"; @@ -1171,10 +1171,10 @@ if (import.meta.hot) { `; exports[`esm (client, hydratable) > fix build > refs > should work with a function 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; -import { getNextElement as _$getNextElement } from "solid-js/web"; -import { use as _$use } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; +import { getNextElement as _$getNextElement } from "@solidjs/web"; +import { ref as _$ref } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`
Comp\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -1183,7 +1183,7 @@ const _REGISTRY = _$$registry(); const Comp_1 = _$$component(_REGISTRY, "Comp_1", _props => /*@refresh jsx-skip*/(() => { var _el$ = _$getNextElement(_tmpl$); var _ref$ = _props.v0; - typeof _ref$ === "function" ? _$use(_ref$, _el$) : _props.v0 = _el$; + typeof _ref$ === "function" || Array.isArray(_ref$) ? _$ref(() => _ref$, _el$) : _props.v0 = _el$; return _el$; })(), { location: "example.jsx:4:19", @@ -1204,10 +1204,10 @@ if (import.meta.hot) { `; exports[`esm (client, hydratable) > fix build > refs > should work with a mutable variable 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; -import { getNextElement as _$getNextElement } from "solid-js/web"; -import { use as _$use } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; +import { getNextElement as _$getNextElement } from "@solidjs/web"; +import { ref as _$ref } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`
Comp\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -1216,7 +1216,7 @@ const _REGISTRY = _$$registry(); const Comp_1 = _$$component(_REGISTRY, "Comp_1", _props => /*@refresh jsx-skip*/(() => { var _el$ = _$getNextElement(_tmpl$); var _ref$ = _props.v0; - typeof _ref$ === "function" ? _$use(_ref$, _el$) : _props.v0 = _el$; + typeof _ref$ === "function" || Array.isArray(_ref$) ? _$ref(() => _ref$, _el$) : _props.v0 = _el$; return _el$; })(), { location: "example.jsx:4:19", @@ -1243,10 +1243,10 @@ if (import.meta.hot) { `; exports[`esm (client, hydratable) > fix build > signals as refs > should work 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; -import { getNextElement as _$getNextElement } from "solid-js/web"; -import { use as _$use } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; +import { getNextElement as _$getNextElement } from "@solidjs/web"; +import { ref as _$ref } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`
Comp\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -1256,7 +1256,7 @@ const _REGISTRY = _$$registry(); const Comp_1 = _$$component(_REGISTRY, "Comp_1", _props => /*@refresh jsx-skip*/(() => { var _el$ = _$getNextElement(_tmpl$); var _ref$ = _props.v0; - typeof _ref$ === "function" ? _$use(_ref$, _el$) : _props.v0 = _el$; + typeof _ref$ === "function" || Array.isArray(_ref$) ? _$ref(() => _ref$, _el$) : _props.v0 = _el$; return _el$; })(), { location: "example.jsx:6:19", @@ -1284,7 +1284,7 @@ if (import.meta.hot) { `; exports[`esm (client, hydratable) > fix render > @refresh reload > should work 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; import { $$decline as _$$decline } from "solid-refresh"; // @refresh reload import { render } from 'solid-js/web'; @@ -1298,7 +1298,7 @@ if (import.meta.hot) { `; exports[`esm (client, hydratable) > fix render > import specifiers > should work with ImportNamespaceSpecifier 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; @@ -1318,7 +1318,7 @@ if (import.meta.hot) { `; exports[`esm (client, hydratable) > fix render > import specifiers > should work with ImportSpecifier + Identifier 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; @@ -1338,7 +1338,7 @@ if (import.meta.hot) { `; exports[`esm (client, hydratable) > fix render > import specifiers > should work with ImportSpecifier + aliased Identifier 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; @@ -1358,7 +1358,7 @@ if (import.meta.hot) { `; exports[`esm (client, hydratable) > fix render > import specifiers > should work with ImportSpecifier + aliased Identifier from StringLiteral 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; @@ -1378,7 +1378,7 @@ if (import.meta.hot) { `; exports[`esm (client, hydratable) > fix render > top-level statements > should work with IfStatement 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; diff --git a/tests/client-hydratable/__snapshots__/rspack-esm.test.ts.snap b/tests/client-hydratable/__snapshots__/rspack-esm.test.ts.snap index 8d635b8..8710b63 100644 --- a/tests/client-hydratable/__snapshots__/rspack-esm.test.ts.snap +++ b/tests/client-hydratable/__snapshots__/rspack-esm.test.ts.snap @@ -8,32 +8,32 @@ if (someCond) { `; exports[`rspack-esm (client, hydratable) > Context API > should support ExportNamedDeclaration 1`] = ` -"import { $$context as _$$context } from "solid-refresh"; +"import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; import { createContext } from 'solid-js'; const _REGISTRY = _$$registry(); -export const Example = _$$context(_REGISTRY, "Example", createContext()); +export const Example = _$$component(_REGISTRY, "Example", createContext()); if (import.meta.webpackHot) { _$$refresh("rspack-esm", import.meta.webpackHot, _REGISTRY); }" `; exports[`rspack-esm (client, hydratable) > Context API > should support top-level VariableDeclaration 1`] = ` -"import { $$context as _$$context } from "solid-refresh"; +"import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; import { createContext } from 'solid-js'; const _REGISTRY = _$$registry(); -const Example = _$$context(_REGISTRY, "Example", createContext()); +const Example = _$$component(_REGISTRY, "Example", createContext()); if (import.meta.webpackHot) { _$$refresh("rspack-esm", import.meta.webpackHot, _REGISTRY); }" `; exports[`rspack-esm (client, hydratable) > ExportDefaultDeclaration w/ FunctionExpression > should skip ExportDefaultDeclaration w/ FunctionExpression with @refresh reload 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { getNextElement as _$getNextElement } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { getNextElement as _$getNextElement } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$decline as _$$decline } from "solid-refresh"; // @refresh reload @@ -46,8 +46,8 @@ if (import.meta.webpackHot) { `; exports[`rspack-esm (client, hydratable) > ExportDefaultDeclaration w/ FunctionExpression > should skip ExportDefaultDeclaration w/ FunctionExpression with @refresh skip 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { getNextElement as _$getNextElement } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { getNextElement as _$getNextElement } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); // @refresh skip export default function Foo() { @@ -56,9 +56,9 @@ export default function Foo() { `; exports[`rspack-esm (client, hydratable) > ExportDefaultDeclaration w/ FunctionExpression > should skip ExportDefaultDeclaration w/ FunctionExpression with invalid Component name 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; -import { getNextElement as _$getNextElement } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; +import { getNextElement as _$getNextElement } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -77,9 +77,9 @@ if (import.meta.webpackHot) { `; exports[`rspack-esm (client, hydratable) > ExportDefaultDeclaration w/ FunctionExpression > should skip ExportDefaultDeclaration w/ FunctionExpression with valid Component name and >1 params 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; -import { getNextElement as _$getNextElement } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; +import { getNextElement as _$getNextElement } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -98,9 +98,9 @@ if (import.meta.webpackHot) { `; exports[`rspack-esm (client, hydratable) > ExportDefaultDeclaration w/ FunctionExpression > should transform ExportDefaultDeclaration w/ FunctionExpression with valid Component name and params 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; -import { getNextElement as _$getNextElement } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; +import { getNextElement as _$getNextElement } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -123,9 +123,9 @@ if (import.meta.webpackHot) { `; exports[`rspack-esm (client, hydratable) > ExportDefaultDeclaration w/ FunctionExpression > should transform ExportDefaultDeclaration w/ FunctionExpression with valid Component name and params 2`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; -import { getNextElement as _$getNextElement } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; +import { getNextElement as _$getNextElement } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -148,10 +148,10 @@ if (import.meta.webpackHot) { `; exports[`rspack-esm (client, hydratable) > ExportDefaultDeclaration w/ FunctionExpression > should transform ExportDefaultDeclaration w/ FunctionExpression with valid Component name and params 3`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; -import { getNextElement as _$getNextElement } from "solid-js/web"; -import { insert as _$insert } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; +import { getNextElement as _$getNextElement } from "@solidjs/web"; +import { insert as _$insert } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -184,7 +184,7 @@ if (import.meta.webpackHot) { `; exports[`rspack-esm (client, hydratable) > ExportDefaultDeclaration w/ FunctionExpression > should transform ExportDefaultDeclaration w/ FunctionExpression with valid Component name and params 4`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; @@ -216,9 +216,9 @@ if (import.meta.webpackHot) { `; exports[`rspack-esm (client, hydratable) > ExportDefaultDeclaration w/ FunctionExpression > should transform ExportDefaultDeclaration w/ FunctionExpression with valid Component name and params 5`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; -import { getNextElement as _$getNextElement } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; +import { getNextElement as _$getNextElement } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`
foo\`), _tmpl$2 = /*#__PURE__*/_$template(\`
bar\`); import { $$component as _$$component } from "solid-refresh"; @@ -260,8 +260,8 @@ if (import.meta.webpackHot) { `; exports[`rspack-esm (client, hydratable) > ExportNamedDeclaration w/ FunctionExpression > should skip ExportNamedDeclaration w/ FunctionExpression with @refresh reload 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { getNextElement as _$getNextElement } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { getNextElement as _$getNextElement } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$decline as _$$decline } from "solid-refresh"; // @refresh reload @@ -274,8 +274,8 @@ if (import.meta.webpackHot) { `; exports[`rspack-esm (client, hydratable) > ExportNamedDeclaration w/ FunctionExpression > should skip ExportNamedDeclaration w/ FunctionExpression with @refresh skip 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { getNextElement as _$getNextElement } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { getNextElement as _$getNextElement } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); // @refresh skip export function Foo() { @@ -284,9 +284,9 @@ export function Foo() { `; exports[`rspack-esm (client, hydratable) > ExportNamedDeclaration w/ FunctionExpression > should skip ExportNamedDeclaration w/ FunctionExpression with invalid Component name 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; -import { getNextElement as _$getNextElement } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; +import { getNextElement as _$getNextElement } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -309,9 +309,9 @@ if (import.meta.webpackHot) { `; exports[`rspack-esm (client, hydratable) > ExportNamedDeclaration w/ FunctionExpression > should skip ExportNamedDeclaration w/ FunctionExpression with valid Component name and >1 params 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; -import { getNextElement as _$getNextElement } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; +import { getNextElement as _$getNextElement } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -330,9 +330,9 @@ if (import.meta.webpackHot) { `; exports[`rspack-esm (client, hydratable) > ExportNamedDeclaration w/ FunctionExpression > should transform ExportNamedDeclaration w/ FunctionExpression with valid Component name and params 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; -import { getNextElement as _$getNextElement } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; +import { getNextElement as _$getNextElement } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -355,9 +355,9 @@ if (import.meta.webpackHot) { `; exports[`rspack-esm (client, hydratable) > ExportNamedDeclaration w/ FunctionExpression > should transform ExportNamedDeclaration w/ FunctionExpression with valid Component name and params 2`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; -import { getNextElement as _$getNextElement } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; +import { getNextElement as _$getNextElement } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -380,10 +380,10 @@ if (import.meta.webpackHot) { `; exports[`rspack-esm (client, hydratable) > ExportNamedDeclaration w/ FunctionExpression > should transform ExportNamedDeclaration w/ FunctionExpression with valid Component name and params 3`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; -import { getNextElement as _$getNextElement } from "solid-js/web"; -import { insert as _$insert } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; +import { getNextElement as _$getNextElement } from "@solidjs/web"; +import { insert as _$insert } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -416,7 +416,7 @@ if (import.meta.webpackHot) { `; exports[`rspack-esm (client, hydratable) > ExportNamedDeclaration w/ FunctionExpression > should transform ExportNamedDeclaration w/ FunctionExpression with valid Component name and params 4`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; @@ -448,9 +448,9 @@ if (import.meta.webpackHot) { `; exports[`rspack-esm (client, hydratable) > ExportNamedDeclaration w/ FunctionExpression > should transform ExportNamedDeclaration w/ FunctionExpression with valid Component name and params 5`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; -import { getNextElement as _$getNextElement } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; +import { getNextElement as _$getNextElement } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`
foo\`), _tmpl$2 = /*#__PURE__*/_$template(\`
bar\`); import { $$component as _$$component } from "solid-refresh"; @@ -502,8 +502,8 @@ if (import.meta.webpackHot) { `; exports[`rspack-esm (client, hydratable) > FunctionDeclaration > should skip FunctionDeclaration with @refresh reload 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { getNextElement as _$getNextElement } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { getNextElement as _$getNextElement } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$decline as _$$decline } from "solid-refresh"; // @refresh reload @@ -516,8 +516,8 @@ if (import.meta.webpackHot) { `; exports[`rspack-esm (client, hydratable) > FunctionDeclaration > should skip FunctionDeclaration with @refresh skip 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { getNextElement as _$getNextElement } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { getNextElement as _$getNextElement } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); // @refresh skip function Foo() { @@ -526,9 +526,9 @@ function Foo() { `; exports[`rspack-esm (client, hydratable) > FunctionDeclaration > should skip FunctionDeclaration with invalid Component name 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; -import { getNextElement as _$getNextElement } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; +import { getNextElement as _$getNextElement } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -547,9 +547,9 @@ if (import.meta.webpackHot) { `; exports[`rspack-esm (client, hydratable) > FunctionDeclaration > should skip FunctionDeclaration with valid Component name and >1 params 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; -import { getNextElement as _$getNextElement } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; +import { getNextElement as _$getNextElement } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -568,9 +568,9 @@ if (import.meta.webpackHot) { `; exports[`rspack-esm (client, hydratable) > FunctionDeclaration > should transform FunctionDeclaration with valid Component name and params 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; -import { getNextElement as _$getNextElement } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; +import { getNextElement as _$getNextElement } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -592,9 +592,9 @@ if (import.meta.webpackHot) { `; exports[`rspack-esm (client, hydratable) > FunctionDeclaration > should transform FunctionDeclaration with valid Component name and params 2`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; -import { getNextElement as _$getNextElement } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; +import { getNextElement as _$getNextElement } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -616,10 +616,10 @@ if (import.meta.webpackHot) { `; exports[`rspack-esm (client, hydratable) > FunctionDeclaration > should transform FunctionDeclaration with valid Component name and params 3`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; -import { getNextElement as _$getNextElement } from "solid-js/web"; -import { insert as _$insert } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; +import { getNextElement as _$getNextElement } from "@solidjs/web"; +import { insert as _$insert } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -651,7 +651,7 @@ if (import.meta.webpackHot) { `; exports[`rspack-esm (client, hydratable) > FunctionDeclaration > should transform FunctionDeclaration with valid Component name and params 4`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; @@ -682,9 +682,9 @@ if (import.meta.webpackHot) { `; exports[`rspack-esm (client, hydratable) > FunctionDeclaration > should transform FunctionDeclaration with valid Component name and params 5`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; -import { getNextElement as _$getNextElement } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; +import { getNextElement as _$getNextElement } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`
bar\`), _tmpl$2 = /*#__PURE__*/_$template(\`
foo\`); import { $$component as _$$component } from "solid-refresh"; @@ -725,8 +725,8 @@ if (import.meta.webpackHot) { `; exports[`rspack-esm (client, hydratable) > VariableDeclarator > ArrowFunctionExpression > should skip VariableDeclarator w/ ArrowFunctionExpression with @refresh reload 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { getNextElement as _$getNextElement } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { getNextElement as _$getNextElement } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$decline as _$$decline } from "solid-refresh"; // @refresh reload @@ -739,8 +739,8 @@ if (import.meta.webpackHot) { `; exports[`rspack-esm (client, hydratable) > VariableDeclarator > ArrowFunctionExpression > should skip VariableDeclarator w/ ArrowFunctionExpression with @refresh skip 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { getNextElement as _$getNextElement } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { getNextElement as _$getNextElement } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); // @refresh skip const Foo = () => { @@ -749,9 +749,9 @@ const Foo = () => { `; exports[`rspack-esm (client, hydratable) > VariableDeclarator > ArrowFunctionExpression > should skip VariableDeclarator w/ ArrowFunctionExpression with invalid Component name 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; -import { getNextElement as _$getNextElement } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; +import { getNextElement as _$getNextElement } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -770,9 +770,9 @@ if (import.meta.webpackHot) { `; exports[`rspack-esm (client, hydratable) > VariableDeclarator > ArrowFunctionExpression > should skip VariableDeclarator w/ ArrowFunctionExpression with valid Component name and >1 params 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; -import { getNextElement as _$getNextElement } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; +import { getNextElement as _$getNextElement } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -791,9 +791,9 @@ if (import.meta.webpackHot) { `; exports[`rspack-esm (client, hydratable) > VariableDeclarator > ArrowFunctionExpression > should transform VariableDeclarator w/ ArrowFunctionExpression with valid Component name and params 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; -import { getNextElement as _$getNextElement } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; +import { getNextElement as _$getNextElement } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -815,9 +815,9 @@ if (import.meta.webpackHot) { `; exports[`rspack-esm (client, hydratable) > VariableDeclarator > ArrowFunctionExpression > should transform VariableDeclarator w/ ArrowFunctionExpression with valid Component name and params 2`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; -import { getNextElement as _$getNextElement } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; +import { getNextElement as _$getNextElement } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -839,10 +839,10 @@ if (import.meta.webpackHot) { `; exports[`rspack-esm (client, hydratable) > VariableDeclarator > ArrowFunctionExpression > should transform VariableDeclarator w/ ArrowFunctionExpression with valid Component name and params 3`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; -import { getNextElement as _$getNextElement } from "solid-js/web"; -import { insert as _$insert } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; +import { getNextElement as _$getNextElement } from "@solidjs/web"; +import { insert as _$insert } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -874,7 +874,7 @@ if (import.meta.webpackHot) { `; exports[`rspack-esm (client, hydratable) > VariableDeclarator > ArrowFunctionExpression > should transform VariableDeclarator w/ ArrowFunctionExpression with valid Component name and params 4`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; @@ -905,9 +905,9 @@ if (import.meta.webpackHot) { `; exports[`rspack-esm (client, hydratable) > VariableDeclarator > ArrowFunctionExpression > should transform VariableDeclarator w/ ArrowFunctionExpression with valid Component name and params 5`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; -import { getNextElement as _$getNextElement } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; +import { getNextElement as _$getNextElement } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`
bar\`), _tmpl$2 = /*#__PURE__*/_$template(\`
foo\`); import { $$component as _$$component } from "solid-refresh"; @@ -948,8 +948,8 @@ if (import.meta.webpackHot) { `; exports[`rspack-esm (client, hydratable) > VariableDeclarator > FunctionExpression > should skip VariableDeclarator w/ FunctionExpression with @refresh reload 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { getNextElement as _$getNextElement } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { getNextElement as _$getNextElement } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$decline as _$$decline } from "solid-refresh"; // @refresh reload @@ -962,8 +962,8 @@ if (import.meta.webpackHot) { `; exports[`rspack-esm (client, hydratable) > VariableDeclarator > FunctionExpression > should skip VariableDeclarator w/ FunctionExpression with @refresh skip 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { getNextElement as _$getNextElement } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { getNextElement as _$getNextElement } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); // @refresh skip const Foo = function () { @@ -972,9 +972,9 @@ const Foo = function () { `; exports[`rspack-esm (client, hydratable) > VariableDeclarator > FunctionExpression > should skip VariableDeclarator w/ FunctionExpression with invalid Component name 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; -import { getNextElement as _$getNextElement } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; +import { getNextElement as _$getNextElement } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -993,9 +993,9 @@ if (import.meta.webpackHot) { `; exports[`rspack-esm (client, hydratable) > VariableDeclarator > FunctionExpression > should skip VariableDeclarator w/ FunctionExpression with valid Component name and >1 params 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; -import { getNextElement as _$getNextElement } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; +import { getNextElement as _$getNextElement } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -1014,9 +1014,9 @@ if (import.meta.webpackHot) { `; exports[`rspack-esm (client, hydratable) > VariableDeclarator > FunctionExpression > should transform VariableDeclarator w/ FunctionExpression with valid Component name and params 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; -import { getNextElement as _$getNextElement } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; +import { getNextElement as _$getNextElement } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -1038,9 +1038,9 @@ if (import.meta.webpackHot) { `; exports[`rspack-esm (client, hydratable) > VariableDeclarator > FunctionExpression > should transform VariableDeclarator w/ FunctionExpression with valid Component name and params 2`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; -import { getNextElement as _$getNextElement } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; +import { getNextElement as _$getNextElement } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -1062,10 +1062,10 @@ if (import.meta.webpackHot) { `; exports[`rspack-esm (client, hydratable) > VariableDeclarator > FunctionExpression > should transform VariableDeclarator w/ FunctionExpression with valid Component name and params 3`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; -import { getNextElement as _$getNextElement } from "solid-js/web"; -import { insert as _$insert } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; +import { getNextElement as _$getNextElement } from "@solidjs/web"; +import { insert as _$insert } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -1097,7 +1097,7 @@ if (import.meta.webpackHot) { `; exports[`rspack-esm (client, hydratable) > VariableDeclarator > FunctionExpression > should transform VariableDeclarator w/ FunctionExpression with valid Component name and params 4`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; @@ -1128,9 +1128,9 @@ if (import.meta.webpackHot) { `; exports[`rspack-esm (client, hydratable) > VariableDeclarator > FunctionExpression > should transform VariableDeclarator w/ FunctionExpression with valid Component name and params 5`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; -import { getNextElement as _$getNextElement } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; +import { getNextElement as _$getNextElement } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`
bar\`), _tmpl$2 = /*#__PURE__*/_$template(\`
foo\`); import { $$component as _$$component } from "solid-refresh"; @@ -1171,10 +1171,10 @@ if (import.meta.webpackHot) { `; exports[`rspack-esm (client, hydratable) > fix build > refs > should work with a function 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; -import { getNextElement as _$getNextElement } from "solid-js/web"; -import { use as _$use } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; +import { getNextElement as _$getNextElement } from "@solidjs/web"; +import { ref as _$ref } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`
Comp\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -1183,7 +1183,7 @@ const _REGISTRY = _$$registry(); const Comp_1 = _$$component(_REGISTRY, "Comp_1", _props => /*@refresh jsx-skip*/(() => { var _el$ = _$getNextElement(_tmpl$); var _ref$ = _props.v0; - typeof _ref$ === "function" ? _$use(_ref$, _el$) : _props.v0 = _el$; + typeof _ref$ === "function" || Array.isArray(_ref$) ? _$ref(() => _ref$, _el$) : _props.v0 = _el$; return _el$; })(), { location: "example.jsx:4:19", @@ -1204,10 +1204,10 @@ if (import.meta.webpackHot) { `; exports[`rspack-esm (client, hydratable) > fix build > refs > should work with a mutable variable 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; -import { getNextElement as _$getNextElement } from "solid-js/web"; -import { use as _$use } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; +import { getNextElement as _$getNextElement } from "@solidjs/web"; +import { ref as _$ref } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`
Comp\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -1216,7 +1216,7 @@ const _REGISTRY = _$$registry(); const Comp_1 = _$$component(_REGISTRY, "Comp_1", _props => /*@refresh jsx-skip*/(() => { var _el$ = _$getNextElement(_tmpl$); var _ref$ = _props.v0; - typeof _ref$ === "function" ? _$use(_ref$, _el$) : _props.v0 = _el$; + typeof _ref$ === "function" || Array.isArray(_ref$) ? _$ref(() => _ref$, _el$) : _props.v0 = _el$; return _el$; })(), { location: "example.jsx:4:19", @@ -1243,10 +1243,10 @@ if (import.meta.webpackHot) { `; exports[`rspack-esm (client, hydratable) > fix build > signals as refs > should work 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; -import { getNextElement as _$getNextElement } from "solid-js/web"; -import { use as _$use } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; +import { getNextElement as _$getNextElement } from "@solidjs/web"; +import { ref as _$ref } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`
Comp\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -1256,7 +1256,7 @@ const _REGISTRY = _$$registry(); const Comp_1 = _$$component(_REGISTRY, "Comp_1", _props => /*@refresh jsx-skip*/(() => { var _el$ = _$getNextElement(_tmpl$); var _ref$ = _props.v0; - typeof _ref$ === "function" ? _$use(_ref$, _el$) : _props.v0 = _el$; + typeof _ref$ === "function" || Array.isArray(_ref$) ? _$ref(() => _ref$, _el$) : _props.v0 = _el$; return _el$; })(), { location: "example.jsx:6:19", @@ -1284,7 +1284,7 @@ if (import.meta.webpackHot) { `; exports[`rspack-esm (client, hydratable) > fix render > @refresh reload > should work 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; import { $$decline as _$$decline } from "solid-refresh"; // @refresh reload import { render } from 'solid-js/web'; @@ -1298,7 +1298,7 @@ if (import.meta.webpackHot) { `; exports[`rspack-esm (client, hydratable) > fix render > import specifiers > should work with ImportNamespaceSpecifier 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; @@ -1318,7 +1318,7 @@ if (import.meta.webpackHot) { `; exports[`rspack-esm (client, hydratable) > fix render > import specifiers > should work with ImportSpecifier + Identifier 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; @@ -1338,7 +1338,7 @@ if (import.meta.webpackHot) { `; exports[`rspack-esm (client, hydratable) > fix render > import specifiers > should work with ImportSpecifier + aliased Identifier 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; @@ -1358,7 +1358,7 @@ if (import.meta.webpackHot) { `; exports[`rspack-esm (client, hydratable) > fix render > import specifiers > should work with ImportSpecifier + aliased Identifier from StringLiteral 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; @@ -1378,7 +1378,7 @@ if (import.meta.webpackHot) { `; exports[`rspack-esm (client, hydratable) > fix render > top-level statements > should work with IfStatement 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; diff --git a/tests/client-hydratable/__snapshots__/standard.test.ts.snap b/tests/client-hydratable/__snapshots__/standard.test.ts.snap index dd3ccd8..32d5d32 100644 --- a/tests/client-hydratable/__snapshots__/standard.test.ts.snap +++ b/tests/client-hydratable/__snapshots__/standard.test.ts.snap @@ -8,32 +8,32 @@ if (someCond) { `; exports[`standard (client, hydratable) > Context API > should support ExportNamedDeclaration 1`] = ` -"import { $$context as _$$context } from "solid-refresh"; +"import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; import { createContext } from 'solid-js'; const _REGISTRY = _$$registry(); -export const Example = _$$context(_REGISTRY, "Example", createContext()); +export const Example = _$$component(_REGISTRY, "Example", createContext()); if (module.hot) { _$$refresh("standard", module.hot, _REGISTRY); }" `; exports[`standard (client, hydratable) > Context API > should support top-level VariableDeclaration 1`] = ` -"import { $$context as _$$context } from "solid-refresh"; +"import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; import { createContext } from 'solid-js'; const _REGISTRY = _$$registry(); -const Example = _$$context(_REGISTRY, "Example", createContext()); +const Example = _$$component(_REGISTRY, "Example", createContext()); if (module.hot) { _$$refresh("standard", module.hot, _REGISTRY); }" `; exports[`standard (client, hydratable) > ExportDefaultDeclaration w/ FunctionExpression > should skip ExportDefaultDeclaration w/ FunctionExpression with @refresh reload 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { getNextElement as _$getNextElement } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { getNextElement as _$getNextElement } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$decline as _$$decline } from "solid-refresh"; // @refresh reload @@ -46,8 +46,8 @@ if (module.hot) { `; exports[`standard (client, hydratable) > ExportDefaultDeclaration w/ FunctionExpression > should skip ExportDefaultDeclaration w/ FunctionExpression with @refresh skip 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { getNextElement as _$getNextElement } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { getNextElement as _$getNextElement } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); // @refresh skip export default function Foo() { @@ -56,9 +56,9 @@ export default function Foo() { `; exports[`standard (client, hydratable) > ExportDefaultDeclaration w/ FunctionExpression > should skip ExportDefaultDeclaration w/ FunctionExpression with invalid Component name 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; -import { getNextElement as _$getNextElement } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; +import { getNextElement as _$getNextElement } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -77,9 +77,9 @@ if (module.hot) { `; exports[`standard (client, hydratable) > ExportDefaultDeclaration w/ FunctionExpression > should skip ExportDefaultDeclaration w/ FunctionExpression with valid Component name and >1 params 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; -import { getNextElement as _$getNextElement } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; +import { getNextElement as _$getNextElement } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -98,9 +98,9 @@ if (module.hot) { `; exports[`standard (client, hydratable) > ExportDefaultDeclaration w/ FunctionExpression > should transform ExportDefaultDeclaration w/ FunctionExpression with valid Component name and params 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; -import { getNextElement as _$getNextElement } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; +import { getNextElement as _$getNextElement } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -123,9 +123,9 @@ if (module.hot) { `; exports[`standard (client, hydratable) > ExportDefaultDeclaration w/ FunctionExpression > should transform ExportDefaultDeclaration w/ FunctionExpression with valid Component name and params 2`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; -import { getNextElement as _$getNextElement } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; +import { getNextElement as _$getNextElement } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -148,10 +148,10 @@ if (module.hot) { `; exports[`standard (client, hydratable) > ExportDefaultDeclaration w/ FunctionExpression > should transform ExportDefaultDeclaration w/ FunctionExpression with valid Component name and params 3`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; -import { getNextElement as _$getNextElement } from "solid-js/web"; -import { insert as _$insert } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; +import { getNextElement as _$getNextElement } from "@solidjs/web"; +import { insert as _$insert } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -184,7 +184,7 @@ if (module.hot) { `; exports[`standard (client, hydratable) > ExportDefaultDeclaration w/ FunctionExpression > should transform ExportDefaultDeclaration w/ FunctionExpression with valid Component name and params 4`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; @@ -216,9 +216,9 @@ if (module.hot) { `; exports[`standard (client, hydratable) > ExportDefaultDeclaration w/ FunctionExpression > should transform ExportDefaultDeclaration w/ FunctionExpression with valid Component name and params 5`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; -import { getNextElement as _$getNextElement } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; +import { getNextElement as _$getNextElement } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`
foo\`), _tmpl$2 = /*#__PURE__*/_$template(\`
bar\`); import { $$component as _$$component } from "solid-refresh"; @@ -260,8 +260,8 @@ if (module.hot) { `; exports[`standard (client, hydratable) > ExportNamedDeclaration w/ FunctionExpression > should skip ExportNamedDeclaration w/ FunctionExpression with @refresh reload 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { getNextElement as _$getNextElement } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { getNextElement as _$getNextElement } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$decline as _$$decline } from "solid-refresh"; // @refresh reload @@ -274,8 +274,8 @@ if (module.hot) { `; exports[`standard (client, hydratable) > ExportNamedDeclaration w/ FunctionExpression > should skip ExportNamedDeclaration w/ FunctionExpression with @refresh skip 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { getNextElement as _$getNextElement } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { getNextElement as _$getNextElement } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); // @refresh skip export function Foo() { @@ -284,9 +284,9 @@ export function Foo() { `; exports[`standard (client, hydratable) > ExportNamedDeclaration w/ FunctionExpression > should skip ExportNamedDeclaration w/ FunctionExpression with invalid Component name 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; -import { getNextElement as _$getNextElement } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; +import { getNextElement as _$getNextElement } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -309,9 +309,9 @@ if (module.hot) { `; exports[`standard (client, hydratable) > ExportNamedDeclaration w/ FunctionExpression > should skip ExportNamedDeclaration w/ FunctionExpression with valid Component name and >1 params 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; -import { getNextElement as _$getNextElement } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; +import { getNextElement as _$getNextElement } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -330,9 +330,9 @@ if (module.hot) { `; exports[`standard (client, hydratable) > ExportNamedDeclaration w/ FunctionExpression > should transform ExportNamedDeclaration w/ FunctionExpression with valid Component name and params 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; -import { getNextElement as _$getNextElement } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; +import { getNextElement as _$getNextElement } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -355,9 +355,9 @@ if (module.hot) { `; exports[`standard (client, hydratable) > ExportNamedDeclaration w/ FunctionExpression > should transform ExportNamedDeclaration w/ FunctionExpression with valid Component name and params 2`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; -import { getNextElement as _$getNextElement } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; +import { getNextElement as _$getNextElement } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -380,10 +380,10 @@ if (module.hot) { `; exports[`standard (client, hydratable) > ExportNamedDeclaration w/ FunctionExpression > should transform ExportNamedDeclaration w/ FunctionExpression with valid Component name and params 3`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; -import { getNextElement as _$getNextElement } from "solid-js/web"; -import { insert as _$insert } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; +import { getNextElement as _$getNextElement } from "@solidjs/web"; +import { insert as _$insert } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -416,7 +416,7 @@ if (module.hot) { `; exports[`standard (client, hydratable) > ExportNamedDeclaration w/ FunctionExpression > should transform ExportNamedDeclaration w/ FunctionExpression with valid Component name and params 4`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; @@ -448,9 +448,9 @@ if (module.hot) { `; exports[`standard (client, hydratable) > ExportNamedDeclaration w/ FunctionExpression > should transform ExportNamedDeclaration w/ FunctionExpression with valid Component name and params 5`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; -import { getNextElement as _$getNextElement } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; +import { getNextElement as _$getNextElement } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`
foo\`), _tmpl$2 = /*#__PURE__*/_$template(\`
bar\`); import { $$component as _$$component } from "solid-refresh"; @@ -502,8 +502,8 @@ if (module.hot) { `; exports[`standard (client, hydratable) > FunctionDeclaration > should skip FunctionDeclaration with @refresh reload 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { getNextElement as _$getNextElement } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { getNextElement as _$getNextElement } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$decline as _$$decline } from "solid-refresh"; // @refresh reload @@ -516,8 +516,8 @@ if (module.hot) { `; exports[`standard (client, hydratable) > FunctionDeclaration > should skip FunctionDeclaration with @refresh skip 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { getNextElement as _$getNextElement } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { getNextElement as _$getNextElement } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); // @refresh skip function Foo() { @@ -526,9 +526,9 @@ function Foo() { `; exports[`standard (client, hydratable) > FunctionDeclaration > should skip FunctionDeclaration with invalid Component name 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; -import { getNextElement as _$getNextElement } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; +import { getNextElement as _$getNextElement } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -547,9 +547,9 @@ if (module.hot) { `; exports[`standard (client, hydratable) > FunctionDeclaration > should skip FunctionDeclaration with valid Component name and >1 params 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; -import { getNextElement as _$getNextElement } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; +import { getNextElement as _$getNextElement } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -568,9 +568,9 @@ if (module.hot) { `; exports[`standard (client, hydratable) > FunctionDeclaration > should transform FunctionDeclaration with valid Component name and params 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; -import { getNextElement as _$getNextElement } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; +import { getNextElement as _$getNextElement } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -592,9 +592,9 @@ if (module.hot) { `; exports[`standard (client, hydratable) > FunctionDeclaration > should transform FunctionDeclaration with valid Component name and params 2`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; -import { getNextElement as _$getNextElement } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; +import { getNextElement as _$getNextElement } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -616,10 +616,10 @@ if (module.hot) { `; exports[`standard (client, hydratable) > FunctionDeclaration > should transform FunctionDeclaration with valid Component name and params 3`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; -import { getNextElement as _$getNextElement } from "solid-js/web"; -import { insert as _$insert } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; +import { getNextElement as _$getNextElement } from "@solidjs/web"; +import { insert as _$insert } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -651,7 +651,7 @@ if (module.hot) { `; exports[`standard (client, hydratable) > FunctionDeclaration > should transform FunctionDeclaration with valid Component name and params 4`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; @@ -682,9 +682,9 @@ if (module.hot) { `; exports[`standard (client, hydratable) > FunctionDeclaration > should transform FunctionDeclaration with valid Component name and params 5`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; -import { getNextElement as _$getNextElement } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; +import { getNextElement as _$getNextElement } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`
bar\`), _tmpl$2 = /*#__PURE__*/_$template(\`
foo\`); import { $$component as _$$component } from "solid-refresh"; @@ -725,8 +725,8 @@ if (module.hot) { `; exports[`standard (client, hydratable) > VariableDeclarator > ArrowFunctionExpression > should skip VariableDeclarator w/ ArrowFunctionExpression with @refresh reload 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { getNextElement as _$getNextElement } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { getNextElement as _$getNextElement } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$decline as _$$decline } from "solid-refresh"; // @refresh reload @@ -739,8 +739,8 @@ if (module.hot) { `; exports[`standard (client, hydratable) > VariableDeclarator > ArrowFunctionExpression > should skip VariableDeclarator w/ ArrowFunctionExpression with @refresh skip 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { getNextElement as _$getNextElement } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { getNextElement as _$getNextElement } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); // @refresh skip const Foo = () => { @@ -749,9 +749,9 @@ const Foo = () => { `; exports[`standard (client, hydratable) > VariableDeclarator > ArrowFunctionExpression > should skip VariableDeclarator w/ ArrowFunctionExpression with invalid Component name 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; -import { getNextElement as _$getNextElement } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; +import { getNextElement as _$getNextElement } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -770,9 +770,9 @@ if (module.hot) { `; exports[`standard (client, hydratable) > VariableDeclarator > ArrowFunctionExpression > should skip VariableDeclarator w/ ArrowFunctionExpression with valid Component name and >1 params 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; -import { getNextElement as _$getNextElement } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; +import { getNextElement as _$getNextElement } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -791,9 +791,9 @@ if (module.hot) { `; exports[`standard (client, hydratable) > VariableDeclarator > ArrowFunctionExpression > should transform VariableDeclarator w/ ArrowFunctionExpression with valid Component name and params 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; -import { getNextElement as _$getNextElement } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; +import { getNextElement as _$getNextElement } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -815,9 +815,9 @@ if (module.hot) { `; exports[`standard (client, hydratable) > VariableDeclarator > ArrowFunctionExpression > should transform VariableDeclarator w/ ArrowFunctionExpression with valid Component name and params 2`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; -import { getNextElement as _$getNextElement } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; +import { getNextElement as _$getNextElement } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -839,10 +839,10 @@ if (module.hot) { `; exports[`standard (client, hydratable) > VariableDeclarator > ArrowFunctionExpression > should transform VariableDeclarator w/ ArrowFunctionExpression with valid Component name and params 3`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; -import { getNextElement as _$getNextElement } from "solid-js/web"; -import { insert as _$insert } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; +import { getNextElement as _$getNextElement } from "@solidjs/web"; +import { insert as _$insert } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -874,7 +874,7 @@ if (module.hot) { `; exports[`standard (client, hydratable) > VariableDeclarator > ArrowFunctionExpression > should transform VariableDeclarator w/ ArrowFunctionExpression with valid Component name and params 4`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; @@ -905,9 +905,9 @@ if (module.hot) { `; exports[`standard (client, hydratable) > VariableDeclarator > ArrowFunctionExpression > should transform VariableDeclarator w/ ArrowFunctionExpression with valid Component name and params 5`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; -import { getNextElement as _$getNextElement } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; +import { getNextElement as _$getNextElement } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`
bar\`), _tmpl$2 = /*#__PURE__*/_$template(\`
foo\`); import { $$component as _$$component } from "solid-refresh"; @@ -948,8 +948,8 @@ if (module.hot) { `; exports[`standard (client, hydratable) > VariableDeclarator > FunctionExpression > should skip VariableDeclarator w/ FunctionExpression with @refresh reload 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { getNextElement as _$getNextElement } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { getNextElement as _$getNextElement } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$decline as _$$decline } from "solid-refresh"; // @refresh reload @@ -962,8 +962,8 @@ if (module.hot) { `; exports[`standard (client, hydratable) > VariableDeclarator > FunctionExpression > should skip VariableDeclarator w/ FunctionExpression with @refresh skip 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { getNextElement as _$getNextElement } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { getNextElement as _$getNextElement } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); // @refresh skip const Foo = function () { @@ -972,9 +972,9 @@ const Foo = function () { `; exports[`standard (client, hydratable) > VariableDeclarator > FunctionExpression > should skip VariableDeclarator w/ FunctionExpression with invalid Component name 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; -import { getNextElement as _$getNextElement } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; +import { getNextElement as _$getNextElement } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -993,9 +993,9 @@ if (module.hot) { `; exports[`standard (client, hydratable) > VariableDeclarator > FunctionExpression > should skip VariableDeclarator w/ FunctionExpression with valid Component name and >1 params 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; -import { getNextElement as _$getNextElement } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; +import { getNextElement as _$getNextElement } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -1014,9 +1014,9 @@ if (module.hot) { `; exports[`standard (client, hydratable) > VariableDeclarator > FunctionExpression > should transform VariableDeclarator w/ FunctionExpression with valid Component name and params 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; -import { getNextElement as _$getNextElement } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; +import { getNextElement as _$getNextElement } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -1038,9 +1038,9 @@ if (module.hot) { `; exports[`standard (client, hydratable) > VariableDeclarator > FunctionExpression > should transform VariableDeclarator w/ FunctionExpression with valid Component name and params 2`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; -import { getNextElement as _$getNextElement } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; +import { getNextElement as _$getNextElement } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -1062,10 +1062,10 @@ if (module.hot) { `; exports[`standard (client, hydratable) > VariableDeclarator > FunctionExpression > should transform VariableDeclarator w/ FunctionExpression with valid Component name and params 3`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; -import { getNextElement as _$getNextElement } from "solid-js/web"; -import { insert as _$insert } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; +import { getNextElement as _$getNextElement } from "@solidjs/web"; +import { insert as _$insert } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -1097,7 +1097,7 @@ if (module.hot) { `; exports[`standard (client, hydratable) > VariableDeclarator > FunctionExpression > should transform VariableDeclarator w/ FunctionExpression with valid Component name and params 4`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; @@ -1128,9 +1128,9 @@ if (module.hot) { `; exports[`standard (client, hydratable) > VariableDeclarator > FunctionExpression > should transform VariableDeclarator w/ FunctionExpression with valid Component name and params 5`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; -import { getNextElement as _$getNextElement } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; +import { getNextElement as _$getNextElement } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`
bar\`), _tmpl$2 = /*#__PURE__*/_$template(\`
foo\`); import { $$component as _$$component } from "solid-refresh"; @@ -1171,10 +1171,10 @@ if (module.hot) { `; exports[`standard (client, hydratable) > fix build > refs > should work with a function 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; -import { getNextElement as _$getNextElement } from "solid-js/web"; -import { use as _$use } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; +import { getNextElement as _$getNextElement } from "@solidjs/web"; +import { ref as _$ref } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`
Comp\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -1183,7 +1183,7 @@ const _REGISTRY = _$$registry(); const Comp_1 = _$$component(_REGISTRY, "Comp_1", _props => /*@refresh jsx-skip*/(() => { var _el$ = _$getNextElement(_tmpl$); var _ref$ = _props.v0; - typeof _ref$ === "function" ? _$use(_ref$, _el$) : _props.v0 = _el$; + typeof _ref$ === "function" || Array.isArray(_ref$) ? _$ref(() => _ref$, _el$) : _props.v0 = _el$; return _el$; })(), { location: "example.jsx:4:19", @@ -1204,10 +1204,10 @@ if (module.hot) { `; exports[`standard (client, hydratable) > fix build > refs > should work with a mutable variable 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; -import { getNextElement as _$getNextElement } from "solid-js/web"; -import { use as _$use } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; +import { getNextElement as _$getNextElement } from "@solidjs/web"; +import { ref as _$ref } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`
Comp\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -1216,7 +1216,7 @@ const _REGISTRY = _$$registry(); const Comp_1 = _$$component(_REGISTRY, "Comp_1", _props => /*@refresh jsx-skip*/(() => { var _el$ = _$getNextElement(_tmpl$); var _ref$ = _props.v0; - typeof _ref$ === "function" ? _$use(_ref$, _el$) : _props.v0 = _el$; + typeof _ref$ === "function" || Array.isArray(_ref$) ? _$ref(() => _ref$, _el$) : _props.v0 = _el$; return _el$; })(), { location: "example.jsx:4:19", @@ -1243,10 +1243,10 @@ if (module.hot) { `; exports[`standard (client, hydratable) > fix build > signals as refs > should work 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; -import { getNextElement as _$getNextElement } from "solid-js/web"; -import { use as _$use } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; +import { getNextElement as _$getNextElement } from "@solidjs/web"; +import { ref as _$ref } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`
Comp\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -1256,7 +1256,7 @@ const _REGISTRY = _$$registry(); const Comp_1 = _$$component(_REGISTRY, "Comp_1", _props => /*@refresh jsx-skip*/(() => { var _el$ = _$getNextElement(_tmpl$); var _ref$ = _props.v0; - typeof _ref$ === "function" ? _$use(_ref$, _el$) : _props.v0 = _el$; + typeof _ref$ === "function" || Array.isArray(_ref$) ? _$ref(() => _ref$, _el$) : _props.v0 = _el$; return _el$; })(), { location: "example.jsx:6:19", @@ -1284,7 +1284,7 @@ if (module.hot) { `; exports[`standard (client, hydratable) > fix render > @refresh reload > should work 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; import { $$decline as _$$decline } from "solid-refresh"; // @refresh reload import { render } from 'solid-js/web'; @@ -1298,7 +1298,7 @@ if (module.hot) { `; exports[`standard (client, hydratable) > fix render > import specifiers > should work with ImportNamespaceSpecifier 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; @@ -1318,7 +1318,7 @@ if (module.hot) { `; exports[`standard (client, hydratable) > fix render > import specifiers > should work with ImportSpecifier + Identifier 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; @@ -1338,7 +1338,7 @@ if (module.hot) { `; exports[`standard (client, hydratable) > fix render > import specifiers > should work with ImportSpecifier + aliased Identifier 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; @@ -1358,7 +1358,7 @@ if (module.hot) { `; exports[`standard (client, hydratable) > fix render > import specifiers > should work with ImportSpecifier + aliased Identifier from StringLiteral 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; @@ -1378,7 +1378,7 @@ if (module.hot) { `; exports[`standard (client, hydratable) > fix render > top-level statements > should work with IfStatement 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; diff --git a/tests/client-hydratable/__snapshots__/vite.test.ts.snap b/tests/client-hydratable/__snapshots__/vite.test.ts.snap index 83ea343..0be55e9 100644 --- a/tests/client-hydratable/__snapshots__/vite.test.ts.snap +++ b/tests/client-hydratable/__snapshots__/vite.test.ts.snap @@ -8,32 +8,32 @@ if (someCond) { `; exports[`vite (client, hydratable) > Context API > should support ExportNamedDeclaration 1`] = ` -"import { $$context as _$$context } from "solid-refresh"; +"import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; import { createContext } from 'solid-js'; const _REGISTRY = _$$registry(); -export const Example = _$$context(_REGISTRY, "Example", createContext()); +export const Example = _$$component(_REGISTRY, "Example", createContext()); if (import.meta.hot) { _$$refresh("vite", import.meta.hot, _REGISTRY); }" `; exports[`vite (client, hydratable) > Context API > should support top-level VariableDeclaration 1`] = ` -"import { $$context as _$$context } from "solid-refresh"; +"import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; import { createContext } from 'solid-js'; const _REGISTRY = _$$registry(); -const Example = _$$context(_REGISTRY, "Example", createContext()); +const Example = _$$component(_REGISTRY, "Example", createContext()); if (import.meta.hot) { _$$refresh("vite", import.meta.hot, _REGISTRY); }" `; exports[`vite (client, hydratable) > ExportDefaultDeclaration w/ FunctionExpression > should skip ExportDefaultDeclaration w/ FunctionExpression with @refresh reload 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { getNextElement as _$getNextElement } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { getNextElement as _$getNextElement } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); // @refresh reload export default function Foo() { @@ -45,8 +45,8 @@ if (import.meta.hot) { `; exports[`vite (client, hydratable) > ExportDefaultDeclaration w/ FunctionExpression > should skip ExportDefaultDeclaration w/ FunctionExpression with @refresh skip 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { getNextElement as _$getNextElement } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { getNextElement as _$getNextElement } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); // @refresh skip export default function Foo() { @@ -55,9 +55,9 @@ export default function Foo() { `; exports[`vite (client, hydratable) > ExportDefaultDeclaration w/ FunctionExpression > should skip ExportDefaultDeclaration w/ FunctionExpression with invalid Component name 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; -import { getNextElement as _$getNextElement } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; +import { getNextElement as _$getNextElement } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -76,9 +76,9 @@ if (import.meta.hot) { `; exports[`vite (client, hydratable) > ExportDefaultDeclaration w/ FunctionExpression > should skip ExportDefaultDeclaration w/ FunctionExpression with valid Component name and >1 params 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; -import { getNextElement as _$getNextElement } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; +import { getNextElement as _$getNextElement } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -97,9 +97,9 @@ if (import.meta.hot) { `; exports[`vite (client, hydratable) > ExportDefaultDeclaration w/ FunctionExpression > should transform ExportDefaultDeclaration w/ FunctionExpression with valid Component name and params 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; -import { getNextElement as _$getNextElement } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; +import { getNextElement as _$getNextElement } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -122,9 +122,9 @@ if (import.meta.hot) { `; exports[`vite (client, hydratable) > ExportDefaultDeclaration w/ FunctionExpression > should transform ExportDefaultDeclaration w/ FunctionExpression with valid Component name and params 2`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; -import { getNextElement as _$getNextElement } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; +import { getNextElement as _$getNextElement } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -147,10 +147,10 @@ if (import.meta.hot) { `; exports[`vite (client, hydratable) > ExportDefaultDeclaration w/ FunctionExpression > should transform ExportDefaultDeclaration w/ FunctionExpression with valid Component name and params 3`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; -import { getNextElement as _$getNextElement } from "solid-js/web"; -import { insert as _$insert } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; +import { getNextElement as _$getNextElement } from "@solidjs/web"; +import { insert as _$insert } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -183,7 +183,7 @@ if (import.meta.hot) { `; exports[`vite (client, hydratable) > ExportDefaultDeclaration w/ FunctionExpression > should transform ExportDefaultDeclaration w/ FunctionExpression with valid Component name and params 4`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; @@ -215,9 +215,9 @@ if (import.meta.hot) { `; exports[`vite (client, hydratable) > ExportDefaultDeclaration w/ FunctionExpression > should transform ExportDefaultDeclaration w/ FunctionExpression with valid Component name and params 5`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; -import { getNextElement as _$getNextElement } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; +import { getNextElement as _$getNextElement } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`
foo\`), _tmpl$2 = /*#__PURE__*/_$template(\`
bar\`); import { $$component as _$$component } from "solid-refresh"; @@ -259,8 +259,8 @@ if (import.meta.hot) { `; exports[`vite (client, hydratable) > ExportNamedDeclaration w/ FunctionExpression > should skip ExportNamedDeclaration w/ FunctionExpression with @refresh reload 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { getNextElement as _$getNextElement } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { getNextElement as _$getNextElement } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); // @refresh reload export function Foo() { @@ -272,8 +272,8 @@ if (import.meta.hot) { `; exports[`vite (client, hydratable) > ExportNamedDeclaration w/ FunctionExpression > should skip ExportNamedDeclaration w/ FunctionExpression with @refresh skip 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { getNextElement as _$getNextElement } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { getNextElement as _$getNextElement } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); // @refresh skip export function Foo() { @@ -282,9 +282,9 @@ export function Foo() { `; exports[`vite (client, hydratable) > ExportNamedDeclaration w/ FunctionExpression > should skip ExportNamedDeclaration w/ FunctionExpression with invalid Component name 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; -import { getNextElement as _$getNextElement } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; +import { getNextElement as _$getNextElement } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -307,9 +307,9 @@ if (import.meta.hot) { `; exports[`vite (client, hydratable) > ExportNamedDeclaration w/ FunctionExpression > should skip ExportNamedDeclaration w/ FunctionExpression with valid Component name and >1 params 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; -import { getNextElement as _$getNextElement } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; +import { getNextElement as _$getNextElement } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -328,9 +328,9 @@ if (import.meta.hot) { `; exports[`vite (client, hydratable) > ExportNamedDeclaration w/ FunctionExpression > should transform ExportNamedDeclaration w/ FunctionExpression with valid Component name and params 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; -import { getNextElement as _$getNextElement } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; +import { getNextElement as _$getNextElement } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -353,9 +353,9 @@ if (import.meta.hot) { `; exports[`vite (client, hydratable) > ExportNamedDeclaration w/ FunctionExpression > should transform ExportNamedDeclaration w/ FunctionExpression with valid Component name and params 2`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; -import { getNextElement as _$getNextElement } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; +import { getNextElement as _$getNextElement } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -378,10 +378,10 @@ if (import.meta.hot) { `; exports[`vite (client, hydratable) > ExportNamedDeclaration w/ FunctionExpression > should transform ExportNamedDeclaration w/ FunctionExpression with valid Component name and params 3`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; -import { getNextElement as _$getNextElement } from "solid-js/web"; -import { insert as _$insert } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; +import { getNextElement as _$getNextElement } from "@solidjs/web"; +import { insert as _$insert } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -414,7 +414,7 @@ if (import.meta.hot) { `; exports[`vite (client, hydratable) > ExportNamedDeclaration w/ FunctionExpression > should transform ExportNamedDeclaration w/ FunctionExpression with valid Component name and params 4`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; @@ -446,9 +446,9 @@ if (import.meta.hot) { `; exports[`vite (client, hydratable) > ExportNamedDeclaration w/ FunctionExpression > should transform ExportNamedDeclaration w/ FunctionExpression with valid Component name and params 5`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; -import { getNextElement as _$getNextElement } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; +import { getNextElement as _$getNextElement } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`
foo\`), _tmpl$2 = /*#__PURE__*/_$template(\`
bar\`); import { $$component as _$$component } from "solid-refresh"; @@ -500,8 +500,8 @@ if (import.meta.hot) { `; exports[`vite (client, hydratable) > FunctionDeclaration > should skip FunctionDeclaration with @refresh reload 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { getNextElement as _$getNextElement } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { getNextElement as _$getNextElement } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); // @refresh reload function Foo() { @@ -513,8 +513,8 @@ if (import.meta.hot) { `; exports[`vite (client, hydratable) > FunctionDeclaration > should skip FunctionDeclaration with @refresh skip 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { getNextElement as _$getNextElement } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { getNextElement as _$getNextElement } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); // @refresh skip function Foo() { @@ -523,9 +523,9 @@ function Foo() { `; exports[`vite (client, hydratable) > FunctionDeclaration > should skip FunctionDeclaration with invalid Component name 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; -import { getNextElement as _$getNextElement } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; +import { getNextElement as _$getNextElement } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -544,9 +544,9 @@ if (import.meta.hot) { `; exports[`vite (client, hydratable) > FunctionDeclaration > should skip FunctionDeclaration with valid Component name and >1 params 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; -import { getNextElement as _$getNextElement } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; +import { getNextElement as _$getNextElement } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -565,9 +565,9 @@ if (import.meta.hot) { `; exports[`vite (client, hydratable) > FunctionDeclaration > should transform FunctionDeclaration with valid Component name and params 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; -import { getNextElement as _$getNextElement } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; +import { getNextElement as _$getNextElement } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -589,9 +589,9 @@ if (import.meta.hot) { `; exports[`vite (client, hydratable) > FunctionDeclaration > should transform FunctionDeclaration with valid Component name and params 2`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; -import { getNextElement as _$getNextElement } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; +import { getNextElement as _$getNextElement } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -613,10 +613,10 @@ if (import.meta.hot) { `; exports[`vite (client, hydratable) > FunctionDeclaration > should transform FunctionDeclaration with valid Component name and params 3`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; -import { getNextElement as _$getNextElement } from "solid-js/web"; -import { insert as _$insert } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; +import { getNextElement as _$getNextElement } from "@solidjs/web"; +import { insert as _$insert } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -648,7 +648,7 @@ if (import.meta.hot) { `; exports[`vite (client, hydratable) > FunctionDeclaration > should transform FunctionDeclaration with valid Component name and params 4`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; @@ -679,9 +679,9 @@ if (import.meta.hot) { `; exports[`vite (client, hydratable) > FunctionDeclaration > should transform FunctionDeclaration with valid Component name and params 5`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; -import { getNextElement as _$getNextElement } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; +import { getNextElement as _$getNextElement } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`
bar\`), _tmpl$2 = /*#__PURE__*/_$template(\`
foo\`); import { $$component as _$$component } from "solid-refresh"; @@ -722,8 +722,8 @@ if (import.meta.hot) { `; exports[`vite (client, hydratable) > VariableDeclarator > ArrowFunctionExpression > should skip VariableDeclarator w/ ArrowFunctionExpression with @refresh reload 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { getNextElement as _$getNextElement } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { getNextElement as _$getNextElement } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); // @refresh reload const Foo = () => { @@ -735,8 +735,8 @@ if (import.meta.hot) { `; exports[`vite (client, hydratable) > VariableDeclarator > ArrowFunctionExpression > should skip VariableDeclarator w/ ArrowFunctionExpression with @refresh skip 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { getNextElement as _$getNextElement } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { getNextElement as _$getNextElement } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); // @refresh skip const Foo = () => { @@ -745,9 +745,9 @@ const Foo = () => { `; exports[`vite (client, hydratable) > VariableDeclarator > ArrowFunctionExpression > should skip VariableDeclarator w/ ArrowFunctionExpression with invalid Component name 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; -import { getNextElement as _$getNextElement } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; +import { getNextElement as _$getNextElement } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -766,9 +766,9 @@ if (import.meta.hot) { `; exports[`vite (client, hydratable) > VariableDeclarator > ArrowFunctionExpression > should skip VariableDeclarator w/ ArrowFunctionExpression with valid Component name and >1 params 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; -import { getNextElement as _$getNextElement } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; +import { getNextElement as _$getNextElement } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -787,9 +787,9 @@ if (import.meta.hot) { `; exports[`vite (client, hydratable) > VariableDeclarator > ArrowFunctionExpression > should transform VariableDeclarator w/ ArrowFunctionExpression with valid Component name and params 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; -import { getNextElement as _$getNextElement } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; +import { getNextElement as _$getNextElement } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -811,9 +811,9 @@ if (import.meta.hot) { `; exports[`vite (client, hydratable) > VariableDeclarator > ArrowFunctionExpression > should transform VariableDeclarator w/ ArrowFunctionExpression with valid Component name and params 2`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; -import { getNextElement as _$getNextElement } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; +import { getNextElement as _$getNextElement } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -835,10 +835,10 @@ if (import.meta.hot) { `; exports[`vite (client, hydratable) > VariableDeclarator > ArrowFunctionExpression > should transform VariableDeclarator w/ ArrowFunctionExpression with valid Component name and params 3`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; -import { getNextElement as _$getNextElement } from "solid-js/web"; -import { insert as _$insert } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; +import { getNextElement as _$getNextElement } from "@solidjs/web"; +import { insert as _$insert } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -870,7 +870,7 @@ if (import.meta.hot) { `; exports[`vite (client, hydratable) > VariableDeclarator > ArrowFunctionExpression > should transform VariableDeclarator w/ ArrowFunctionExpression with valid Component name and params 4`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; @@ -901,9 +901,9 @@ if (import.meta.hot) { `; exports[`vite (client, hydratable) > VariableDeclarator > ArrowFunctionExpression > should transform VariableDeclarator w/ ArrowFunctionExpression with valid Component name and params 5`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; -import { getNextElement as _$getNextElement } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; +import { getNextElement as _$getNextElement } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`
bar\`), _tmpl$2 = /*#__PURE__*/_$template(\`
foo\`); import { $$component as _$$component } from "solid-refresh"; @@ -944,8 +944,8 @@ if (import.meta.hot) { `; exports[`vite (client, hydratable) > VariableDeclarator > FunctionExpression > should skip VariableDeclarator w/ FunctionExpression with @refresh reload 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { getNextElement as _$getNextElement } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { getNextElement as _$getNextElement } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); // @refresh reload const Foo = function () { @@ -957,8 +957,8 @@ if (import.meta.hot) { `; exports[`vite (client, hydratable) > VariableDeclarator > FunctionExpression > should skip VariableDeclarator w/ FunctionExpression with @refresh skip 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { getNextElement as _$getNextElement } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { getNextElement as _$getNextElement } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); // @refresh skip const Foo = function () { @@ -967,9 +967,9 @@ const Foo = function () { `; exports[`vite (client, hydratable) > VariableDeclarator > FunctionExpression > should skip VariableDeclarator w/ FunctionExpression with invalid Component name 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; -import { getNextElement as _$getNextElement } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; +import { getNextElement as _$getNextElement } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -988,9 +988,9 @@ if (import.meta.hot) { `; exports[`vite (client, hydratable) > VariableDeclarator > FunctionExpression > should skip VariableDeclarator w/ FunctionExpression with valid Component name and >1 params 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; -import { getNextElement as _$getNextElement } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; +import { getNextElement as _$getNextElement } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -1009,9 +1009,9 @@ if (import.meta.hot) { `; exports[`vite (client, hydratable) > VariableDeclarator > FunctionExpression > should transform VariableDeclarator w/ FunctionExpression with valid Component name and params 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; -import { getNextElement as _$getNextElement } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; +import { getNextElement as _$getNextElement } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -1033,9 +1033,9 @@ if (import.meta.hot) { `; exports[`vite (client, hydratable) > VariableDeclarator > FunctionExpression > should transform VariableDeclarator w/ FunctionExpression with valid Component name and params 2`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; -import { getNextElement as _$getNextElement } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; +import { getNextElement as _$getNextElement } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -1057,10 +1057,10 @@ if (import.meta.hot) { `; exports[`vite (client, hydratable) > VariableDeclarator > FunctionExpression > should transform VariableDeclarator w/ FunctionExpression with valid Component name and params 3`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; -import { getNextElement as _$getNextElement } from "solid-js/web"; -import { insert as _$insert } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; +import { getNextElement as _$getNextElement } from "@solidjs/web"; +import { insert as _$insert } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -1092,7 +1092,7 @@ if (import.meta.hot) { `; exports[`vite (client, hydratable) > VariableDeclarator > FunctionExpression > should transform VariableDeclarator w/ FunctionExpression with valid Component name and params 4`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; @@ -1123,9 +1123,9 @@ if (import.meta.hot) { `; exports[`vite (client, hydratable) > VariableDeclarator > FunctionExpression > should transform VariableDeclarator w/ FunctionExpression with valid Component name and params 5`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; -import { getNextElement as _$getNextElement } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; +import { getNextElement as _$getNextElement } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`
bar\`), _tmpl$2 = /*#__PURE__*/_$template(\`
foo\`); import { $$component as _$$component } from "solid-refresh"; @@ -1166,10 +1166,10 @@ if (import.meta.hot) { `; exports[`vite (client, hydratable) > fix build > refs > should work with a function 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; -import { getNextElement as _$getNextElement } from "solid-js/web"; -import { use as _$use } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; +import { getNextElement as _$getNextElement } from "@solidjs/web"; +import { ref as _$ref } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`
Comp\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -1178,7 +1178,7 @@ const _REGISTRY = _$$registry(); const Comp_1 = _$$component(_REGISTRY, "Comp_1", _props => /*@refresh jsx-skip*/(() => { var _el$ = _$getNextElement(_tmpl$); var _ref$ = _props.v0; - typeof _ref$ === "function" ? _$use(_ref$, _el$) : _props.v0 = _el$; + typeof _ref$ === "function" || Array.isArray(_ref$) ? _$ref(() => _ref$, _el$) : _props.v0 = _el$; return _el$; })(), { location: "example.jsx:4:19", @@ -1199,10 +1199,10 @@ if (import.meta.hot) { `; exports[`vite (client, hydratable) > fix build > refs > should work with a mutable variable 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; -import { getNextElement as _$getNextElement } from "solid-js/web"; -import { use as _$use } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; +import { getNextElement as _$getNextElement } from "@solidjs/web"; +import { ref as _$ref } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`
Comp\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -1211,7 +1211,7 @@ const _REGISTRY = _$$registry(); const Comp_1 = _$$component(_REGISTRY, "Comp_1", _props => /*@refresh jsx-skip*/(() => { var _el$ = _$getNextElement(_tmpl$); var _ref$ = _props.v0; - typeof _ref$ === "function" ? _$use(_ref$, _el$) : _props.v0 = _el$; + typeof _ref$ === "function" || Array.isArray(_ref$) ? _$ref(() => _ref$, _el$) : _props.v0 = _el$; return _el$; })(), { location: "example.jsx:4:19", @@ -1238,10 +1238,10 @@ if (import.meta.hot) { `; exports[`vite (client, hydratable) > fix build > signals as refs > should work 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; -import { getNextElement as _$getNextElement } from "solid-js/web"; -import { use as _$use } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; +import { getNextElement as _$getNextElement } from "@solidjs/web"; +import { ref as _$ref } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`
Comp\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -1251,7 +1251,7 @@ const _REGISTRY = _$$registry(); const Comp_1 = _$$component(_REGISTRY, "Comp_1", _props => /*@refresh jsx-skip*/(() => { var _el$ = _$getNextElement(_tmpl$); var _ref$ = _props.v0; - typeof _ref$ === "function" ? _$use(_ref$, _el$) : _props.v0 = _el$; + typeof _ref$ === "function" || Array.isArray(_ref$) ? _$ref(() => _ref$, _el$) : _props.v0 = _el$; return _el$; })(), { location: "example.jsx:6:19", @@ -1279,7 +1279,7 @@ if (import.meta.hot) { `; exports[`vite (client, hydratable) > fix render > @refresh reload > should work 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; // @refresh reload import { render } from 'solid-js/web'; if (root) { @@ -1292,7 +1292,7 @@ if (import.meta.hot) { `; exports[`vite (client, hydratable) > fix render > import specifiers > should work with ImportNamespaceSpecifier 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; @@ -1312,7 +1312,7 @@ if (import.meta.hot) { `; exports[`vite (client, hydratable) > fix render > import specifiers > should work with ImportSpecifier + Identifier 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; @@ -1332,7 +1332,7 @@ if (import.meta.hot) { `; exports[`vite (client, hydratable) > fix render > import specifiers > should work with ImportSpecifier + aliased Identifier 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; @@ -1352,7 +1352,7 @@ if (import.meta.hot) { `; exports[`vite (client, hydratable) > fix render > import specifiers > should work with ImportSpecifier + aliased Identifier from StringLiteral 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; @@ -1372,7 +1372,7 @@ if (import.meta.hot) { `; exports[`vite (client, hydratable) > fix render > top-level statements > should work with IfStatement 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; diff --git a/tests/client-hydratable/__snapshots__/webpack5.test.ts.snap b/tests/client-hydratable/__snapshots__/webpack5.test.ts.snap index d1da3d0..93c5558 100644 --- a/tests/client-hydratable/__snapshots__/webpack5.test.ts.snap +++ b/tests/client-hydratable/__snapshots__/webpack5.test.ts.snap @@ -8,32 +8,32 @@ if (someCond) { `; exports[`webpack5 (client, hydratable) > Context API > should support ExportNamedDeclaration 1`] = ` -"import { $$context as _$$context } from "solid-refresh"; +"import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; import { createContext } from 'solid-js'; const _REGISTRY = _$$registry(); -export const Example = _$$context(_REGISTRY, "Example", createContext()); +export const Example = _$$component(_REGISTRY, "Example", createContext()); if (import.meta.webpackHot) { _$$refresh("webpack5", import.meta.webpackHot, _REGISTRY); }" `; exports[`webpack5 (client, hydratable) > Context API > should support top-level VariableDeclaration 1`] = ` -"import { $$context as _$$context } from "solid-refresh"; +"import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; import { createContext } from 'solid-js'; const _REGISTRY = _$$registry(); -const Example = _$$context(_REGISTRY, "Example", createContext()); +const Example = _$$component(_REGISTRY, "Example", createContext()); if (import.meta.webpackHot) { _$$refresh("webpack5", import.meta.webpackHot, _REGISTRY); }" `; exports[`webpack5 (client, hydratable) > ExportDefaultDeclaration w/ FunctionExpression > should skip ExportDefaultDeclaration w/ FunctionExpression with @refresh reload 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { getNextElement as _$getNextElement } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { getNextElement as _$getNextElement } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$decline as _$$decline } from "solid-refresh"; // @refresh reload @@ -46,8 +46,8 @@ if (import.meta.webpackHot) { `; exports[`webpack5 (client, hydratable) > ExportDefaultDeclaration w/ FunctionExpression > should skip ExportDefaultDeclaration w/ FunctionExpression with @refresh skip 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { getNextElement as _$getNextElement } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { getNextElement as _$getNextElement } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); // @refresh skip export default function Foo() { @@ -56,9 +56,9 @@ export default function Foo() { `; exports[`webpack5 (client, hydratable) > ExportDefaultDeclaration w/ FunctionExpression > should skip ExportDefaultDeclaration w/ FunctionExpression with invalid Component name 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; -import { getNextElement as _$getNextElement } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; +import { getNextElement as _$getNextElement } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -77,9 +77,9 @@ if (import.meta.webpackHot) { `; exports[`webpack5 (client, hydratable) > ExportDefaultDeclaration w/ FunctionExpression > should skip ExportDefaultDeclaration w/ FunctionExpression with valid Component name and >1 params 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; -import { getNextElement as _$getNextElement } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; +import { getNextElement as _$getNextElement } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -98,9 +98,9 @@ if (import.meta.webpackHot) { `; exports[`webpack5 (client, hydratable) > ExportDefaultDeclaration w/ FunctionExpression > should transform ExportDefaultDeclaration w/ FunctionExpression with valid Component name and params 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; -import { getNextElement as _$getNextElement } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; +import { getNextElement as _$getNextElement } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -123,9 +123,9 @@ if (import.meta.webpackHot) { `; exports[`webpack5 (client, hydratable) > ExportDefaultDeclaration w/ FunctionExpression > should transform ExportDefaultDeclaration w/ FunctionExpression with valid Component name and params 2`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; -import { getNextElement as _$getNextElement } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; +import { getNextElement as _$getNextElement } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -148,10 +148,10 @@ if (import.meta.webpackHot) { `; exports[`webpack5 (client, hydratable) > ExportDefaultDeclaration w/ FunctionExpression > should transform ExportDefaultDeclaration w/ FunctionExpression with valid Component name and params 3`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; -import { getNextElement as _$getNextElement } from "solid-js/web"; -import { insert as _$insert } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; +import { getNextElement as _$getNextElement } from "@solidjs/web"; +import { insert as _$insert } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -184,7 +184,7 @@ if (import.meta.webpackHot) { `; exports[`webpack5 (client, hydratable) > ExportDefaultDeclaration w/ FunctionExpression > should transform ExportDefaultDeclaration w/ FunctionExpression with valid Component name and params 4`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; @@ -216,9 +216,9 @@ if (import.meta.webpackHot) { `; exports[`webpack5 (client, hydratable) > ExportDefaultDeclaration w/ FunctionExpression > should transform ExportDefaultDeclaration w/ FunctionExpression with valid Component name and params 5`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; -import { getNextElement as _$getNextElement } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; +import { getNextElement as _$getNextElement } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`
foo\`), _tmpl$2 = /*#__PURE__*/_$template(\`
bar\`); import { $$component as _$$component } from "solid-refresh"; @@ -260,8 +260,8 @@ if (import.meta.webpackHot) { `; exports[`webpack5 (client, hydratable) > ExportNamedDeclaration w/ FunctionExpression > should skip ExportNamedDeclaration w/ FunctionExpression with @refresh reload 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { getNextElement as _$getNextElement } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { getNextElement as _$getNextElement } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$decline as _$$decline } from "solid-refresh"; // @refresh reload @@ -274,8 +274,8 @@ if (import.meta.webpackHot) { `; exports[`webpack5 (client, hydratable) > ExportNamedDeclaration w/ FunctionExpression > should skip ExportNamedDeclaration w/ FunctionExpression with @refresh skip 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { getNextElement as _$getNextElement } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { getNextElement as _$getNextElement } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); // @refresh skip export function Foo() { @@ -284,9 +284,9 @@ export function Foo() { `; exports[`webpack5 (client, hydratable) > ExportNamedDeclaration w/ FunctionExpression > should skip ExportNamedDeclaration w/ FunctionExpression with invalid Component name 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; -import { getNextElement as _$getNextElement } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; +import { getNextElement as _$getNextElement } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -309,9 +309,9 @@ if (import.meta.webpackHot) { `; exports[`webpack5 (client, hydratable) > ExportNamedDeclaration w/ FunctionExpression > should skip ExportNamedDeclaration w/ FunctionExpression with valid Component name and >1 params 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; -import { getNextElement as _$getNextElement } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; +import { getNextElement as _$getNextElement } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -330,9 +330,9 @@ if (import.meta.webpackHot) { `; exports[`webpack5 (client, hydratable) > ExportNamedDeclaration w/ FunctionExpression > should transform ExportNamedDeclaration w/ FunctionExpression with valid Component name and params 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; -import { getNextElement as _$getNextElement } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; +import { getNextElement as _$getNextElement } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -355,9 +355,9 @@ if (import.meta.webpackHot) { `; exports[`webpack5 (client, hydratable) > ExportNamedDeclaration w/ FunctionExpression > should transform ExportNamedDeclaration w/ FunctionExpression with valid Component name and params 2`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; -import { getNextElement as _$getNextElement } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; +import { getNextElement as _$getNextElement } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -380,10 +380,10 @@ if (import.meta.webpackHot) { `; exports[`webpack5 (client, hydratable) > ExportNamedDeclaration w/ FunctionExpression > should transform ExportNamedDeclaration w/ FunctionExpression with valid Component name and params 3`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; -import { getNextElement as _$getNextElement } from "solid-js/web"; -import { insert as _$insert } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; +import { getNextElement as _$getNextElement } from "@solidjs/web"; +import { insert as _$insert } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -416,7 +416,7 @@ if (import.meta.webpackHot) { `; exports[`webpack5 (client, hydratable) > ExportNamedDeclaration w/ FunctionExpression > should transform ExportNamedDeclaration w/ FunctionExpression with valid Component name and params 4`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; @@ -448,9 +448,9 @@ if (import.meta.webpackHot) { `; exports[`webpack5 (client, hydratable) > ExportNamedDeclaration w/ FunctionExpression > should transform ExportNamedDeclaration w/ FunctionExpression with valid Component name and params 5`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; -import { getNextElement as _$getNextElement } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; +import { getNextElement as _$getNextElement } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`
foo\`), _tmpl$2 = /*#__PURE__*/_$template(\`
bar\`); import { $$component as _$$component } from "solid-refresh"; @@ -502,8 +502,8 @@ if (import.meta.webpackHot) { `; exports[`webpack5 (client, hydratable) > FunctionDeclaration > should skip FunctionDeclaration with @refresh reload 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { getNextElement as _$getNextElement } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { getNextElement as _$getNextElement } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$decline as _$$decline } from "solid-refresh"; // @refresh reload @@ -516,8 +516,8 @@ if (import.meta.webpackHot) { `; exports[`webpack5 (client, hydratable) > FunctionDeclaration > should skip FunctionDeclaration with @refresh skip 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { getNextElement as _$getNextElement } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { getNextElement as _$getNextElement } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); // @refresh skip function Foo() { @@ -526,9 +526,9 @@ function Foo() { `; exports[`webpack5 (client, hydratable) > FunctionDeclaration > should skip FunctionDeclaration with invalid Component name 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; -import { getNextElement as _$getNextElement } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; +import { getNextElement as _$getNextElement } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -547,9 +547,9 @@ if (import.meta.webpackHot) { `; exports[`webpack5 (client, hydratable) > FunctionDeclaration > should skip FunctionDeclaration with valid Component name and >1 params 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; -import { getNextElement as _$getNextElement } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; +import { getNextElement as _$getNextElement } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -568,9 +568,9 @@ if (import.meta.webpackHot) { `; exports[`webpack5 (client, hydratable) > FunctionDeclaration > should transform FunctionDeclaration with valid Component name and params 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; -import { getNextElement as _$getNextElement } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; +import { getNextElement as _$getNextElement } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -592,9 +592,9 @@ if (import.meta.webpackHot) { `; exports[`webpack5 (client, hydratable) > FunctionDeclaration > should transform FunctionDeclaration with valid Component name and params 2`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; -import { getNextElement as _$getNextElement } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; +import { getNextElement as _$getNextElement } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -616,10 +616,10 @@ if (import.meta.webpackHot) { `; exports[`webpack5 (client, hydratable) > FunctionDeclaration > should transform FunctionDeclaration with valid Component name and params 3`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; -import { getNextElement as _$getNextElement } from "solid-js/web"; -import { insert as _$insert } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; +import { getNextElement as _$getNextElement } from "@solidjs/web"; +import { insert as _$insert } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -651,7 +651,7 @@ if (import.meta.webpackHot) { `; exports[`webpack5 (client, hydratable) > FunctionDeclaration > should transform FunctionDeclaration with valid Component name and params 4`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; @@ -682,9 +682,9 @@ if (import.meta.webpackHot) { `; exports[`webpack5 (client, hydratable) > FunctionDeclaration > should transform FunctionDeclaration with valid Component name and params 5`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; -import { getNextElement as _$getNextElement } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; +import { getNextElement as _$getNextElement } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`
bar\`), _tmpl$2 = /*#__PURE__*/_$template(\`
foo\`); import { $$component as _$$component } from "solid-refresh"; @@ -725,8 +725,8 @@ if (import.meta.webpackHot) { `; exports[`webpack5 (client, hydratable) > VariableDeclarator > ArrowFunctionExpression > should skip VariableDeclarator w/ ArrowFunctionExpression with @refresh reload 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { getNextElement as _$getNextElement } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { getNextElement as _$getNextElement } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$decline as _$$decline } from "solid-refresh"; // @refresh reload @@ -739,8 +739,8 @@ if (import.meta.webpackHot) { `; exports[`webpack5 (client, hydratable) > VariableDeclarator > ArrowFunctionExpression > should skip VariableDeclarator w/ ArrowFunctionExpression with @refresh skip 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { getNextElement as _$getNextElement } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { getNextElement as _$getNextElement } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); // @refresh skip const Foo = () => { @@ -749,9 +749,9 @@ const Foo = () => { `; exports[`webpack5 (client, hydratable) > VariableDeclarator > ArrowFunctionExpression > should skip VariableDeclarator w/ ArrowFunctionExpression with invalid Component name 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; -import { getNextElement as _$getNextElement } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; +import { getNextElement as _$getNextElement } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -770,9 +770,9 @@ if (import.meta.webpackHot) { `; exports[`webpack5 (client, hydratable) > VariableDeclarator > ArrowFunctionExpression > should skip VariableDeclarator w/ ArrowFunctionExpression with valid Component name and >1 params 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; -import { getNextElement as _$getNextElement } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; +import { getNextElement as _$getNextElement } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -791,9 +791,9 @@ if (import.meta.webpackHot) { `; exports[`webpack5 (client, hydratable) > VariableDeclarator > ArrowFunctionExpression > should transform VariableDeclarator w/ ArrowFunctionExpression with valid Component name and params 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; -import { getNextElement as _$getNextElement } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; +import { getNextElement as _$getNextElement } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -815,9 +815,9 @@ if (import.meta.webpackHot) { `; exports[`webpack5 (client, hydratable) > VariableDeclarator > ArrowFunctionExpression > should transform VariableDeclarator w/ ArrowFunctionExpression with valid Component name and params 2`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; -import { getNextElement as _$getNextElement } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; +import { getNextElement as _$getNextElement } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -839,10 +839,10 @@ if (import.meta.webpackHot) { `; exports[`webpack5 (client, hydratable) > VariableDeclarator > ArrowFunctionExpression > should transform VariableDeclarator w/ ArrowFunctionExpression with valid Component name and params 3`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; -import { getNextElement as _$getNextElement } from "solid-js/web"; -import { insert as _$insert } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; +import { getNextElement as _$getNextElement } from "@solidjs/web"; +import { insert as _$insert } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -874,7 +874,7 @@ if (import.meta.webpackHot) { `; exports[`webpack5 (client, hydratable) > VariableDeclarator > ArrowFunctionExpression > should transform VariableDeclarator w/ ArrowFunctionExpression with valid Component name and params 4`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; @@ -905,9 +905,9 @@ if (import.meta.webpackHot) { `; exports[`webpack5 (client, hydratable) > VariableDeclarator > ArrowFunctionExpression > should transform VariableDeclarator w/ ArrowFunctionExpression with valid Component name and params 5`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; -import { getNextElement as _$getNextElement } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; +import { getNextElement as _$getNextElement } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`
bar\`), _tmpl$2 = /*#__PURE__*/_$template(\`
foo\`); import { $$component as _$$component } from "solid-refresh"; @@ -948,8 +948,8 @@ if (import.meta.webpackHot) { `; exports[`webpack5 (client, hydratable) > VariableDeclarator > FunctionExpression > should skip VariableDeclarator w/ FunctionExpression with @refresh reload 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { getNextElement as _$getNextElement } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { getNextElement as _$getNextElement } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$decline as _$$decline } from "solid-refresh"; // @refresh reload @@ -962,8 +962,8 @@ if (import.meta.webpackHot) { `; exports[`webpack5 (client, hydratable) > VariableDeclarator > FunctionExpression > should skip VariableDeclarator w/ FunctionExpression with @refresh skip 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { getNextElement as _$getNextElement } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { getNextElement as _$getNextElement } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); // @refresh skip const Foo = function () { @@ -972,9 +972,9 @@ const Foo = function () { `; exports[`webpack5 (client, hydratable) > VariableDeclarator > FunctionExpression > should skip VariableDeclarator w/ FunctionExpression with invalid Component name 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; -import { getNextElement as _$getNextElement } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; +import { getNextElement as _$getNextElement } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -993,9 +993,9 @@ if (import.meta.webpackHot) { `; exports[`webpack5 (client, hydratable) > VariableDeclarator > FunctionExpression > should skip VariableDeclarator w/ FunctionExpression with valid Component name and >1 params 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; -import { getNextElement as _$getNextElement } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; +import { getNextElement as _$getNextElement } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -1014,9 +1014,9 @@ if (import.meta.webpackHot) { `; exports[`webpack5 (client, hydratable) > VariableDeclarator > FunctionExpression > should transform VariableDeclarator w/ FunctionExpression with valid Component name and params 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; -import { getNextElement as _$getNextElement } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; +import { getNextElement as _$getNextElement } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -1038,9 +1038,9 @@ if (import.meta.webpackHot) { `; exports[`webpack5 (client, hydratable) > VariableDeclarator > FunctionExpression > should transform VariableDeclarator w/ FunctionExpression with valid Component name and params 2`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; -import { getNextElement as _$getNextElement } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; +import { getNextElement as _$getNextElement } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -1062,10 +1062,10 @@ if (import.meta.webpackHot) { `; exports[`webpack5 (client, hydratable) > VariableDeclarator > FunctionExpression > should transform VariableDeclarator w/ FunctionExpression with valid Component name and params 3`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; -import { getNextElement as _$getNextElement } from "solid-js/web"; -import { insert as _$insert } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; +import { getNextElement as _$getNextElement } from "@solidjs/web"; +import { insert as _$insert } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -1097,7 +1097,7 @@ if (import.meta.webpackHot) { `; exports[`webpack5 (client, hydratable) > VariableDeclarator > FunctionExpression > should transform VariableDeclarator w/ FunctionExpression with valid Component name and params 4`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; @@ -1128,9 +1128,9 @@ if (import.meta.webpackHot) { `; exports[`webpack5 (client, hydratable) > VariableDeclarator > FunctionExpression > should transform VariableDeclarator w/ FunctionExpression with valid Component name and params 5`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; -import { getNextElement as _$getNextElement } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; +import { getNextElement as _$getNextElement } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`
bar\`), _tmpl$2 = /*#__PURE__*/_$template(\`
foo\`); import { $$component as _$$component } from "solid-refresh"; @@ -1171,10 +1171,10 @@ if (import.meta.webpackHot) { `; exports[`webpack5 (client, hydratable) > fix build > refs > should work with a function 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; -import { getNextElement as _$getNextElement } from "solid-js/web"; -import { use as _$use } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; +import { getNextElement as _$getNextElement } from "@solidjs/web"; +import { ref as _$ref } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`
Comp\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -1183,7 +1183,7 @@ const _REGISTRY = _$$registry(); const Comp_1 = _$$component(_REGISTRY, "Comp_1", _props => /*@refresh jsx-skip*/(() => { var _el$ = _$getNextElement(_tmpl$); var _ref$ = _props.v0; - typeof _ref$ === "function" ? _$use(_ref$, _el$) : _props.v0 = _el$; + typeof _ref$ === "function" || Array.isArray(_ref$) ? _$ref(() => _ref$, _el$) : _props.v0 = _el$; return _el$; })(), { location: "example.jsx:4:19", @@ -1204,10 +1204,10 @@ if (import.meta.webpackHot) { `; exports[`webpack5 (client, hydratable) > fix build > refs > should work with a mutable variable 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; -import { getNextElement as _$getNextElement } from "solid-js/web"; -import { use as _$use } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; +import { getNextElement as _$getNextElement } from "@solidjs/web"; +import { ref as _$ref } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`
Comp\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -1216,7 +1216,7 @@ const _REGISTRY = _$$registry(); const Comp_1 = _$$component(_REGISTRY, "Comp_1", _props => /*@refresh jsx-skip*/(() => { var _el$ = _$getNextElement(_tmpl$); var _ref$ = _props.v0; - typeof _ref$ === "function" ? _$use(_ref$, _el$) : _props.v0 = _el$; + typeof _ref$ === "function" || Array.isArray(_ref$) ? _$ref(() => _ref$, _el$) : _props.v0 = _el$; return _el$; })(), { location: "example.jsx:4:19", @@ -1243,10 +1243,10 @@ if (import.meta.webpackHot) { `; exports[`webpack5 (client, hydratable) > fix build > signals as refs > should work 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; -import { getNextElement as _$getNextElement } from "solid-js/web"; -import { use as _$use } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; +import { getNextElement as _$getNextElement } from "@solidjs/web"; +import { ref as _$ref } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`
Comp\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -1256,7 +1256,7 @@ const _REGISTRY = _$$registry(); const Comp_1 = _$$component(_REGISTRY, "Comp_1", _props => /*@refresh jsx-skip*/(() => { var _el$ = _$getNextElement(_tmpl$); var _ref$ = _props.v0; - typeof _ref$ === "function" ? _$use(_ref$, _el$) : _props.v0 = _el$; + typeof _ref$ === "function" || Array.isArray(_ref$) ? _$ref(() => _ref$, _el$) : _props.v0 = _el$; return _el$; })(), { location: "example.jsx:6:19", @@ -1284,7 +1284,7 @@ if (import.meta.webpackHot) { `; exports[`webpack5 (client, hydratable) > fix render > @refresh reload > should work 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; import { $$decline as _$$decline } from "solid-refresh"; // @refresh reload import { render } from 'solid-js/web'; @@ -1298,7 +1298,7 @@ if (import.meta.webpackHot) { `; exports[`webpack5 (client, hydratable) > fix render > import specifiers > should work with ImportNamespaceSpecifier 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; @@ -1318,7 +1318,7 @@ if (import.meta.webpackHot) { `; exports[`webpack5 (client, hydratable) > fix render > import specifiers > should work with ImportSpecifier + Identifier 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; @@ -1338,7 +1338,7 @@ if (import.meta.webpackHot) { `; exports[`webpack5 (client, hydratable) > fix render > import specifiers > should work with ImportSpecifier + aliased Identifier 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; @@ -1358,7 +1358,7 @@ if (import.meta.webpackHot) { `; exports[`webpack5 (client, hydratable) > fix render > import specifiers > should work with ImportSpecifier + aliased Identifier from StringLiteral 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; @@ -1378,7 +1378,7 @@ if (import.meta.webpackHot) { `; exports[`webpack5 (client, hydratable) > fix render > top-level statements > should work with IfStatement 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; diff --git a/tests/client/__snapshots__/esm.test.ts.snap b/tests/client/__snapshots__/esm.test.ts.snap index 1310076..19762f3 100644 --- a/tests/client/__snapshots__/esm.test.ts.snap +++ b/tests/client/__snapshots__/esm.test.ts.snap @@ -8,31 +8,31 @@ if (someCond) { `; exports[`esm (client, non-hydratable) > Context API > should support ExportNamedDeclaration 1`] = ` -"import { $$context as _$$context } from "solid-refresh"; +"import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; import { createContext } from 'solid-js'; const _REGISTRY = _$$registry(); -export const Example = _$$context(_REGISTRY, "Example", createContext()); +export const Example = _$$component(_REGISTRY, "Example", createContext()); if (import.meta.hot) { _$$refresh("esm", import.meta.hot, _REGISTRY); }" `; exports[`esm (client, non-hydratable) > Context API > should support top-level VariableDeclaration 1`] = ` -"import { $$context as _$$context } from "solid-refresh"; +"import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; import { createContext } from 'solid-js'; const _REGISTRY = _$$registry(); -const Example = _$$context(_REGISTRY, "Example", createContext()); +const Example = _$$component(_REGISTRY, "Example", createContext()); if (import.meta.hot) { _$$refresh("esm", import.meta.hot, _REGISTRY); }" `; exports[`esm (client, non-hydratable) > ExportDefaultDeclaration w/ FunctionExpression > should skip ExportDefaultDeclaration w/ FunctionExpression with @refresh reload 1`] = ` -"import { template as _$template } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$decline as _$$decline } from "solid-refresh"; // @refresh reload @@ -45,7 +45,7 @@ if (import.meta.hot) { `; exports[`esm (client, non-hydratable) > ExportDefaultDeclaration w/ FunctionExpression > should skip ExportDefaultDeclaration w/ FunctionExpression with @refresh skip 1`] = ` -"import { template as _$template } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); // @refresh skip export default function Foo() { @@ -54,8 +54,8 @@ export default function Foo() { `; exports[`esm (client, non-hydratable) > ExportDefaultDeclaration w/ FunctionExpression > should skip ExportDefaultDeclaration w/ FunctionExpression with invalid Component name 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -74,8 +74,8 @@ if (import.meta.hot) { `; exports[`esm (client, non-hydratable) > ExportDefaultDeclaration w/ FunctionExpression > should skip ExportDefaultDeclaration w/ FunctionExpression with valid Component name and >1 params 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -94,8 +94,8 @@ if (import.meta.hot) { `; exports[`esm (client, non-hydratable) > ExportDefaultDeclaration w/ FunctionExpression > should transform ExportDefaultDeclaration w/ FunctionExpression with valid Component name and params 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -118,8 +118,8 @@ if (import.meta.hot) { `; exports[`esm (client, non-hydratable) > ExportDefaultDeclaration w/ FunctionExpression > should transform ExportDefaultDeclaration w/ FunctionExpression with valid Component name and params 2`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -142,9 +142,9 @@ if (import.meta.hot) { `; exports[`esm (client, non-hydratable) > ExportDefaultDeclaration w/ FunctionExpression > should transform ExportDefaultDeclaration w/ FunctionExpression with valid Component name and params 3`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; -import { insert as _$insert } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; +import { insert as _$insert } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -177,7 +177,7 @@ if (import.meta.hot) { `; exports[`esm (client, non-hydratable) > ExportDefaultDeclaration w/ FunctionExpression > should transform ExportDefaultDeclaration w/ FunctionExpression with valid Component name and params 4`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; @@ -209,8 +209,8 @@ if (import.meta.hot) { `; exports[`esm (client, non-hydratable) > ExportDefaultDeclaration w/ FunctionExpression > should transform ExportDefaultDeclaration w/ FunctionExpression with valid Component name and params 5`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`
foo\`), _tmpl$2 = /*#__PURE__*/_$template(\`
bar\`); import { $$component as _$$component } from "solid-refresh"; @@ -252,7 +252,7 @@ if (import.meta.hot) { `; exports[`esm (client, non-hydratable) > ExportNamedDeclaration w/ FunctionExpression > should skip ExportNamedDeclaration w/ FunctionExpression with @refresh reload 1`] = ` -"import { template as _$template } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$decline as _$$decline } from "solid-refresh"; // @refresh reload @@ -265,7 +265,7 @@ if (import.meta.hot) { `; exports[`esm (client, non-hydratable) > ExportNamedDeclaration w/ FunctionExpression > should skip ExportNamedDeclaration w/ FunctionExpression with @refresh skip 1`] = ` -"import { template as _$template } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); // @refresh skip export function Foo() { @@ -274,8 +274,8 @@ export function Foo() { `; exports[`esm (client, non-hydratable) > ExportNamedDeclaration w/ FunctionExpression > should skip ExportNamedDeclaration w/ FunctionExpression with invalid Component name 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -298,8 +298,8 @@ if (import.meta.hot) { `; exports[`esm (client, non-hydratable) > ExportNamedDeclaration w/ FunctionExpression > should skip ExportNamedDeclaration w/ FunctionExpression with valid Component name and >1 params 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -318,8 +318,8 @@ if (import.meta.hot) { `; exports[`esm (client, non-hydratable) > ExportNamedDeclaration w/ FunctionExpression > should transform ExportNamedDeclaration w/ FunctionExpression with valid Component name and params 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -342,8 +342,8 @@ if (import.meta.hot) { `; exports[`esm (client, non-hydratable) > ExportNamedDeclaration w/ FunctionExpression > should transform ExportNamedDeclaration w/ FunctionExpression with valid Component name and params 2`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -366,9 +366,9 @@ if (import.meta.hot) { `; exports[`esm (client, non-hydratable) > ExportNamedDeclaration w/ FunctionExpression > should transform ExportNamedDeclaration w/ FunctionExpression with valid Component name and params 3`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; -import { insert as _$insert } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; +import { insert as _$insert } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -401,7 +401,7 @@ if (import.meta.hot) { `; exports[`esm (client, non-hydratable) > ExportNamedDeclaration w/ FunctionExpression > should transform ExportNamedDeclaration w/ FunctionExpression with valid Component name and params 4`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; @@ -433,8 +433,8 @@ if (import.meta.hot) { `; exports[`esm (client, non-hydratable) > ExportNamedDeclaration w/ FunctionExpression > should transform ExportNamedDeclaration w/ FunctionExpression with valid Component name and params 5`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`
foo\`), _tmpl$2 = /*#__PURE__*/_$template(\`
bar\`); import { $$component as _$$component } from "solid-refresh"; @@ -486,7 +486,7 @@ if (import.meta.hot) { `; exports[`esm (client, non-hydratable) > FunctionDeclaration > should skip FunctionDeclaration with @refresh reload 1`] = ` -"import { template as _$template } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$decline as _$$decline } from "solid-refresh"; // @refresh reload @@ -499,7 +499,7 @@ if (import.meta.hot) { `; exports[`esm (client, non-hydratable) > FunctionDeclaration > should skip FunctionDeclaration with @refresh skip 1`] = ` -"import { template as _$template } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); // @refresh skip function Foo() { @@ -508,8 +508,8 @@ function Foo() { `; exports[`esm (client, non-hydratable) > FunctionDeclaration > should skip FunctionDeclaration with invalid Component name 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -528,8 +528,8 @@ if (import.meta.hot) { `; exports[`esm (client, non-hydratable) > FunctionDeclaration > should skip FunctionDeclaration with valid Component name and >1 params 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -548,8 +548,8 @@ if (import.meta.hot) { `; exports[`esm (client, non-hydratable) > FunctionDeclaration > should transform FunctionDeclaration with valid Component name and params 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -571,8 +571,8 @@ if (import.meta.hot) { `; exports[`esm (client, non-hydratable) > FunctionDeclaration > should transform FunctionDeclaration with valid Component name and params 2`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -594,9 +594,9 @@ if (import.meta.hot) { `; exports[`esm (client, non-hydratable) > FunctionDeclaration > should transform FunctionDeclaration with valid Component name and params 3`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; -import { insert as _$insert } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; +import { insert as _$insert } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -628,7 +628,7 @@ if (import.meta.hot) { `; exports[`esm (client, non-hydratable) > FunctionDeclaration > should transform FunctionDeclaration with valid Component name and params 4`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; @@ -659,8 +659,8 @@ if (import.meta.hot) { `; exports[`esm (client, non-hydratable) > FunctionDeclaration > should transform FunctionDeclaration with valid Component name and params 5`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`
bar\`), _tmpl$2 = /*#__PURE__*/_$template(\`
foo\`); import { $$component as _$$component } from "solid-refresh"; @@ -701,7 +701,7 @@ if (import.meta.hot) { `; exports[`esm (client, non-hydratable) > VariableDeclarator > ArrowFunctionExpression > should skip VariableDeclarator w/ ArrowFunctionExpression with @refresh reload 1`] = ` -"import { template as _$template } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$decline as _$$decline } from "solid-refresh"; // @refresh reload @@ -714,7 +714,7 @@ if (import.meta.hot) { `; exports[`esm (client, non-hydratable) > VariableDeclarator > ArrowFunctionExpression > should skip VariableDeclarator w/ ArrowFunctionExpression with @refresh skip 1`] = ` -"import { template as _$template } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); // @refresh skip const Foo = () => { @@ -723,8 +723,8 @@ const Foo = () => { `; exports[`esm (client, non-hydratable) > VariableDeclarator > ArrowFunctionExpression > should skip VariableDeclarator w/ ArrowFunctionExpression with invalid Component name 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -743,8 +743,8 @@ if (import.meta.hot) { `; exports[`esm (client, non-hydratable) > VariableDeclarator > ArrowFunctionExpression > should skip VariableDeclarator w/ ArrowFunctionExpression with valid Component name and >1 params 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -763,8 +763,8 @@ if (import.meta.hot) { `; exports[`esm (client, non-hydratable) > VariableDeclarator > ArrowFunctionExpression > should transform VariableDeclarator w/ ArrowFunctionExpression with valid Component name and params 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -786,8 +786,8 @@ if (import.meta.hot) { `; exports[`esm (client, non-hydratable) > VariableDeclarator > ArrowFunctionExpression > should transform VariableDeclarator w/ ArrowFunctionExpression with valid Component name and params 2`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -809,9 +809,9 @@ if (import.meta.hot) { `; exports[`esm (client, non-hydratable) > VariableDeclarator > ArrowFunctionExpression > should transform VariableDeclarator w/ ArrowFunctionExpression with valid Component name and params 3`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; -import { insert as _$insert } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; +import { insert as _$insert } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -843,7 +843,7 @@ if (import.meta.hot) { `; exports[`esm (client, non-hydratable) > VariableDeclarator > ArrowFunctionExpression > should transform VariableDeclarator w/ ArrowFunctionExpression with valid Component name and params 4`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; @@ -874,8 +874,8 @@ if (import.meta.hot) { `; exports[`esm (client, non-hydratable) > VariableDeclarator > ArrowFunctionExpression > should transform VariableDeclarator w/ ArrowFunctionExpression with valid Component name and params 5`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`
bar\`), _tmpl$2 = /*#__PURE__*/_$template(\`
foo\`); import { $$component as _$$component } from "solid-refresh"; @@ -916,7 +916,7 @@ if (import.meta.hot) { `; exports[`esm (client, non-hydratable) > VariableDeclarator > FunctionExpression > should skip VariableDeclarator w/ FunctionExpression with @refresh reload 1`] = ` -"import { template as _$template } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$decline as _$$decline } from "solid-refresh"; // @refresh reload @@ -929,7 +929,7 @@ if (import.meta.hot) { `; exports[`esm (client, non-hydratable) > VariableDeclarator > FunctionExpression > should skip VariableDeclarator w/ FunctionExpression with @refresh skip 1`] = ` -"import { template as _$template } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); // @refresh skip const Foo = function () { @@ -938,8 +938,8 @@ const Foo = function () { `; exports[`esm (client, non-hydratable) > VariableDeclarator > FunctionExpression > should skip VariableDeclarator w/ FunctionExpression with invalid Component name 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -958,8 +958,8 @@ if (import.meta.hot) { `; exports[`esm (client, non-hydratable) > VariableDeclarator > FunctionExpression > should skip VariableDeclarator w/ FunctionExpression with valid Component name and >1 params 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -978,8 +978,8 @@ if (import.meta.hot) { `; exports[`esm (client, non-hydratable) > VariableDeclarator > FunctionExpression > should transform VariableDeclarator w/ FunctionExpression with valid Component name and params 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -1001,8 +1001,8 @@ if (import.meta.hot) { `; exports[`esm (client, non-hydratable) > VariableDeclarator > FunctionExpression > should transform VariableDeclarator w/ FunctionExpression with valid Component name and params 2`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -1024,9 +1024,9 @@ if (import.meta.hot) { `; exports[`esm (client, non-hydratable) > VariableDeclarator > FunctionExpression > should transform VariableDeclarator w/ FunctionExpression with valid Component name and params 3`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; -import { insert as _$insert } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; +import { insert as _$insert } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -1058,7 +1058,7 @@ if (import.meta.hot) { `; exports[`esm (client, non-hydratable) > VariableDeclarator > FunctionExpression > should transform VariableDeclarator w/ FunctionExpression with valid Component name and params 4`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; @@ -1089,8 +1089,8 @@ if (import.meta.hot) { `; exports[`esm (client, non-hydratable) > VariableDeclarator > FunctionExpression > should transform VariableDeclarator w/ FunctionExpression with valid Component name and params 5`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`
bar\`), _tmpl$2 = /*#__PURE__*/_$template(\`
foo\`); import { $$component as _$$component } from "solid-refresh"; @@ -1131,9 +1131,9 @@ if (import.meta.hot) { `; exports[`esm (client, non-hydratable) > fix build > refs > should work with a function 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; -import { use as _$use } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; +import { ref as _$ref } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`
Comp\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -1142,7 +1142,7 @@ const _REGISTRY = _$$registry(); const Comp_1 = _$$component(_REGISTRY, "Comp_1", _props => /*@refresh jsx-skip*/(() => { var _el$ = _tmpl$(); var _ref$ = _props.v0; - typeof _ref$ === "function" ? _$use(_ref$, _el$) : _props.v0 = _el$; + typeof _ref$ === "function" || Array.isArray(_ref$) ? _$ref(() => _ref$, _el$) : _props.v0 = _el$; return _el$; })(), { location: "example.jsx:4:19", @@ -1163,9 +1163,9 @@ if (import.meta.hot) { `; exports[`esm (client, non-hydratable) > fix build > refs > should work with a mutable variable 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; -import { use as _$use } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; +import { ref as _$ref } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`
Comp\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -1174,7 +1174,7 @@ const _REGISTRY = _$$registry(); const Comp_1 = _$$component(_REGISTRY, "Comp_1", _props => /*@refresh jsx-skip*/(() => { var _el$ = _tmpl$(); var _ref$ = _props.v0; - typeof _ref$ === "function" ? _$use(_ref$, _el$) : _props.v0 = _el$; + typeof _ref$ === "function" || Array.isArray(_ref$) ? _$ref(() => _ref$, _el$) : _props.v0 = _el$; return _el$; })(), { location: "example.jsx:4:19", @@ -1201,9 +1201,9 @@ if (import.meta.hot) { `; exports[`esm (client, non-hydratable) > fix build > signals as refs > should work 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; -import { use as _$use } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; +import { ref as _$ref } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`
Comp\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -1213,7 +1213,7 @@ const _REGISTRY = _$$registry(); const Comp_1 = _$$component(_REGISTRY, "Comp_1", _props => /*@refresh jsx-skip*/(() => { var _el$ = _tmpl$(); var _ref$ = _props.v0; - typeof _ref$ === "function" ? _$use(_ref$, _el$) : _props.v0 = _el$; + typeof _ref$ === "function" || Array.isArray(_ref$) ? _$ref(() => _ref$, _el$) : _props.v0 = _el$; return _el$; })(), { location: "example.jsx:6:19", @@ -1241,7 +1241,7 @@ if (import.meta.hot) { `; exports[`esm (client, non-hydratable) > fix render > @refresh reload > should work 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; import { $$decline as _$$decline } from "solid-refresh"; // @refresh reload import { render } from 'solid-js/web'; @@ -1255,7 +1255,7 @@ if (import.meta.hot) { `; exports[`esm (client, non-hydratable) > fix render > import specifiers > should work with ImportNamespaceSpecifier 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; @@ -1275,7 +1275,7 @@ if (import.meta.hot) { `; exports[`esm (client, non-hydratable) > fix render > import specifiers > should work with ImportSpecifier + Identifier 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; @@ -1295,7 +1295,7 @@ if (import.meta.hot) { `; exports[`esm (client, non-hydratable) > fix render > import specifiers > should work with ImportSpecifier + aliased Identifier 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; @@ -1315,7 +1315,7 @@ if (import.meta.hot) { `; exports[`esm (client, non-hydratable) > fix render > import specifiers > should work with ImportSpecifier + aliased Identifier from StringLiteral 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; @@ -1335,7 +1335,7 @@ if (import.meta.hot) { `; exports[`esm (client, non-hydratable) > fix render > top-level statements > should work with IfStatement 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; diff --git a/tests/client/__snapshots__/rspack-esm.test.ts.snap b/tests/client/__snapshots__/rspack-esm.test.ts.snap index 0312760..ccde307 100644 --- a/tests/client/__snapshots__/rspack-esm.test.ts.snap +++ b/tests/client/__snapshots__/rspack-esm.test.ts.snap @@ -8,31 +8,31 @@ if (someCond) { `; exports[`rspack-esm (client, non-hydratable) > Context API > should support ExportNamedDeclaration 1`] = ` -"import { $$context as _$$context } from "solid-refresh"; +"import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; import { createContext } from 'solid-js'; const _REGISTRY = _$$registry(); -export const Example = _$$context(_REGISTRY, "Example", createContext()); +export const Example = _$$component(_REGISTRY, "Example", createContext()); if (import.meta.webpackHot) { _$$refresh("rspack-esm", import.meta.webpackHot, _REGISTRY); }" `; exports[`rspack-esm (client, non-hydratable) > Context API > should support top-level VariableDeclaration 1`] = ` -"import { $$context as _$$context } from "solid-refresh"; +"import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; import { createContext } from 'solid-js'; const _REGISTRY = _$$registry(); -const Example = _$$context(_REGISTRY, "Example", createContext()); +const Example = _$$component(_REGISTRY, "Example", createContext()); if (import.meta.webpackHot) { _$$refresh("rspack-esm", import.meta.webpackHot, _REGISTRY); }" `; exports[`rspack-esm (client, non-hydratable) > ExportDefaultDeclaration w/ FunctionExpression > should skip ExportDefaultDeclaration w/ FunctionExpression with @refresh reload 1`] = ` -"import { template as _$template } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$decline as _$$decline } from "solid-refresh"; // @refresh reload @@ -45,7 +45,7 @@ if (import.meta.webpackHot) { `; exports[`rspack-esm (client, non-hydratable) > ExportDefaultDeclaration w/ FunctionExpression > should skip ExportDefaultDeclaration w/ FunctionExpression with @refresh skip 1`] = ` -"import { template as _$template } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); // @refresh skip export default function Foo() { @@ -54,8 +54,8 @@ export default function Foo() { `; exports[`rspack-esm (client, non-hydratable) > ExportDefaultDeclaration w/ FunctionExpression > should skip ExportDefaultDeclaration w/ FunctionExpression with invalid Component name 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -74,8 +74,8 @@ if (import.meta.webpackHot) { `; exports[`rspack-esm (client, non-hydratable) > ExportDefaultDeclaration w/ FunctionExpression > should skip ExportDefaultDeclaration w/ FunctionExpression with valid Component name and >1 params 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -94,8 +94,8 @@ if (import.meta.webpackHot) { `; exports[`rspack-esm (client, non-hydratable) > ExportDefaultDeclaration w/ FunctionExpression > should transform ExportDefaultDeclaration w/ FunctionExpression with valid Component name and params 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -118,8 +118,8 @@ if (import.meta.webpackHot) { `; exports[`rspack-esm (client, non-hydratable) > ExportDefaultDeclaration w/ FunctionExpression > should transform ExportDefaultDeclaration w/ FunctionExpression with valid Component name and params 2`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -142,9 +142,9 @@ if (import.meta.webpackHot) { `; exports[`rspack-esm (client, non-hydratable) > ExportDefaultDeclaration w/ FunctionExpression > should transform ExportDefaultDeclaration w/ FunctionExpression with valid Component name and params 3`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; -import { insert as _$insert } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; +import { insert as _$insert } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -177,7 +177,7 @@ if (import.meta.webpackHot) { `; exports[`rspack-esm (client, non-hydratable) > ExportDefaultDeclaration w/ FunctionExpression > should transform ExportDefaultDeclaration w/ FunctionExpression with valid Component name and params 4`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; @@ -209,8 +209,8 @@ if (import.meta.webpackHot) { `; exports[`rspack-esm (client, non-hydratable) > ExportDefaultDeclaration w/ FunctionExpression > should transform ExportDefaultDeclaration w/ FunctionExpression with valid Component name and params 5`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`
foo\`), _tmpl$2 = /*#__PURE__*/_$template(\`
bar\`); import { $$component as _$$component } from "solid-refresh"; @@ -252,7 +252,7 @@ if (import.meta.webpackHot) { `; exports[`rspack-esm (client, non-hydratable) > ExportNamedDeclaration w/ FunctionExpression > should skip ExportNamedDeclaration w/ FunctionExpression with @refresh reload 1`] = ` -"import { template as _$template } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$decline as _$$decline } from "solid-refresh"; // @refresh reload @@ -265,7 +265,7 @@ if (import.meta.webpackHot) { `; exports[`rspack-esm (client, non-hydratable) > ExportNamedDeclaration w/ FunctionExpression > should skip ExportNamedDeclaration w/ FunctionExpression with @refresh skip 1`] = ` -"import { template as _$template } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); // @refresh skip export function Foo() { @@ -274,8 +274,8 @@ export function Foo() { `; exports[`rspack-esm (client, non-hydratable) > ExportNamedDeclaration w/ FunctionExpression > should skip ExportNamedDeclaration w/ FunctionExpression with invalid Component name 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -298,8 +298,8 @@ if (import.meta.webpackHot) { `; exports[`rspack-esm (client, non-hydratable) > ExportNamedDeclaration w/ FunctionExpression > should skip ExportNamedDeclaration w/ FunctionExpression with valid Component name and >1 params 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -318,8 +318,8 @@ if (import.meta.webpackHot) { `; exports[`rspack-esm (client, non-hydratable) > ExportNamedDeclaration w/ FunctionExpression > should transform ExportNamedDeclaration w/ FunctionExpression with valid Component name and params 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -342,8 +342,8 @@ if (import.meta.webpackHot) { `; exports[`rspack-esm (client, non-hydratable) > ExportNamedDeclaration w/ FunctionExpression > should transform ExportNamedDeclaration w/ FunctionExpression with valid Component name and params 2`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -366,9 +366,9 @@ if (import.meta.webpackHot) { `; exports[`rspack-esm (client, non-hydratable) > ExportNamedDeclaration w/ FunctionExpression > should transform ExportNamedDeclaration w/ FunctionExpression with valid Component name and params 3`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; -import { insert as _$insert } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; +import { insert as _$insert } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -401,7 +401,7 @@ if (import.meta.webpackHot) { `; exports[`rspack-esm (client, non-hydratable) > ExportNamedDeclaration w/ FunctionExpression > should transform ExportNamedDeclaration w/ FunctionExpression with valid Component name and params 4`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; @@ -433,8 +433,8 @@ if (import.meta.webpackHot) { `; exports[`rspack-esm (client, non-hydratable) > ExportNamedDeclaration w/ FunctionExpression > should transform ExportNamedDeclaration w/ FunctionExpression with valid Component name and params 5`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`
foo\`), _tmpl$2 = /*#__PURE__*/_$template(\`
bar\`); import { $$component as _$$component } from "solid-refresh"; @@ -486,7 +486,7 @@ if (import.meta.webpackHot) { `; exports[`rspack-esm (client, non-hydratable) > FunctionDeclaration > should skip FunctionDeclaration with @refresh reload 1`] = ` -"import { template as _$template } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$decline as _$$decline } from "solid-refresh"; // @refresh reload @@ -499,7 +499,7 @@ if (import.meta.webpackHot) { `; exports[`rspack-esm (client, non-hydratable) > FunctionDeclaration > should skip FunctionDeclaration with @refresh skip 1`] = ` -"import { template as _$template } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); // @refresh skip function Foo() { @@ -508,8 +508,8 @@ function Foo() { `; exports[`rspack-esm (client, non-hydratable) > FunctionDeclaration > should skip FunctionDeclaration with invalid Component name 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -528,8 +528,8 @@ if (import.meta.webpackHot) { `; exports[`rspack-esm (client, non-hydratable) > FunctionDeclaration > should skip FunctionDeclaration with valid Component name and >1 params 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -548,8 +548,8 @@ if (import.meta.webpackHot) { `; exports[`rspack-esm (client, non-hydratable) > FunctionDeclaration > should transform FunctionDeclaration with valid Component name and params 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -571,8 +571,8 @@ if (import.meta.webpackHot) { `; exports[`rspack-esm (client, non-hydratable) > FunctionDeclaration > should transform FunctionDeclaration with valid Component name and params 2`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -594,9 +594,9 @@ if (import.meta.webpackHot) { `; exports[`rspack-esm (client, non-hydratable) > FunctionDeclaration > should transform FunctionDeclaration with valid Component name and params 3`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; -import { insert as _$insert } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; +import { insert as _$insert } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -628,7 +628,7 @@ if (import.meta.webpackHot) { `; exports[`rspack-esm (client, non-hydratable) > FunctionDeclaration > should transform FunctionDeclaration with valid Component name and params 4`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; @@ -659,8 +659,8 @@ if (import.meta.webpackHot) { `; exports[`rspack-esm (client, non-hydratable) > FunctionDeclaration > should transform FunctionDeclaration with valid Component name and params 5`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`
bar\`), _tmpl$2 = /*#__PURE__*/_$template(\`
foo\`); import { $$component as _$$component } from "solid-refresh"; @@ -701,7 +701,7 @@ if (import.meta.webpackHot) { `; exports[`rspack-esm (client, non-hydratable) > VariableDeclarator > ArrowFunctionExpression > should skip VariableDeclarator w/ ArrowFunctionExpression with @refresh reload 1`] = ` -"import { template as _$template } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$decline as _$$decline } from "solid-refresh"; // @refresh reload @@ -714,7 +714,7 @@ if (import.meta.webpackHot) { `; exports[`rspack-esm (client, non-hydratable) > VariableDeclarator > ArrowFunctionExpression > should skip VariableDeclarator w/ ArrowFunctionExpression with @refresh skip 1`] = ` -"import { template as _$template } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); // @refresh skip const Foo = () => { @@ -723,8 +723,8 @@ const Foo = () => { `; exports[`rspack-esm (client, non-hydratable) > VariableDeclarator > ArrowFunctionExpression > should skip VariableDeclarator w/ ArrowFunctionExpression with invalid Component name 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -743,8 +743,8 @@ if (import.meta.webpackHot) { `; exports[`rspack-esm (client, non-hydratable) > VariableDeclarator > ArrowFunctionExpression > should skip VariableDeclarator w/ ArrowFunctionExpression with valid Component name and >1 params 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -763,8 +763,8 @@ if (import.meta.webpackHot) { `; exports[`rspack-esm (client, non-hydratable) > VariableDeclarator > ArrowFunctionExpression > should transform VariableDeclarator w/ ArrowFunctionExpression with valid Component name and params 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -786,8 +786,8 @@ if (import.meta.webpackHot) { `; exports[`rspack-esm (client, non-hydratable) > VariableDeclarator > ArrowFunctionExpression > should transform VariableDeclarator w/ ArrowFunctionExpression with valid Component name and params 2`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -809,9 +809,9 @@ if (import.meta.webpackHot) { `; exports[`rspack-esm (client, non-hydratable) > VariableDeclarator > ArrowFunctionExpression > should transform VariableDeclarator w/ ArrowFunctionExpression with valid Component name and params 3`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; -import { insert as _$insert } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; +import { insert as _$insert } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -843,7 +843,7 @@ if (import.meta.webpackHot) { `; exports[`rspack-esm (client, non-hydratable) > VariableDeclarator > ArrowFunctionExpression > should transform VariableDeclarator w/ ArrowFunctionExpression with valid Component name and params 4`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; @@ -874,8 +874,8 @@ if (import.meta.webpackHot) { `; exports[`rspack-esm (client, non-hydratable) > VariableDeclarator > ArrowFunctionExpression > should transform VariableDeclarator w/ ArrowFunctionExpression with valid Component name and params 5`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`
bar\`), _tmpl$2 = /*#__PURE__*/_$template(\`
foo\`); import { $$component as _$$component } from "solid-refresh"; @@ -916,7 +916,7 @@ if (import.meta.webpackHot) { `; exports[`rspack-esm (client, non-hydratable) > VariableDeclarator > FunctionExpression > should skip VariableDeclarator w/ FunctionExpression with @refresh reload 1`] = ` -"import { template as _$template } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$decline as _$$decline } from "solid-refresh"; // @refresh reload @@ -929,7 +929,7 @@ if (import.meta.webpackHot) { `; exports[`rspack-esm (client, non-hydratable) > VariableDeclarator > FunctionExpression > should skip VariableDeclarator w/ FunctionExpression with @refresh skip 1`] = ` -"import { template as _$template } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); // @refresh skip const Foo = function () { @@ -938,8 +938,8 @@ const Foo = function () { `; exports[`rspack-esm (client, non-hydratable) > VariableDeclarator > FunctionExpression > should skip VariableDeclarator w/ FunctionExpression with invalid Component name 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -958,8 +958,8 @@ if (import.meta.webpackHot) { `; exports[`rspack-esm (client, non-hydratable) > VariableDeclarator > FunctionExpression > should skip VariableDeclarator w/ FunctionExpression with valid Component name and >1 params 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -978,8 +978,8 @@ if (import.meta.webpackHot) { `; exports[`rspack-esm (client, non-hydratable) > VariableDeclarator > FunctionExpression > should transform VariableDeclarator w/ FunctionExpression with valid Component name and params 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -1001,8 +1001,8 @@ if (import.meta.webpackHot) { `; exports[`rspack-esm (client, non-hydratable) > VariableDeclarator > FunctionExpression > should transform VariableDeclarator w/ FunctionExpression with valid Component name and params 2`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -1024,9 +1024,9 @@ if (import.meta.webpackHot) { `; exports[`rspack-esm (client, non-hydratable) > VariableDeclarator > FunctionExpression > should transform VariableDeclarator w/ FunctionExpression with valid Component name and params 3`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; -import { insert as _$insert } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; +import { insert as _$insert } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -1058,7 +1058,7 @@ if (import.meta.webpackHot) { `; exports[`rspack-esm (client, non-hydratable) > VariableDeclarator > FunctionExpression > should transform VariableDeclarator w/ FunctionExpression with valid Component name and params 4`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; @@ -1089,8 +1089,8 @@ if (import.meta.webpackHot) { `; exports[`rspack-esm (client, non-hydratable) > VariableDeclarator > FunctionExpression > should transform VariableDeclarator w/ FunctionExpression with valid Component name and params 5`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`
bar\`), _tmpl$2 = /*#__PURE__*/_$template(\`
foo\`); import { $$component as _$$component } from "solid-refresh"; @@ -1131,9 +1131,9 @@ if (import.meta.webpackHot) { `; exports[`rspack-esm (client, non-hydratable) > fix build > refs > should work with a function 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; -import { use as _$use } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; +import { ref as _$ref } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`
Comp\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -1142,7 +1142,7 @@ const _REGISTRY = _$$registry(); const Comp_1 = _$$component(_REGISTRY, "Comp_1", _props => /*@refresh jsx-skip*/(() => { var _el$ = _tmpl$(); var _ref$ = _props.v0; - typeof _ref$ === "function" ? _$use(_ref$, _el$) : _props.v0 = _el$; + typeof _ref$ === "function" || Array.isArray(_ref$) ? _$ref(() => _ref$, _el$) : _props.v0 = _el$; return _el$; })(), { location: "example.jsx:4:19", @@ -1163,9 +1163,9 @@ if (import.meta.webpackHot) { `; exports[`rspack-esm (client, non-hydratable) > fix build > refs > should work with a mutable variable 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; -import { use as _$use } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; +import { ref as _$ref } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`
Comp\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -1174,7 +1174,7 @@ const _REGISTRY = _$$registry(); const Comp_1 = _$$component(_REGISTRY, "Comp_1", _props => /*@refresh jsx-skip*/(() => { var _el$ = _tmpl$(); var _ref$ = _props.v0; - typeof _ref$ === "function" ? _$use(_ref$, _el$) : _props.v0 = _el$; + typeof _ref$ === "function" || Array.isArray(_ref$) ? _$ref(() => _ref$, _el$) : _props.v0 = _el$; return _el$; })(), { location: "example.jsx:4:19", @@ -1201,9 +1201,9 @@ if (import.meta.webpackHot) { `; exports[`rspack-esm (client, non-hydratable) > fix build > signals as refs > should work 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; -import { use as _$use } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; +import { ref as _$ref } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`
Comp\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -1213,7 +1213,7 @@ const _REGISTRY = _$$registry(); const Comp_1 = _$$component(_REGISTRY, "Comp_1", _props => /*@refresh jsx-skip*/(() => { var _el$ = _tmpl$(); var _ref$ = _props.v0; - typeof _ref$ === "function" ? _$use(_ref$, _el$) : _props.v0 = _el$; + typeof _ref$ === "function" || Array.isArray(_ref$) ? _$ref(() => _ref$, _el$) : _props.v0 = _el$; return _el$; })(), { location: "example.jsx:6:19", @@ -1241,7 +1241,7 @@ if (import.meta.webpackHot) { `; exports[`rspack-esm (client, non-hydratable) > fix render > @refresh reload > should work 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; import { $$decline as _$$decline } from "solid-refresh"; // @refresh reload import { render } from 'solid-js/web'; @@ -1255,7 +1255,7 @@ if (import.meta.webpackHot) { `; exports[`rspack-esm (client, non-hydratable) > fix render > import specifiers > should work with ImportNamespaceSpecifier 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; @@ -1275,7 +1275,7 @@ if (import.meta.webpackHot) { `; exports[`rspack-esm (client, non-hydratable) > fix render > import specifiers > should work with ImportSpecifier + Identifier 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; @@ -1295,7 +1295,7 @@ if (import.meta.webpackHot) { `; exports[`rspack-esm (client, non-hydratable) > fix render > import specifiers > should work with ImportSpecifier + aliased Identifier 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; @@ -1315,7 +1315,7 @@ if (import.meta.webpackHot) { `; exports[`rspack-esm (client, non-hydratable) > fix render > import specifiers > should work with ImportSpecifier + aliased Identifier from StringLiteral 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; @@ -1335,7 +1335,7 @@ if (import.meta.webpackHot) { `; exports[`rspack-esm (client, non-hydratable) > fix render > top-level statements > should work with IfStatement 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; diff --git a/tests/client/__snapshots__/standard.test.ts.snap b/tests/client/__snapshots__/standard.test.ts.snap index 9fd2622..10e54bb 100644 --- a/tests/client/__snapshots__/standard.test.ts.snap +++ b/tests/client/__snapshots__/standard.test.ts.snap @@ -8,31 +8,31 @@ if (someCond) { `; exports[`standard (client, non-hydratable) > Context API > should support ExportNamedDeclaration 1`] = ` -"import { $$context as _$$context } from "solid-refresh"; +"import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; import { createContext } from 'solid-js'; const _REGISTRY = _$$registry(); -export const Example = _$$context(_REGISTRY, "Example", createContext()); +export const Example = _$$component(_REGISTRY, "Example", createContext()); if (module.hot) { _$$refresh("standard", module.hot, _REGISTRY); }" `; exports[`standard (client, non-hydratable) > Context API > should support top-level VariableDeclaration 1`] = ` -"import { $$context as _$$context } from "solid-refresh"; +"import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; import { createContext } from 'solid-js'; const _REGISTRY = _$$registry(); -const Example = _$$context(_REGISTRY, "Example", createContext()); +const Example = _$$component(_REGISTRY, "Example", createContext()); if (module.hot) { _$$refresh("standard", module.hot, _REGISTRY); }" `; exports[`standard (client, non-hydratable) > ExportDefaultDeclaration w/ FunctionExpression > should skip ExportDefaultDeclaration w/ FunctionExpression with @refresh reload 1`] = ` -"import { template as _$template } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$decline as _$$decline } from "solid-refresh"; // @refresh reload @@ -45,7 +45,7 @@ if (module.hot) { `; exports[`standard (client, non-hydratable) > ExportDefaultDeclaration w/ FunctionExpression > should skip ExportDefaultDeclaration w/ FunctionExpression with @refresh skip 1`] = ` -"import { template as _$template } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); // @refresh skip export default function Foo() { @@ -54,8 +54,8 @@ export default function Foo() { `; exports[`standard (client, non-hydratable) > ExportDefaultDeclaration w/ FunctionExpression > should skip ExportDefaultDeclaration w/ FunctionExpression with invalid Component name 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -74,8 +74,8 @@ if (module.hot) { `; exports[`standard (client, non-hydratable) > ExportDefaultDeclaration w/ FunctionExpression > should skip ExportDefaultDeclaration w/ FunctionExpression with valid Component name and >1 params 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -94,8 +94,8 @@ if (module.hot) { `; exports[`standard (client, non-hydratable) > ExportDefaultDeclaration w/ FunctionExpression > should transform ExportDefaultDeclaration w/ FunctionExpression with valid Component name and params 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -118,8 +118,8 @@ if (module.hot) { `; exports[`standard (client, non-hydratable) > ExportDefaultDeclaration w/ FunctionExpression > should transform ExportDefaultDeclaration w/ FunctionExpression with valid Component name and params 2`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -142,9 +142,9 @@ if (module.hot) { `; exports[`standard (client, non-hydratable) > ExportDefaultDeclaration w/ FunctionExpression > should transform ExportDefaultDeclaration w/ FunctionExpression with valid Component name and params 3`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; -import { insert as _$insert } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; +import { insert as _$insert } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -177,7 +177,7 @@ if (module.hot) { `; exports[`standard (client, non-hydratable) > ExportDefaultDeclaration w/ FunctionExpression > should transform ExportDefaultDeclaration w/ FunctionExpression with valid Component name and params 4`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; @@ -209,8 +209,8 @@ if (module.hot) { `; exports[`standard (client, non-hydratable) > ExportDefaultDeclaration w/ FunctionExpression > should transform ExportDefaultDeclaration w/ FunctionExpression with valid Component name and params 5`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`
foo\`), _tmpl$2 = /*#__PURE__*/_$template(\`
bar\`); import { $$component as _$$component } from "solid-refresh"; @@ -252,7 +252,7 @@ if (module.hot) { `; exports[`standard (client, non-hydratable) > ExportNamedDeclaration w/ FunctionExpression > should skip ExportNamedDeclaration w/ FunctionExpression with @refresh reload 1`] = ` -"import { template as _$template } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$decline as _$$decline } from "solid-refresh"; // @refresh reload @@ -265,7 +265,7 @@ if (module.hot) { `; exports[`standard (client, non-hydratable) > ExportNamedDeclaration w/ FunctionExpression > should skip ExportNamedDeclaration w/ FunctionExpression with @refresh skip 1`] = ` -"import { template as _$template } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); // @refresh skip export function Foo() { @@ -274,8 +274,8 @@ export function Foo() { `; exports[`standard (client, non-hydratable) > ExportNamedDeclaration w/ FunctionExpression > should skip ExportNamedDeclaration w/ FunctionExpression with invalid Component name 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -298,8 +298,8 @@ if (module.hot) { `; exports[`standard (client, non-hydratable) > ExportNamedDeclaration w/ FunctionExpression > should skip ExportNamedDeclaration w/ FunctionExpression with valid Component name and >1 params 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -318,8 +318,8 @@ if (module.hot) { `; exports[`standard (client, non-hydratable) > ExportNamedDeclaration w/ FunctionExpression > should transform ExportNamedDeclaration w/ FunctionExpression with valid Component name and params 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -342,8 +342,8 @@ if (module.hot) { `; exports[`standard (client, non-hydratable) > ExportNamedDeclaration w/ FunctionExpression > should transform ExportNamedDeclaration w/ FunctionExpression with valid Component name and params 2`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -366,9 +366,9 @@ if (module.hot) { `; exports[`standard (client, non-hydratable) > ExportNamedDeclaration w/ FunctionExpression > should transform ExportNamedDeclaration w/ FunctionExpression with valid Component name and params 3`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; -import { insert as _$insert } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; +import { insert as _$insert } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -401,7 +401,7 @@ if (module.hot) { `; exports[`standard (client, non-hydratable) > ExportNamedDeclaration w/ FunctionExpression > should transform ExportNamedDeclaration w/ FunctionExpression with valid Component name and params 4`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; @@ -433,8 +433,8 @@ if (module.hot) { `; exports[`standard (client, non-hydratable) > ExportNamedDeclaration w/ FunctionExpression > should transform ExportNamedDeclaration w/ FunctionExpression with valid Component name and params 5`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`
foo\`), _tmpl$2 = /*#__PURE__*/_$template(\`
bar\`); import { $$component as _$$component } from "solid-refresh"; @@ -486,7 +486,7 @@ if (module.hot) { `; exports[`standard (client, non-hydratable) > FunctionDeclaration > should skip FunctionDeclaration with @refresh reload 1`] = ` -"import { template as _$template } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$decline as _$$decline } from "solid-refresh"; // @refresh reload @@ -499,7 +499,7 @@ if (module.hot) { `; exports[`standard (client, non-hydratable) > FunctionDeclaration > should skip FunctionDeclaration with @refresh skip 1`] = ` -"import { template as _$template } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); // @refresh skip function Foo() { @@ -508,8 +508,8 @@ function Foo() { `; exports[`standard (client, non-hydratable) > FunctionDeclaration > should skip FunctionDeclaration with invalid Component name 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -528,8 +528,8 @@ if (module.hot) { `; exports[`standard (client, non-hydratable) > FunctionDeclaration > should skip FunctionDeclaration with valid Component name and >1 params 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -548,8 +548,8 @@ if (module.hot) { `; exports[`standard (client, non-hydratable) > FunctionDeclaration > should transform FunctionDeclaration with valid Component name and params 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -571,8 +571,8 @@ if (module.hot) { `; exports[`standard (client, non-hydratable) > FunctionDeclaration > should transform FunctionDeclaration with valid Component name and params 2`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -594,9 +594,9 @@ if (module.hot) { `; exports[`standard (client, non-hydratable) > FunctionDeclaration > should transform FunctionDeclaration with valid Component name and params 3`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; -import { insert as _$insert } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; +import { insert as _$insert } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -628,7 +628,7 @@ if (module.hot) { `; exports[`standard (client, non-hydratable) > FunctionDeclaration > should transform FunctionDeclaration with valid Component name and params 4`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; @@ -659,8 +659,8 @@ if (module.hot) { `; exports[`standard (client, non-hydratable) > FunctionDeclaration > should transform FunctionDeclaration with valid Component name and params 5`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`
bar\`), _tmpl$2 = /*#__PURE__*/_$template(\`
foo\`); import { $$component as _$$component } from "solid-refresh"; @@ -701,7 +701,7 @@ if (module.hot) { `; exports[`standard (client, non-hydratable) > VariableDeclarator > ArrowFunctionExpression > should skip VariableDeclarator w/ ArrowFunctionExpression with @refresh reload 1`] = ` -"import { template as _$template } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$decline as _$$decline } from "solid-refresh"; // @refresh reload @@ -714,7 +714,7 @@ if (module.hot) { `; exports[`standard (client, non-hydratable) > VariableDeclarator > ArrowFunctionExpression > should skip VariableDeclarator w/ ArrowFunctionExpression with @refresh skip 1`] = ` -"import { template as _$template } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); // @refresh skip const Foo = () => { @@ -723,8 +723,8 @@ const Foo = () => { `; exports[`standard (client, non-hydratable) > VariableDeclarator > ArrowFunctionExpression > should skip VariableDeclarator w/ ArrowFunctionExpression with invalid Component name 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -743,8 +743,8 @@ if (module.hot) { `; exports[`standard (client, non-hydratable) > VariableDeclarator > ArrowFunctionExpression > should skip VariableDeclarator w/ ArrowFunctionExpression with valid Component name and >1 params 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -763,8 +763,8 @@ if (module.hot) { `; exports[`standard (client, non-hydratable) > VariableDeclarator > ArrowFunctionExpression > should transform VariableDeclarator w/ ArrowFunctionExpression with valid Component name and params 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -786,8 +786,8 @@ if (module.hot) { `; exports[`standard (client, non-hydratable) > VariableDeclarator > ArrowFunctionExpression > should transform VariableDeclarator w/ ArrowFunctionExpression with valid Component name and params 2`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -809,9 +809,9 @@ if (module.hot) { `; exports[`standard (client, non-hydratable) > VariableDeclarator > ArrowFunctionExpression > should transform VariableDeclarator w/ ArrowFunctionExpression with valid Component name and params 3`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; -import { insert as _$insert } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; +import { insert as _$insert } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -843,7 +843,7 @@ if (module.hot) { `; exports[`standard (client, non-hydratable) > VariableDeclarator > ArrowFunctionExpression > should transform VariableDeclarator w/ ArrowFunctionExpression with valid Component name and params 4`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; @@ -874,8 +874,8 @@ if (module.hot) { `; exports[`standard (client, non-hydratable) > VariableDeclarator > ArrowFunctionExpression > should transform VariableDeclarator w/ ArrowFunctionExpression with valid Component name and params 5`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`
bar\`), _tmpl$2 = /*#__PURE__*/_$template(\`
foo\`); import { $$component as _$$component } from "solid-refresh"; @@ -916,7 +916,7 @@ if (module.hot) { `; exports[`standard (client, non-hydratable) > VariableDeclarator > FunctionExpression > should skip VariableDeclarator w/ FunctionExpression with @refresh reload 1`] = ` -"import { template as _$template } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$decline as _$$decline } from "solid-refresh"; // @refresh reload @@ -929,7 +929,7 @@ if (module.hot) { `; exports[`standard (client, non-hydratable) > VariableDeclarator > FunctionExpression > should skip VariableDeclarator w/ FunctionExpression with @refresh skip 1`] = ` -"import { template as _$template } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); // @refresh skip const Foo = function () { @@ -938,8 +938,8 @@ const Foo = function () { `; exports[`standard (client, non-hydratable) > VariableDeclarator > FunctionExpression > should skip VariableDeclarator w/ FunctionExpression with invalid Component name 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -958,8 +958,8 @@ if (module.hot) { `; exports[`standard (client, non-hydratable) > VariableDeclarator > FunctionExpression > should skip VariableDeclarator w/ FunctionExpression with valid Component name and >1 params 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -978,8 +978,8 @@ if (module.hot) { `; exports[`standard (client, non-hydratable) > VariableDeclarator > FunctionExpression > should transform VariableDeclarator w/ FunctionExpression with valid Component name and params 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -1001,8 +1001,8 @@ if (module.hot) { `; exports[`standard (client, non-hydratable) > VariableDeclarator > FunctionExpression > should transform VariableDeclarator w/ FunctionExpression with valid Component name and params 2`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -1024,9 +1024,9 @@ if (module.hot) { `; exports[`standard (client, non-hydratable) > VariableDeclarator > FunctionExpression > should transform VariableDeclarator w/ FunctionExpression with valid Component name and params 3`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; -import { insert as _$insert } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; +import { insert as _$insert } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -1058,7 +1058,7 @@ if (module.hot) { `; exports[`standard (client, non-hydratable) > VariableDeclarator > FunctionExpression > should transform VariableDeclarator w/ FunctionExpression with valid Component name and params 4`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; @@ -1089,8 +1089,8 @@ if (module.hot) { `; exports[`standard (client, non-hydratable) > VariableDeclarator > FunctionExpression > should transform VariableDeclarator w/ FunctionExpression with valid Component name and params 5`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`
bar\`), _tmpl$2 = /*#__PURE__*/_$template(\`
foo\`); import { $$component as _$$component } from "solid-refresh"; @@ -1131,9 +1131,9 @@ if (module.hot) { `; exports[`standard (client, non-hydratable) > fix build > refs > should work with a function 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; -import { use as _$use } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; +import { ref as _$ref } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`
Comp\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -1142,7 +1142,7 @@ const _REGISTRY = _$$registry(); const Comp_1 = _$$component(_REGISTRY, "Comp_1", _props => /*@refresh jsx-skip*/(() => { var _el$ = _tmpl$(); var _ref$ = _props.v0; - typeof _ref$ === "function" ? _$use(_ref$, _el$) : _props.v0 = _el$; + typeof _ref$ === "function" || Array.isArray(_ref$) ? _$ref(() => _ref$, _el$) : _props.v0 = _el$; return _el$; })(), { location: "example.jsx:4:19", @@ -1163,9 +1163,9 @@ if (module.hot) { `; exports[`standard (client, non-hydratable) > fix build > refs > should work with a mutable variable 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; -import { use as _$use } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; +import { ref as _$ref } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`
Comp\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -1174,7 +1174,7 @@ const _REGISTRY = _$$registry(); const Comp_1 = _$$component(_REGISTRY, "Comp_1", _props => /*@refresh jsx-skip*/(() => { var _el$ = _tmpl$(); var _ref$ = _props.v0; - typeof _ref$ === "function" ? _$use(_ref$, _el$) : _props.v0 = _el$; + typeof _ref$ === "function" || Array.isArray(_ref$) ? _$ref(() => _ref$, _el$) : _props.v0 = _el$; return _el$; })(), { location: "example.jsx:4:19", @@ -1201,9 +1201,9 @@ if (module.hot) { `; exports[`standard (client, non-hydratable) > fix build > signals as refs > should work 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; -import { use as _$use } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; +import { ref as _$ref } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`
Comp\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -1213,7 +1213,7 @@ const _REGISTRY = _$$registry(); const Comp_1 = _$$component(_REGISTRY, "Comp_1", _props => /*@refresh jsx-skip*/(() => { var _el$ = _tmpl$(); var _ref$ = _props.v0; - typeof _ref$ === "function" ? _$use(_ref$, _el$) : _props.v0 = _el$; + typeof _ref$ === "function" || Array.isArray(_ref$) ? _$ref(() => _ref$, _el$) : _props.v0 = _el$; return _el$; })(), { location: "example.jsx:6:19", @@ -1241,7 +1241,7 @@ if (module.hot) { `; exports[`standard (client, non-hydratable) > fix render > @refresh reload > should work 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; import { $$decline as _$$decline } from "solid-refresh"; // @refresh reload import { render } from 'solid-js/web'; @@ -1255,7 +1255,7 @@ if (module.hot) { `; exports[`standard (client, non-hydratable) > fix render > import specifiers > should work with ImportNamespaceSpecifier 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; @@ -1275,7 +1275,7 @@ if (module.hot) { `; exports[`standard (client, non-hydratable) > fix render > import specifiers > should work with ImportSpecifier + Identifier 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; @@ -1295,7 +1295,7 @@ if (module.hot) { `; exports[`standard (client, non-hydratable) > fix render > import specifiers > should work with ImportSpecifier + aliased Identifier 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; @@ -1315,7 +1315,7 @@ if (module.hot) { `; exports[`standard (client, non-hydratable) > fix render > import specifiers > should work with ImportSpecifier + aliased Identifier from StringLiteral 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; @@ -1335,7 +1335,7 @@ if (module.hot) { `; exports[`standard (client, non-hydratable) > fix render > top-level statements > should work with IfStatement 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; diff --git a/tests/client/__snapshots__/vite.test.ts.snap b/tests/client/__snapshots__/vite.test.ts.snap index 2db2596..744221e 100644 --- a/tests/client/__snapshots__/vite.test.ts.snap +++ b/tests/client/__snapshots__/vite.test.ts.snap @@ -8,31 +8,31 @@ if (someCond) { `; exports[`vite (client, non-hydratable) > Context API > should support ExportNamedDeclaration 1`] = ` -"import { $$context as _$$context } from "solid-refresh"; +"import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; import { createContext } from 'solid-js'; const _REGISTRY = _$$registry(); -export const Example = _$$context(_REGISTRY, "Example", createContext()); +export const Example = _$$component(_REGISTRY, "Example", createContext()); if (import.meta.hot) { _$$refresh("vite", import.meta.hot, _REGISTRY); }" `; exports[`vite (client, non-hydratable) > Context API > should support top-level VariableDeclaration 1`] = ` -"import { $$context as _$$context } from "solid-refresh"; +"import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; import { createContext } from 'solid-js'; const _REGISTRY = _$$registry(); -const Example = _$$context(_REGISTRY, "Example", createContext()); +const Example = _$$component(_REGISTRY, "Example", createContext()); if (import.meta.hot) { _$$refresh("vite", import.meta.hot, _REGISTRY); }" `; exports[`vite (client, non-hydratable) > ExportDefaultDeclaration w/ FunctionExpression > should skip ExportDefaultDeclaration w/ FunctionExpression with @refresh reload 1`] = ` -"import { template as _$template } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); // @refresh reload export default function Foo() { @@ -44,7 +44,7 @@ if (import.meta.hot) { `; exports[`vite (client, non-hydratable) > ExportDefaultDeclaration w/ FunctionExpression > should skip ExportDefaultDeclaration w/ FunctionExpression with @refresh skip 1`] = ` -"import { template as _$template } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); // @refresh skip export default function Foo() { @@ -53,8 +53,8 @@ export default function Foo() { `; exports[`vite (client, non-hydratable) > ExportDefaultDeclaration w/ FunctionExpression > should skip ExportDefaultDeclaration w/ FunctionExpression with invalid Component name 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -73,8 +73,8 @@ if (import.meta.hot) { `; exports[`vite (client, non-hydratable) > ExportDefaultDeclaration w/ FunctionExpression > should skip ExportDefaultDeclaration w/ FunctionExpression with valid Component name and >1 params 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -93,8 +93,8 @@ if (import.meta.hot) { `; exports[`vite (client, non-hydratable) > ExportDefaultDeclaration w/ FunctionExpression > should transform ExportDefaultDeclaration w/ FunctionExpression with valid Component name and params 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -117,8 +117,8 @@ if (import.meta.hot) { `; exports[`vite (client, non-hydratable) > ExportDefaultDeclaration w/ FunctionExpression > should transform ExportDefaultDeclaration w/ FunctionExpression with valid Component name and params 2`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -141,9 +141,9 @@ if (import.meta.hot) { `; exports[`vite (client, non-hydratable) > ExportDefaultDeclaration w/ FunctionExpression > should transform ExportDefaultDeclaration w/ FunctionExpression with valid Component name and params 3`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; -import { insert as _$insert } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; +import { insert as _$insert } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -176,7 +176,7 @@ if (import.meta.hot) { `; exports[`vite (client, non-hydratable) > ExportDefaultDeclaration w/ FunctionExpression > should transform ExportDefaultDeclaration w/ FunctionExpression with valid Component name and params 4`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; @@ -208,8 +208,8 @@ if (import.meta.hot) { `; exports[`vite (client, non-hydratable) > ExportDefaultDeclaration w/ FunctionExpression > should transform ExportDefaultDeclaration w/ FunctionExpression with valid Component name and params 5`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`
foo\`), _tmpl$2 = /*#__PURE__*/_$template(\`
bar\`); import { $$component as _$$component } from "solid-refresh"; @@ -251,7 +251,7 @@ if (import.meta.hot) { `; exports[`vite (client, non-hydratable) > ExportNamedDeclaration w/ FunctionExpression > should skip ExportNamedDeclaration w/ FunctionExpression with @refresh reload 1`] = ` -"import { template as _$template } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); // @refresh reload export function Foo() { @@ -263,7 +263,7 @@ if (import.meta.hot) { `; exports[`vite (client, non-hydratable) > ExportNamedDeclaration w/ FunctionExpression > should skip ExportNamedDeclaration w/ FunctionExpression with @refresh skip 1`] = ` -"import { template as _$template } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); // @refresh skip export function Foo() { @@ -272,8 +272,8 @@ export function Foo() { `; exports[`vite (client, non-hydratable) > ExportNamedDeclaration w/ FunctionExpression > should skip ExportNamedDeclaration w/ FunctionExpression with invalid Component name 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -296,8 +296,8 @@ if (import.meta.hot) { `; exports[`vite (client, non-hydratable) > ExportNamedDeclaration w/ FunctionExpression > should skip ExportNamedDeclaration w/ FunctionExpression with valid Component name and >1 params 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -316,8 +316,8 @@ if (import.meta.hot) { `; exports[`vite (client, non-hydratable) > ExportNamedDeclaration w/ FunctionExpression > should transform ExportNamedDeclaration w/ FunctionExpression with valid Component name and params 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -340,8 +340,8 @@ if (import.meta.hot) { `; exports[`vite (client, non-hydratable) > ExportNamedDeclaration w/ FunctionExpression > should transform ExportNamedDeclaration w/ FunctionExpression with valid Component name and params 2`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -364,9 +364,9 @@ if (import.meta.hot) { `; exports[`vite (client, non-hydratable) > ExportNamedDeclaration w/ FunctionExpression > should transform ExportNamedDeclaration w/ FunctionExpression with valid Component name and params 3`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; -import { insert as _$insert } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; +import { insert as _$insert } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -399,7 +399,7 @@ if (import.meta.hot) { `; exports[`vite (client, non-hydratable) > ExportNamedDeclaration w/ FunctionExpression > should transform ExportNamedDeclaration w/ FunctionExpression with valid Component name and params 4`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; @@ -431,8 +431,8 @@ if (import.meta.hot) { `; exports[`vite (client, non-hydratable) > ExportNamedDeclaration w/ FunctionExpression > should transform ExportNamedDeclaration w/ FunctionExpression with valid Component name and params 5`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`
foo\`), _tmpl$2 = /*#__PURE__*/_$template(\`
bar\`); import { $$component as _$$component } from "solid-refresh"; @@ -484,7 +484,7 @@ if (import.meta.hot) { `; exports[`vite (client, non-hydratable) > FunctionDeclaration > should skip FunctionDeclaration with @refresh reload 1`] = ` -"import { template as _$template } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); // @refresh reload function Foo() { @@ -496,7 +496,7 @@ if (import.meta.hot) { `; exports[`vite (client, non-hydratable) > FunctionDeclaration > should skip FunctionDeclaration with @refresh skip 1`] = ` -"import { template as _$template } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); // @refresh skip function Foo() { @@ -505,8 +505,8 @@ function Foo() { `; exports[`vite (client, non-hydratable) > FunctionDeclaration > should skip FunctionDeclaration with invalid Component name 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -525,8 +525,8 @@ if (import.meta.hot) { `; exports[`vite (client, non-hydratable) > FunctionDeclaration > should skip FunctionDeclaration with valid Component name and >1 params 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -545,8 +545,8 @@ if (import.meta.hot) { `; exports[`vite (client, non-hydratable) > FunctionDeclaration > should transform FunctionDeclaration with valid Component name and params 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -568,8 +568,8 @@ if (import.meta.hot) { `; exports[`vite (client, non-hydratable) > FunctionDeclaration > should transform FunctionDeclaration with valid Component name and params 2`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -591,9 +591,9 @@ if (import.meta.hot) { `; exports[`vite (client, non-hydratable) > FunctionDeclaration > should transform FunctionDeclaration with valid Component name and params 3`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; -import { insert as _$insert } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; +import { insert as _$insert } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -625,7 +625,7 @@ if (import.meta.hot) { `; exports[`vite (client, non-hydratable) > FunctionDeclaration > should transform FunctionDeclaration with valid Component name and params 4`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; @@ -656,8 +656,8 @@ if (import.meta.hot) { `; exports[`vite (client, non-hydratable) > FunctionDeclaration > should transform FunctionDeclaration with valid Component name and params 5`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`
bar\`), _tmpl$2 = /*#__PURE__*/_$template(\`
foo\`); import { $$component as _$$component } from "solid-refresh"; @@ -698,7 +698,7 @@ if (import.meta.hot) { `; exports[`vite (client, non-hydratable) > VariableDeclarator > ArrowFunctionExpression > should skip VariableDeclarator w/ ArrowFunctionExpression with @refresh reload 1`] = ` -"import { template as _$template } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); // @refresh reload const Foo = () => { @@ -710,7 +710,7 @@ if (import.meta.hot) { `; exports[`vite (client, non-hydratable) > VariableDeclarator > ArrowFunctionExpression > should skip VariableDeclarator w/ ArrowFunctionExpression with @refresh skip 1`] = ` -"import { template as _$template } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); // @refresh skip const Foo = () => { @@ -719,8 +719,8 @@ const Foo = () => { `; exports[`vite (client, non-hydratable) > VariableDeclarator > ArrowFunctionExpression > should skip VariableDeclarator w/ ArrowFunctionExpression with invalid Component name 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -739,8 +739,8 @@ if (import.meta.hot) { `; exports[`vite (client, non-hydratable) > VariableDeclarator > ArrowFunctionExpression > should skip VariableDeclarator w/ ArrowFunctionExpression with valid Component name and >1 params 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -759,8 +759,8 @@ if (import.meta.hot) { `; exports[`vite (client, non-hydratable) > VariableDeclarator > ArrowFunctionExpression > should transform VariableDeclarator w/ ArrowFunctionExpression with valid Component name and params 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -782,8 +782,8 @@ if (import.meta.hot) { `; exports[`vite (client, non-hydratable) > VariableDeclarator > ArrowFunctionExpression > should transform VariableDeclarator w/ ArrowFunctionExpression with valid Component name and params 2`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -805,9 +805,9 @@ if (import.meta.hot) { `; exports[`vite (client, non-hydratable) > VariableDeclarator > ArrowFunctionExpression > should transform VariableDeclarator w/ ArrowFunctionExpression with valid Component name and params 3`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; -import { insert as _$insert } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; +import { insert as _$insert } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -839,7 +839,7 @@ if (import.meta.hot) { `; exports[`vite (client, non-hydratable) > VariableDeclarator > ArrowFunctionExpression > should transform VariableDeclarator w/ ArrowFunctionExpression with valid Component name and params 4`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; @@ -870,8 +870,8 @@ if (import.meta.hot) { `; exports[`vite (client, non-hydratable) > VariableDeclarator > ArrowFunctionExpression > should transform VariableDeclarator w/ ArrowFunctionExpression with valid Component name and params 5`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`
bar\`), _tmpl$2 = /*#__PURE__*/_$template(\`
foo\`); import { $$component as _$$component } from "solid-refresh"; @@ -912,7 +912,7 @@ if (import.meta.hot) { `; exports[`vite (client, non-hydratable) > VariableDeclarator > FunctionExpression > should skip VariableDeclarator w/ FunctionExpression with @refresh reload 1`] = ` -"import { template as _$template } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); // @refresh reload const Foo = function () { @@ -924,7 +924,7 @@ if (import.meta.hot) { `; exports[`vite (client, non-hydratable) > VariableDeclarator > FunctionExpression > should skip VariableDeclarator w/ FunctionExpression with @refresh skip 1`] = ` -"import { template as _$template } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); // @refresh skip const Foo = function () { @@ -933,8 +933,8 @@ const Foo = function () { `; exports[`vite (client, non-hydratable) > VariableDeclarator > FunctionExpression > should skip VariableDeclarator w/ FunctionExpression with invalid Component name 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -953,8 +953,8 @@ if (import.meta.hot) { `; exports[`vite (client, non-hydratable) > VariableDeclarator > FunctionExpression > should skip VariableDeclarator w/ FunctionExpression with valid Component name and >1 params 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -973,8 +973,8 @@ if (import.meta.hot) { `; exports[`vite (client, non-hydratable) > VariableDeclarator > FunctionExpression > should transform VariableDeclarator w/ FunctionExpression with valid Component name and params 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -996,8 +996,8 @@ if (import.meta.hot) { `; exports[`vite (client, non-hydratable) > VariableDeclarator > FunctionExpression > should transform VariableDeclarator w/ FunctionExpression with valid Component name and params 2`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -1019,9 +1019,9 @@ if (import.meta.hot) { `; exports[`vite (client, non-hydratable) > VariableDeclarator > FunctionExpression > should transform VariableDeclarator w/ FunctionExpression with valid Component name and params 3`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; -import { insert as _$insert } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; +import { insert as _$insert } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -1053,7 +1053,7 @@ if (import.meta.hot) { `; exports[`vite (client, non-hydratable) > VariableDeclarator > FunctionExpression > should transform VariableDeclarator w/ FunctionExpression with valid Component name and params 4`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; @@ -1084,8 +1084,8 @@ if (import.meta.hot) { `; exports[`vite (client, non-hydratable) > VariableDeclarator > FunctionExpression > should transform VariableDeclarator w/ FunctionExpression with valid Component name and params 5`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`
bar\`), _tmpl$2 = /*#__PURE__*/_$template(\`
foo\`); import { $$component as _$$component } from "solid-refresh"; @@ -1126,9 +1126,9 @@ if (import.meta.hot) { `; exports[`vite (client, non-hydratable) > fix build > refs > should work with a function 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; -import { use as _$use } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; +import { ref as _$ref } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`
Comp\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -1137,7 +1137,7 @@ const _REGISTRY = _$$registry(); const Comp_1 = _$$component(_REGISTRY, "Comp_1", _props => /*@refresh jsx-skip*/(() => { var _el$ = _tmpl$(); var _ref$ = _props.v0; - typeof _ref$ === "function" ? _$use(_ref$, _el$) : _props.v0 = _el$; + typeof _ref$ === "function" || Array.isArray(_ref$) ? _$ref(() => _ref$, _el$) : _props.v0 = _el$; return _el$; })(), { location: "example.jsx:4:19", @@ -1158,9 +1158,9 @@ if (import.meta.hot) { `; exports[`vite (client, non-hydratable) > fix build > refs > should work with a mutable variable 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; -import { use as _$use } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; +import { ref as _$ref } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`
Comp\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -1169,7 +1169,7 @@ const _REGISTRY = _$$registry(); const Comp_1 = _$$component(_REGISTRY, "Comp_1", _props => /*@refresh jsx-skip*/(() => { var _el$ = _tmpl$(); var _ref$ = _props.v0; - typeof _ref$ === "function" ? _$use(_ref$, _el$) : _props.v0 = _el$; + typeof _ref$ === "function" || Array.isArray(_ref$) ? _$ref(() => _ref$, _el$) : _props.v0 = _el$; return _el$; })(), { location: "example.jsx:4:19", @@ -1196,9 +1196,9 @@ if (import.meta.hot) { `; exports[`vite (client, non-hydratable) > fix build > signals as refs > should work 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; -import { use as _$use } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; +import { ref as _$ref } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`
Comp\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -1208,7 +1208,7 @@ const _REGISTRY = _$$registry(); const Comp_1 = _$$component(_REGISTRY, "Comp_1", _props => /*@refresh jsx-skip*/(() => { var _el$ = _tmpl$(); var _ref$ = _props.v0; - typeof _ref$ === "function" ? _$use(_ref$, _el$) : _props.v0 = _el$; + typeof _ref$ === "function" || Array.isArray(_ref$) ? _$ref(() => _ref$, _el$) : _props.v0 = _el$; return _el$; })(), { location: "example.jsx:6:19", @@ -1236,7 +1236,7 @@ if (import.meta.hot) { `; exports[`vite (client, non-hydratable) > fix render > @refresh reload > should work 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; // @refresh reload import { render } from 'solid-js/web'; if (root) { @@ -1249,7 +1249,7 @@ if (import.meta.hot) { `; exports[`vite (client, non-hydratable) > fix render > import specifiers > should work with ImportNamespaceSpecifier 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; @@ -1269,7 +1269,7 @@ if (import.meta.hot) { `; exports[`vite (client, non-hydratable) > fix render > import specifiers > should work with ImportSpecifier + Identifier 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; @@ -1289,7 +1289,7 @@ if (import.meta.hot) { `; exports[`vite (client, non-hydratable) > fix render > import specifiers > should work with ImportSpecifier + aliased Identifier 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; @@ -1309,7 +1309,7 @@ if (import.meta.hot) { `; exports[`vite (client, non-hydratable) > fix render > import specifiers > should work with ImportSpecifier + aliased Identifier from StringLiteral 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; @@ -1329,7 +1329,7 @@ if (import.meta.hot) { `; exports[`vite (client, non-hydratable) > fix render > top-level statements > should work with IfStatement 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; diff --git a/tests/client/__snapshots__/webpack5.test.ts.snap b/tests/client/__snapshots__/webpack5.test.ts.snap index 8ee02cf..11db386 100644 --- a/tests/client/__snapshots__/webpack5.test.ts.snap +++ b/tests/client/__snapshots__/webpack5.test.ts.snap @@ -8,31 +8,31 @@ if (someCond) { `; exports[`webpack5 (client, non-hydratable) > Context API > should support ExportNamedDeclaration 1`] = ` -"import { $$context as _$$context } from "solid-refresh"; +"import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; import { createContext } from 'solid-js'; const _REGISTRY = _$$registry(); -export const Example = _$$context(_REGISTRY, "Example", createContext()); +export const Example = _$$component(_REGISTRY, "Example", createContext()); if (import.meta.webpackHot) { _$$refresh("webpack5", import.meta.webpackHot, _REGISTRY); }" `; exports[`webpack5 (client, non-hydratable) > Context API > should support top-level VariableDeclaration 1`] = ` -"import { $$context as _$$context } from "solid-refresh"; +"import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; import { createContext } from 'solid-js'; const _REGISTRY = _$$registry(); -const Example = _$$context(_REGISTRY, "Example", createContext()); +const Example = _$$component(_REGISTRY, "Example", createContext()); if (import.meta.webpackHot) { _$$refresh("webpack5", import.meta.webpackHot, _REGISTRY); }" `; exports[`webpack5 (client, non-hydratable) > ExportDefaultDeclaration w/ FunctionExpression > should skip ExportDefaultDeclaration w/ FunctionExpression with @refresh reload 1`] = ` -"import { template as _$template } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$decline as _$$decline } from "solid-refresh"; // @refresh reload @@ -45,7 +45,7 @@ if (import.meta.webpackHot) { `; exports[`webpack5 (client, non-hydratable) > ExportDefaultDeclaration w/ FunctionExpression > should skip ExportDefaultDeclaration w/ FunctionExpression with @refresh skip 1`] = ` -"import { template as _$template } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); // @refresh skip export default function Foo() { @@ -54,8 +54,8 @@ export default function Foo() { `; exports[`webpack5 (client, non-hydratable) > ExportDefaultDeclaration w/ FunctionExpression > should skip ExportDefaultDeclaration w/ FunctionExpression with invalid Component name 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -74,8 +74,8 @@ if (import.meta.webpackHot) { `; exports[`webpack5 (client, non-hydratable) > ExportDefaultDeclaration w/ FunctionExpression > should skip ExportDefaultDeclaration w/ FunctionExpression with valid Component name and >1 params 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -94,8 +94,8 @@ if (import.meta.webpackHot) { `; exports[`webpack5 (client, non-hydratable) > ExportDefaultDeclaration w/ FunctionExpression > should transform ExportDefaultDeclaration w/ FunctionExpression with valid Component name and params 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -118,8 +118,8 @@ if (import.meta.webpackHot) { `; exports[`webpack5 (client, non-hydratable) > ExportDefaultDeclaration w/ FunctionExpression > should transform ExportDefaultDeclaration w/ FunctionExpression with valid Component name and params 2`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -142,9 +142,9 @@ if (import.meta.webpackHot) { `; exports[`webpack5 (client, non-hydratable) > ExportDefaultDeclaration w/ FunctionExpression > should transform ExportDefaultDeclaration w/ FunctionExpression with valid Component name and params 3`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; -import { insert as _$insert } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; +import { insert as _$insert } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -177,7 +177,7 @@ if (import.meta.webpackHot) { `; exports[`webpack5 (client, non-hydratable) > ExportDefaultDeclaration w/ FunctionExpression > should transform ExportDefaultDeclaration w/ FunctionExpression with valid Component name and params 4`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; @@ -209,8 +209,8 @@ if (import.meta.webpackHot) { `; exports[`webpack5 (client, non-hydratable) > ExportDefaultDeclaration w/ FunctionExpression > should transform ExportDefaultDeclaration w/ FunctionExpression with valid Component name and params 5`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`
foo\`), _tmpl$2 = /*#__PURE__*/_$template(\`
bar\`); import { $$component as _$$component } from "solid-refresh"; @@ -252,7 +252,7 @@ if (import.meta.webpackHot) { `; exports[`webpack5 (client, non-hydratable) > ExportNamedDeclaration w/ FunctionExpression > should skip ExportNamedDeclaration w/ FunctionExpression with @refresh reload 1`] = ` -"import { template as _$template } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$decline as _$$decline } from "solid-refresh"; // @refresh reload @@ -265,7 +265,7 @@ if (import.meta.webpackHot) { `; exports[`webpack5 (client, non-hydratable) > ExportNamedDeclaration w/ FunctionExpression > should skip ExportNamedDeclaration w/ FunctionExpression with @refresh skip 1`] = ` -"import { template as _$template } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); // @refresh skip export function Foo() { @@ -274,8 +274,8 @@ export function Foo() { `; exports[`webpack5 (client, non-hydratable) > ExportNamedDeclaration w/ FunctionExpression > should skip ExportNamedDeclaration w/ FunctionExpression with invalid Component name 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -298,8 +298,8 @@ if (import.meta.webpackHot) { `; exports[`webpack5 (client, non-hydratable) > ExportNamedDeclaration w/ FunctionExpression > should skip ExportNamedDeclaration w/ FunctionExpression with valid Component name and >1 params 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -318,8 +318,8 @@ if (import.meta.webpackHot) { `; exports[`webpack5 (client, non-hydratable) > ExportNamedDeclaration w/ FunctionExpression > should transform ExportNamedDeclaration w/ FunctionExpression with valid Component name and params 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -342,8 +342,8 @@ if (import.meta.webpackHot) { `; exports[`webpack5 (client, non-hydratable) > ExportNamedDeclaration w/ FunctionExpression > should transform ExportNamedDeclaration w/ FunctionExpression with valid Component name and params 2`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -366,9 +366,9 @@ if (import.meta.webpackHot) { `; exports[`webpack5 (client, non-hydratable) > ExportNamedDeclaration w/ FunctionExpression > should transform ExportNamedDeclaration w/ FunctionExpression with valid Component name and params 3`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; -import { insert as _$insert } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; +import { insert as _$insert } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -401,7 +401,7 @@ if (import.meta.webpackHot) { `; exports[`webpack5 (client, non-hydratable) > ExportNamedDeclaration w/ FunctionExpression > should transform ExportNamedDeclaration w/ FunctionExpression with valid Component name and params 4`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; @@ -433,8 +433,8 @@ if (import.meta.webpackHot) { `; exports[`webpack5 (client, non-hydratable) > ExportNamedDeclaration w/ FunctionExpression > should transform ExportNamedDeclaration w/ FunctionExpression with valid Component name and params 5`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`
foo\`), _tmpl$2 = /*#__PURE__*/_$template(\`
bar\`); import { $$component as _$$component } from "solid-refresh"; @@ -486,7 +486,7 @@ if (import.meta.webpackHot) { `; exports[`webpack5 (client, non-hydratable) > FunctionDeclaration > should skip FunctionDeclaration with @refresh reload 1`] = ` -"import { template as _$template } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$decline as _$$decline } from "solid-refresh"; // @refresh reload @@ -499,7 +499,7 @@ if (import.meta.webpackHot) { `; exports[`webpack5 (client, non-hydratable) > FunctionDeclaration > should skip FunctionDeclaration with @refresh skip 1`] = ` -"import { template as _$template } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); // @refresh skip function Foo() { @@ -508,8 +508,8 @@ function Foo() { `; exports[`webpack5 (client, non-hydratable) > FunctionDeclaration > should skip FunctionDeclaration with invalid Component name 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -528,8 +528,8 @@ if (import.meta.webpackHot) { `; exports[`webpack5 (client, non-hydratable) > FunctionDeclaration > should skip FunctionDeclaration with valid Component name and >1 params 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -548,8 +548,8 @@ if (import.meta.webpackHot) { `; exports[`webpack5 (client, non-hydratable) > FunctionDeclaration > should transform FunctionDeclaration with valid Component name and params 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -571,8 +571,8 @@ if (import.meta.webpackHot) { `; exports[`webpack5 (client, non-hydratable) > FunctionDeclaration > should transform FunctionDeclaration with valid Component name and params 2`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -594,9 +594,9 @@ if (import.meta.webpackHot) { `; exports[`webpack5 (client, non-hydratable) > FunctionDeclaration > should transform FunctionDeclaration with valid Component name and params 3`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; -import { insert as _$insert } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; +import { insert as _$insert } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -628,7 +628,7 @@ if (import.meta.webpackHot) { `; exports[`webpack5 (client, non-hydratable) > FunctionDeclaration > should transform FunctionDeclaration with valid Component name and params 4`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; @@ -659,8 +659,8 @@ if (import.meta.webpackHot) { `; exports[`webpack5 (client, non-hydratable) > FunctionDeclaration > should transform FunctionDeclaration with valid Component name and params 5`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`
bar\`), _tmpl$2 = /*#__PURE__*/_$template(\`
foo\`); import { $$component as _$$component } from "solid-refresh"; @@ -701,7 +701,7 @@ if (import.meta.webpackHot) { `; exports[`webpack5 (client, non-hydratable) > VariableDeclarator > ArrowFunctionExpression > should skip VariableDeclarator w/ ArrowFunctionExpression with @refresh reload 1`] = ` -"import { template as _$template } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$decline as _$$decline } from "solid-refresh"; // @refresh reload @@ -714,7 +714,7 @@ if (import.meta.webpackHot) { `; exports[`webpack5 (client, non-hydratable) > VariableDeclarator > ArrowFunctionExpression > should skip VariableDeclarator w/ ArrowFunctionExpression with @refresh skip 1`] = ` -"import { template as _$template } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); // @refresh skip const Foo = () => { @@ -723,8 +723,8 @@ const Foo = () => { `; exports[`webpack5 (client, non-hydratable) > VariableDeclarator > ArrowFunctionExpression > should skip VariableDeclarator w/ ArrowFunctionExpression with invalid Component name 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -743,8 +743,8 @@ if (import.meta.webpackHot) { `; exports[`webpack5 (client, non-hydratable) > VariableDeclarator > ArrowFunctionExpression > should skip VariableDeclarator w/ ArrowFunctionExpression with valid Component name and >1 params 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -763,8 +763,8 @@ if (import.meta.webpackHot) { `; exports[`webpack5 (client, non-hydratable) > VariableDeclarator > ArrowFunctionExpression > should transform VariableDeclarator w/ ArrowFunctionExpression with valid Component name and params 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -786,8 +786,8 @@ if (import.meta.webpackHot) { `; exports[`webpack5 (client, non-hydratable) > VariableDeclarator > ArrowFunctionExpression > should transform VariableDeclarator w/ ArrowFunctionExpression with valid Component name and params 2`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -809,9 +809,9 @@ if (import.meta.webpackHot) { `; exports[`webpack5 (client, non-hydratable) > VariableDeclarator > ArrowFunctionExpression > should transform VariableDeclarator w/ ArrowFunctionExpression with valid Component name and params 3`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; -import { insert as _$insert } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; +import { insert as _$insert } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -843,7 +843,7 @@ if (import.meta.webpackHot) { `; exports[`webpack5 (client, non-hydratable) > VariableDeclarator > ArrowFunctionExpression > should transform VariableDeclarator w/ ArrowFunctionExpression with valid Component name and params 4`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; @@ -874,8 +874,8 @@ if (import.meta.webpackHot) { `; exports[`webpack5 (client, non-hydratable) > VariableDeclarator > ArrowFunctionExpression > should transform VariableDeclarator w/ ArrowFunctionExpression with valid Component name and params 5`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`
bar\`), _tmpl$2 = /*#__PURE__*/_$template(\`
foo\`); import { $$component as _$$component } from "solid-refresh"; @@ -916,7 +916,7 @@ if (import.meta.webpackHot) { `; exports[`webpack5 (client, non-hydratable) > VariableDeclarator > FunctionExpression > should skip VariableDeclarator w/ FunctionExpression with @refresh reload 1`] = ` -"import { template as _$template } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$decline as _$$decline } from "solid-refresh"; // @refresh reload @@ -929,7 +929,7 @@ if (import.meta.webpackHot) { `; exports[`webpack5 (client, non-hydratable) > VariableDeclarator > FunctionExpression > should skip VariableDeclarator w/ FunctionExpression with @refresh skip 1`] = ` -"import { template as _$template } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); // @refresh skip const Foo = function () { @@ -938,8 +938,8 @@ const Foo = function () { `; exports[`webpack5 (client, non-hydratable) > VariableDeclarator > FunctionExpression > should skip VariableDeclarator w/ FunctionExpression with invalid Component name 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -958,8 +958,8 @@ if (import.meta.webpackHot) { `; exports[`webpack5 (client, non-hydratable) > VariableDeclarator > FunctionExpression > should skip VariableDeclarator w/ FunctionExpression with valid Component name and >1 params 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -978,8 +978,8 @@ if (import.meta.webpackHot) { `; exports[`webpack5 (client, non-hydratable) > VariableDeclarator > FunctionExpression > should transform VariableDeclarator w/ FunctionExpression with valid Component name and params 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -1001,8 +1001,8 @@ if (import.meta.webpackHot) { `; exports[`webpack5 (client, non-hydratable) > VariableDeclarator > FunctionExpression > should transform VariableDeclarator w/ FunctionExpression with valid Component name and params 2`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -1024,9 +1024,9 @@ if (import.meta.webpackHot) { `; exports[`webpack5 (client, non-hydratable) > VariableDeclarator > FunctionExpression > should transform VariableDeclarator w/ FunctionExpression with valid Component name and params 3`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; -import { insert as _$insert } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; +import { insert as _$insert } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -1058,7 +1058,7 @@ if (import.meta.webpackHot) { `; exports[`webpack5 (client, non-hydratable) > VariableDeclarator > FunctionExpression > should transform VariableDeclarator w/ FunctionExpression with valid Component name and params 4`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; @@ -1089,8 +1089,8 @@ if (import.meta.webpackHot) { `; exports[`webpack5 (client, non-hydratable) > VariableDeclarator > FunctionExpression > should transform VariableDeclarator w/ FunctionExpression with valid Component name and params 5`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`
bar\`), _tmpl$2 = /*#__PURE__*/_$template(\`
foo\`); import { $$component as _$$component } from "solid-refresh"; @@ -1131,9 +1131,9 @@ if (import.meta.webpackHot) { `; exports[`webpack5 (client, non-hydratable) > fix build > refs > should work with a function 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; -import { use as _$use } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; +import { ref as _$ref } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`
Comp\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -1142,7 +1142,7 @@ const _REGISTRY = _$$registry(); const Comp_1 = _$$component(_REGISTRY, "Comp_1", _props => /*@refresh jsx-skip*/(() => { var _el$ = _tmpl$(); var _ref$ = _props.v0; - typeof _ref$ === "function" ? _$use(_ref$, _el$) : _props.v0 = _el$; + typeof _ref$ === "function" || Array.isArray(_ref$) ? _$ref(() => _ref$, _el$) : _props.v0 = _el$; return _el$; })(), { location: "example.jsx:4:19", @@ -1163,9 +1163,9 @@ if (import.meta.webpackHot) { `; exports[`webpack5 (client, non-hydratable) > fix build > refs > should work with a mutable variable 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; -import { use as _$use } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; +import { ref as _$ref } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`
Comp\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -1174,7 +1174,7 @@ const _REGISTRY = _$$registry(); const Comp_1 = _$$component(_REGISTRY, "Comp_1", _props => /*@refresh jsx-skip*/(() => { var _el$ = _tmpl$(); var _ref$ = _props.v0; - typeof _ref$ === "function" ? _$use(_ref$, _el$) : _props.v0 = _el$; + typeof _ref$ === "function" || Array.isArray(_ref$) ? _$ref(() => _ref$, _el$) : _props.v0 = _el$; return _el$; })(), { location: "example.jsx:4:19", @@ -1201,9 +1201,9 @@ if (import.meta.webpackHot) { `; exports[`webpack5 (client, non-hydratable) > fix build > signals as refs > should work 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; -import { use as _$use } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; +import { ref as _$ref } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`
Comp\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -1213,7 +1213,7 @@ const _REGISTRY = _$$registry(); const Comp_1 = _$$component(_REGISTRY, "Comp_1", _props => /*@refresh jsx-skip*/(() => { var _el$ = _tmpl$(); var _ref$ = _props.v0; - typeof _ref$ === "function" ? _$use(_ref$, _el$) : _props.v0 = _el$; + typeof _ref$ === "function" || Array.isArray(_ref$) ? _$ref(() => _ref$, _el$) : _props.v0 = _el$; return _el$; })(), { location: "example.jsx:6:19", @@ -1241,7 +1241,7 @@ if (import.meta.webpackHot) { `; exports[`webpack5 (client, non-hydratable) > fix render > @refresh reload > should work 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; import { $$decline as _$$decline } from "solid-refresh"; // @refresh reload import { render } from 'solid-js/web'; @@ -1255,7 +1255,7 @@ if (import.meta.webpackHot) { `; exports[`webpack5 (client, non-hydratable) > fix render > import specifiers > should work with ImportNamespaceSpecifier 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; @@ -1275,7 +1275,7 @@ if (import.meta.webpackHot) { `; exports[`webpack5 (client, non-hydratable) > fix render > import specifiers > should work with ImportSpecifier + Identifier 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; @@ -1295,7 +1295,7 @@ if (import.meta.webpackHot) { `; exports[`webpack5 (client, non-hydratable) > fix render > import specifiers > should work with ImportSpecifier + aliased Identifier 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; @@ -1315,7 +1315,7 @@ if (import.meta.webpackHot) { `; exports[`webpack5 (client, non-hydratable) > fix render > import specifiers > should work with ImportSpecifier + aliased Identifier from StringLiteral 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; @@ -1335,7 +1335,7 @@ if (import.meta.webpackHot) { `; exports[`webpack5 (client, non-hydratable) > fix render > top-level statements > should work with IfStatement 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; diff --git a/tests/server-hydratable/__snapshots__/esm.test.ts.snap b/tests/server-hydratable/__snapshots__/esm.test.ts.snap index 2faec29..13de468 100644 --- a/tests/server-hydratable/__snapshots__/esm.test.ts.snap +++ b/tests/server-hydratable/__snapshots__/esm.test.ts.snap @@ -8,37 +8,40 @@ if (someCond) { `; exports[`esm (server, hydratable) > Context API > should support ExportNamedDeclaration 1`] = ` -"import { $$context as _$$context } from "solid-refresh"; +"import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; import { createContext } from 'solid-js'; const _REGISTRY = _$$registry(); -export const Example = _$$context(_REGISTRY, "Example", createContext()); +export const Example = _$$component(_REGISTRY, "Example", createContext()); if (import.meta.hot) { _$$refresh("esm", import.meta.hot, _REGISTRY); }" `; exports[`esm (server, hydratable) > Context API > should support top-level VariableDeclaration 1`] = ` -"import { $$context as _$$context } from "solid-refresh"; +"import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; import { createContext } from 'solid-js'; const _REGISTRY = _$$registry(); -const Example = _$$context(_REGISTRY, "Example", createContext()); +const Example = _$$component(_REGISTRY, "Example", createContext()); if (import.meta.hot) { _$$refresh("esm", import.meta.hot, _REGISTRY); }" `; exports[`esm (server, hydratable) > ExportDefaultDeclaration w/ FunctionExpression > should skip ExportDefaultDeclaration w/ FunctionExpression with @refresh reload 1`] = ` -"import { ssr as _$ssr } from "solid-js/web"; -import { ssrHydrationKey as _$ssrHydrationKey } from "solid-js/web"; +"import { ssr as _$ssr } from "@solidjs/web"; +import { ssrHydrationKey as _$ssrHydrationKey } from "@solidjs/web"; var _tmpl$ = ["Foo

"]; import { $$decline as _$$decline } from "solid-refresh"; // @refresh reload export default function Foo() { - return _$ssr(_tmpl$, _$ssrHydrationKey()); + return (() => { + var _v$ = _$ssrHydrationKey(); + return _$ssr(_tmpl$, _v$); + })(); } if (import.meta.hot) { _$$decline("esm", import.meta.hot); @@ -46,25 +49,31 @@ if (import.meta.hot) { `; exports[`esm (server, hydratable) > ExportDefaultDeclaration w/ FunctionExpression > should skip ExportDefaultDeclaration w/ FunctionExpression with @refresh skip 1`] = ` -"import { ssr as _$ssr } from "solid-js/web"; -import { ssrHydrationKey as _$ssrHydrationKey } from "solid-js/web"; +"import { ssr as _$ssr } from "@solidjs/web"; +import { ssrHydrationKey as _$ssrHydrationKey } from "@solidjs/web"; var _tmpl$ = ["Foo

"]; // @refresh skip export default function Foo() { - return _$ssr(_tmpl$, _$ssrHydrationKey()); + return (() => { + var _v$ = _$ssrHydrationKey(); + return _$ssr(_tmpl$, _v$); + })(); }" `; exports[`esm (server, hydratable) > ExportDefaultDeclaration w/ FunctionExpression > should skip ExportDefaultDeclaration w/ FunctionExpression with invalid Component name 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; -import { ssrHydrationKey as _$ssrHydrationKey } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; +import { ssrHydrationKey as _$ssrHydrationKey } from "@solidjs/web"; var _tmpl$ = ["Foo

"]; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; const _REGISTRY = _$$registry(); -const JSX_foo_1 = _$$component(_REGISTRY, "JSX_foo_1", _props => /*@refresh jsx-skip*/_$ssr(_tmpl$, _$ssrHydrationKey()), { +const JSX_foo_1 = _$$component(_REGISTRY, "JSX_foo_1", _props => /*@refresh jsx-skip*/(() => { + var _v$ = _$ssrHydrationKey(); + return _$ssr(_tmpl$, _v$); +})(), { location: "example.jsx:3:15", signature: "4b145a58" }); @@ -77,15 +86,18 @@ if (import.meta.hot) { `; exports[`esm (server, hydratable) > ExportDefaultDeclaration w/ FunctionExpression > should skip ExportDefaultDeclaration w/ FunctionExpression with valid Component name and >1 params 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; -import { ssrHydrationKey as _$ssrHydrationKey } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; +import { ssrHydrationKey as _$ssrHydrationKey } from "@solidjs/web"; var _tmpl$ = ["Foo

"]; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; const _REGISTRY = _$$registry(); -const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/_$ssr(_tmpl$, _$ssrHydrationKey()), { +const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/(() => { + var _v$ = _$ssrHydrationKey(); + return _$ssr(_tmpl$, _v$); +})(), { location: "example.jsx:3:15", signature: "4b145a58" }); @@ -98,15 +110,18 @@ if (import.meta.hot) { `; exports[`esm (server, hydratable) > ExportDefaultDeclaration w/ FunctionExpression > should transform ExportDefaultDeclaration w/ FunctionExpression with valid Component name and params 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; -import { ssrHydrationKey as _$ssrHydrationKey } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; +import { ssrHydrationKey as _$ssrHydrationKey } from "@solidjs/web"; var _tmpl$ = ["Foo

"]; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; const _REGISTRY = _$$registry(); -const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/_$ssr(_tmpl$, _$ssrHydrationKey()), { +const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/(() => { + var _v$ = _$ssrHydrationKey(); + return _$ssr(_tmpl$, _v$); +})(), { location: "example.jsx:3:15", signature: "4b145a58" }); @@ -123,15 +138,18 @@ if (import.meta.hot) { `; exports[`esm (server, hydratable) > ExportDefaultDeclaration w/ FunctionExpression > should transform ExportDefaultDeclaration w/ FunctionExpression with valid Component name and params 2`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; -import { ssrHydrationKey as _$ssrHydrationKey } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; +import { ssrHydrationKey as _$ssrHydrationKey } from "@solidjs/web"; var _tmpl$ = ["Foo

"]; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; const _REGISTRY = _$$registry(); -const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/_$ssr(_tmpl$, _$ssrHydrationKey()), { +const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/(() => { + var _v$ = _$ssrHydrationKey(); + return _$ssr(_tmpl$, _v$); +})(), { location: "example.jsx:3:15", signature: "4b145a58" }); @@ -148,16 +166,21 @@ if (import.meta.hot) { `; exports[`esm (server, hydratable) > ExportDefaultDeclaration w/ FunctionExpression > should transform ExportDefaultDeclaration w/ FunctionExpression with valid Component name and params 3`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; -import { escape as _$escape } from "solid-js/web"; -import { ssrHydrationKey as _$ssrHydrationKey } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; +import { ssrRunInScope as _$ssrRunInScope } from "@solidjs/web"; +import { escape as _$escape } from "@solidjs/web"; +import { ssrHydrationKey as _$ssrHydrationKey } from "@solidjs/web"; var _tmpl$ = ["", "

"]; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; const _REGISTRY = _$$registry(); -const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/_$ssr(_tmpl$, _$ssrHydrationKey(), _$escape(_props.v0)), { +const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/(() => { + var _v$ = _$ssrHydrationKey(), + _v$2 = _$ssrRunInScope(() => _$escape(_props.v0)); + return _$ssr(_tmpl$, _v$, _v$2); +})(), { location: "example.jsx:4:15", signature: "ae0f2a31" }); @@ -180,7 +203,7 @@ if (import.meta.hot) { `; exports[`esm (server, hydratable) > ExportDefaultDeclaration w/ FunctionExpression > should transform ExportDefaultDeclaration w/ FunctionExpression with valid Component name and params 4`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; @@ -212,16 +235,19 @@ if (import.meta.hot) { `; exports[`esm (server, hydratable) > ExportDefaultDeclaration w/ FunctionExpression > should transform ExportDefaultDeclaration w/ FunctionExpression with valid Component name and params 5`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; -import { ssrHydrationKey as _$ssrHydrationKey } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; +import { ssrHydrationKey as _$ssrHydrationKey } from "@solidjs/web"; var _tmpl$ = ["foo
"], _tmpl$2 = ["bar
"]; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; const _REGISTRY = _$$registry(); -const Foo_1_1 = _$$component(_REGISTRY, "Foo_1_1", _props3 => /*@refresh jsx-skip*/_$ssr(_tmpl$, _$ssrHydrationKey()), { +const Foo_1_1 = _$$component(_REGISTRY, "Foo_1_1", _props3 => /*@refresh jsx-skip*/(() => { + var _v$ = _$ssrHydrationKey(); + return _$ssr(_tmpl$, _v$); +})(), { location: "example.jsx:8:12", signature: "241c14a4" }); @@ -239,7 +265,10 @@ const Foo = _$$component(_REGISTRY, "Foo", function Foo() { location: "example.jsx:5:21", signature: "c963b907" }); -const Bar_1 = _$$component(_REGISTRY, "Bar_1", _props2 => /*@refresh jsx-skip*/_$ssr(_tmpl$2, _$ssrHydrationKey()), { +const Bar_1 = _$$component(_REGISTRY, "Bar_1", _props2 => /*@refresh jsx-skip*/(() => { + var _v$2 = _$ssrHydrationKey(); + return _$ssr(_tmpl$2, _v$2); +})(), { location: "example.jsx:3:15", signature: "fad4daa8" }); @@ -256,13 +285,16 @@ if (import.meta.hot) { `; exports[`esm (server, hydratable) > ExportNamedDeclaration w/ FunctionExpression > should skip ExportNamedDeclaration w/ FunctionExpression with @refresh reload 1`] = ` -"import { ssr as _$ssr } from "solid-js/web"; -import { ssrHydrationKey as _$ssrHydrationKey } from "solid-js/web"; +"import { ssr as _$ssr } from "@solidjs/web"; +import { ssrHydrationKey as _$ssrHydrationKey } from "@solidjs/web"; var _tmpl$ = ["Foo

"]; import { $$decline as _$$decline } from "solid-refresh"; // @refresh reload export function Foo() { - return _$ssr(_tmpl$, _$ssrHydrationKey()); + return (() => { + var _v$ = _$ssrHydrationKey(); + return _$ssr(_tmpl$, _v$); + })(); } if (import.meta.hot) { _$$decline("esm", import.meta.hot); @@ -270,25 +302,31 @@ if (import.meta.hot) { `; exports[`esm (server, hydratable) > ExportNamedDeclaration w/ FunctionExpression > should skip ExportNamedDeclaration w/ FunctionExpression with @refresh skip 1`] = ` -"import { ssr as _$ssr } from "solid-js/web"; -import { ssrHydrationKey as _$ssrHydrationKey } from "solid-js/web"; +"import { ssr as _$ssr } from "@solidjs/web"; +import { ssrHydrationKey as _$ssrHydrationKey } from "@solidjs/web"; var _tmpl$ = ["Foo

"]; // @refresh skip export function Foo() { - return _$ssr(_tmpl$, _$ssrHydrationKey()); + return (() => { + var _v$ = _$ssrHydrationKey(); + return _$ssr(_tmpl$, _v$); + })(); }" `; exports[`esm (server, hydratable) > ExportNamedDeclaration w/ FunctionExpression > should skip ExportNamedDeclaration w/ FunctionExpression with invalid Component name 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; -import { ssrHydrationKey as _$ssrHydrationKey } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; +import { ssrHydrationKey as _$ssrHydrationKey } from "@solidjs/web"; var _tmpl$ = ["Foo

"]; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; const _REGISTRY = _$$registry(); -const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/_$ssr(_tmpl$, _$ssrHydrationKey()), { +const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/(() => { + var _v$ = _$ssrHydrationKey(); + return _$ssr(_tmpl$, _v$); +})(), { location: "example.jsx:3:15", signature: "4b145a58" }); @@ -305,15 +343,18 @@ if (import.meta.hot) { `; exports[`esm (server, hydratable) > ExportNamedDeclaration w/ FunctionExpression > should skip ExportNamedDeclaration w/ FunctionExpression with valid Component name and >1 params 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; -import { ssrHydrationKey as _$ssrHydrationKey } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; +import { ssrHydrationKey as _$ssrHydrationKey } from "@solidjs/web"; var _tmpl$ = ["Foo

"]; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; const _REGISTRY = _$$registry(); -const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/_$ssr(_tmpl$, _$ssrHydrationKey()), { +const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/(() => { + var _v$ = _$ssrHydrationKey(); + return _$ssr(_tmpl$, _v$); +})(), { location: "example.jsx:3:15", signature: "4b145a58" }); @@ -326,15 +367,18 @@ if (import.meta.hot) { `; exports[`esm (server, hydratable) > ExportNamedDeclaration w/ FunctionExpression > should transform ExportNamedDeclaration w/ FunctionExpression with valid Component name and params 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; -import { ssrHydrationKey as _$ssrHydrationKey } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; +import { ssrHydrationKey as _$ssrHydrationKey } from "@solidjs/web"; var _tmpl$ = ["Foo

"]; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; const _REGISTRY = _$$registry(); -const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/_$ssr(_tmpl$, _$ssrHydrationKey()), { +const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/(() => { + var _v$ = _$ssrHydrationKey(); + return _$ssr(_tmpl$, _v$); +})(), { location: "example.jsx:3:15", signature: "4b145a58" }); @@ -351,15 +395,18 @@ if (import.meta.hot) { `; exports[`esm (server, hydratable) > ExportNamedDeclaration w/ FunctionExpression > should transform ExportNamedDeclaration w/ FunctionExpression with valid Component name and params 2`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; -import { ssrHydrationKey as _$ssrHydrationKey } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; +import { ssrHydrationKey as _$ssrHydrationKey } from "@solidjs/web"; var _tmpl$ = ["Foo

"]; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; const _REGISTRY = _$$registry(); -const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/_$ssr(_tmpl$, _$ssrHydrationKey()), { +const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/(() => { + var _v$ = _$ssrHydrationKey(); + return _$ssr(_tmpl$, _v$); +})(), { location: "example.jsx:3:15", signature: "4b145a58" }); @@ -376,16 +423,21 @@ if (import.meta.hot) { `; exports[`esm (server, hydratable) > ExportNamedDeclaration w/ FunctionExpression > should transform ExportNamedDeclaration w/ FunctionExpression with valid Component name and params 3`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; -import { escape as _$escape } from "solid-js/web"; -import { ssrHydrationKey as _$ssrHydrationKey } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; +import { ssrRunInScope as _$ssrRunInScope } from "@solidjs/web"; +import { escape as _$escape } from "@solidjs/web"; +import { ssrHydrationKey as _$ssrHydrationKey } from "@solidjs/web"; var _tmpl$ = ["", "

"]; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; const _REGISTRY = _$$registry(); -const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/_$ssr(_tmpl$, _$ssrHydrationKey(), _$escape(_props.v0)), { +const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/(() => { + var _v$ = _$ssrHydrationKey(), + _v$2 = _$ssrRunInScope(() => _$escape(_props.v0)); + return _$ssr(_tmpl$, _v$, _v$2); +})(), { location: "example.jsx:4:15", signature: "ae0f2a31" }); @@ -408,7 +460,7 @@ if (import.meta.hot) { `; exports[`esm (server, hydratable) > ExportNamedDeclaration w/ FunctionExpression > should transform ExportNamedDeclaration w/ FunctionExpression with valid Component name and params 4`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; @@ -440,16 +492,19 @@ if (import.meta.hot) { `; exports[`esm (server, hydratable) > ExportNamedDeclaration w/ FunctionExpression > should transform ExportNamedDeclaration w/ FunctionExpression with valid Component name and params 5`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; -import { ssrHydrationKey as _$ssrHydrationKey } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; +import { ssrHydrationKey as _$ssrHydrationKey } from "@solidjs/web"; var _tmpl$ = ["foo
"], _tmpl$2 = ["bar
"]; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; const _REGISTRY = _$$registry(); -const Foo_1_1 = _$$component(_REGISTRY, "Foo_1_1", _props3 => /*@refresh jsx-skip*/_$ssr(_tmpl$, _$ssrHydrationKey()), { +const Foo_1_1 = _$$component(_REGISTRY, "Foo_1_1", _props3 => /*@refresh jsx-skip*/(() => { + var _v$ = _$ssrHydrationKey(); + return _$ssr(_tmpl$, _v$); +})(), { location: "example.jsx:8:12", signature: "241c14a4" }); @@ -476,7 +531,10 @@ const Foo = _$$component(_REGISTRY, "Foo", function Foo() { Bar }) }); -const Bar_1 = _$$component(_REGISTRY, "Bar_1", _props2 => /*@refresh jsx-skip*/_$ssr(_tmpl$2, _$ssrHydrationKey()), { +const Bar_1 = _$$component(_REGISTRY, "Bar_1", _props2 => /*@refresh jsx-skip*/(() => { + var _v$2 = _$ssrHydrationKey(); + return _$ssr(_tmpl$2, _v$2); +})(), { location: "example.jsx:3:15", signature: "fad4daa8" }); @@ -494,13 +552,16 @@ if (import.meta.hot) { `; exports[`esm (server, hydratable) > FunctionDeclaration > should skip FunctionDeclaration with @refresh reload 1`] = ` -"import { ssr as _$ssr } from "solid-js/web"; -import { ssrHydrationKey as _$ssrHydrationKey } from "solid-js/web"; +"import { ssr as _$ssr } from "@solidjs/web"; +import { ssrHydrationKey as _$ssrHydrationKey } from "@solidjs/web"; var _tmpl$ = ["Foo

"]; import { $$decline as _$$decline } from "solid-refresh"; // @refresh reload function Foo() { - return _$ssr(_tmpl$, _$ssrHydrationKey()); + return (() => { + var _v$ = _$ssrHydrationKey(); + return _$ssr(_tmpl$, _v$); + })(); } if (import.meta.hot) { _$$decline("esm", import.meta.hot); @@ -508,25 +569,31 @@ if (import.meta.hot) { `; exports[`esm (server, hydratable) > FunctionDeclaration > should skip FunctionDeclaration with @refresh skip 1`] = ` -"import { ssr as _$ssr } from "solid-js/web"; -import { ssrHydrationKey as _$ssrHydrationKey } from "solid-js/web"; +"import { ssr as _$ssr } from "@solidjs/web"; +import { ssrHydrationKey as _$ssrHydrationKey } from "@solidjs/web"; var _tmpl$ = ["Foo

"]; // @refresh skip function Foo() { - return _$ssr(_tmpl$, _$ssrHydrationKey()); + return (() => { + var _v$ = _$ssrHydrationKey(); + return _$ssr(_tmpl$, _v$); + })(); }" `; exports[`esm (server, hydratable) > FunctionDeclaration > should skip FunctionDeclaration with invalid Component name 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; -import { ssrHydrationKey as _$ssrHydrationKey } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; +import { ssrHydrationKey as _$ssrHydrationKey } from "@solidjs/web"; var _tmpl$ = ["Foo

"]; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; const _REGISTRY = _$$registry(); -const JSX_foo_1 = _$$component(_REGISTRY, "JSX_foo_1", _props => /*@refresh jsx-skip*/_$ssr(_tmpl$, _$ssrHydrationKey()), { +const JSX_foo_1 = _$$component(_REGISTRY, "JSX_foo_1", _props => /*@refresh jsx-skip*/(() => { + var _v$ = _$ssrHydrationKey(); + return _$ssr(_tmpl$, _v$); +})(), { location: "example.jsx:3:15", signature: "4b145a58" }); @@ -539,15 +606,18 @@ if (import.meta.hot) { `; exports[`esm (server, hydratable) > FunctionDeclaration > should skip FunctionDeclaration with valid Component name and >1 params 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; -import { ssrHydrationKey as _$ssrHydrationKey } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; +import { ssrHydrationKey as _$ssrHydrationKey } from "@solidjs/web"; var _tmpl$ = ["Foo

"]; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; const _REGISTRY = _$$registry(); -const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/_$ssr(_tmpl$, _$ssrHydrationKey()), { +const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/(() => { + var _v$ = _$ssrHydrationKey(); + return _$ssr(_tmpl$, _v$); +})(), { location: "example.jsx:3:15", signature: "4b145a58" }); @@ -560,15 +630,18 @@ if (import.meta.hot) { `; exports[`esm (server, hydratable) > FunctionDeclaration > should transform FunctionDeclaration with valid Component name and params 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; -import { ssrHydrationKey as _$ssrHydrationKey } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; +import { ssrHydrationKey as _$ssrHydrationKey } from "@solidjs/web"; var _tmpl$ = ["Foo

"]; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; const _REGISTRY = _$$registry(); -const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/_$ssr(_tmpl$, _$ssrHydrationKey()), { +const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/(() => { + var _v$ = _$ssrHydrationKey(); + return _$ssr(_tmpl$, _v$); +})(), { location: "example.jsx:3:15", signature: "4b145a58" }); @@ -584,15 +657,18 @@ if (import.meta.hot) { `; exports[`esm (server, hydratable) > FunctionDeclaration > should transform FunctionDeclaration with valid Component name and params 2`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; -import { ssrHydrationKey as _$ssrHydrationKey } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; +import { ssrHydrationKey as _$ssrHydrationKey } from "@solidjs/web"; var _tmpl$ = ["Foo

"]; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; const _REGISTRY = _$$registry(); -const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/_$ssr(_tmpl$, _$ssrHydrationKey()), { +const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/(() => { + var _v$ = _$ssrHydrationKey(); + return _$ssr(_tmpl$, _v$); +})(), { location: "example.jsx:3:15", signature: "4b145a58" }); @@ -608,17 +684,22 @@ if (import.meta.hot) { `; exports[`esm (server, hydratable) > FunctionDeclaration > should transform FunctionDeclaration with valid Component name and params 3`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; -import { escape as _$escape } from "solid-js/web"; -import { ssrHydrationKey as _$ssrHydrationKey } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; +import { ssrRunInScope as _$ssrRunInScope } from "@solidjs/web"; +import { escape as _$escape } from "@solidjs/web"; +import { ssrHydrationKey as _$ssrHydrationKey } from "@solidjs/web"; var _tmpl$ = ["", "

"]; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; const example = 'Foo'; const _REGISTRY = _$$registry(); -const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/_$ssr(_tmpl$, _$ssrHydrationKey(), _$escape(_props.v0)), { +const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/(() => { + var _v$ = _$ssrHydrationKey(), + _v$2 = _$ssrRunInScope(() => _$escape(_props.v0)); + return _$ssr(_tmpl$, _v$, _v$2); +})(), { location: "example.jsx:4:15", signature: "ae0f2a31" }); @@ -639,7 +720,7 @@ if (import.meta.hot) { `; exports[`esm (server, hydratable) > FunctionDeclaration > should transform FunctionDeclaration with valid Component name and params 4`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; @@ -670,16 +751,19 @@ if (import.meta.hot) { `; exports[`esm (server, hydratable) > FunctionDeclaration > should transform FunctionDeclaration with valid Component name and params 5`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; -import { ssrHydrationKey as _$ssrHydrationKey } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; +import { ssrHydrationKey as _$ssrHydrationKey } from "@solidjs/web"; var _tmpl$ = ["bar
"], _tmpl$2 = ["foo
"]; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; const _REGISTRY = _$$registry(); -const Bar_1 = _$$component(_REGISTRY, "Bar_1", _props => /*@refresh jsx-skip*/_$ssr(_tmpl$, _$ssrHydrationKey()), { +const Bar_1 = _$$component(_REGISTRY, "Bar_1", _props => /*@refresh jsx-skip*/(() => { + var _v$ = _$ssrHydrationKey(); + return _$ssr(_tmpl$, _v$); +})(), { location: "example.jsx:3:15", signature: "61dd3182" }); @@ -689,7 +773,10 @@ const Bar = _$$component(_REGISTRY, "Bar", function Bar() { location: "example.jsx:2:6", signature: "e93ca257" }); -const Foo_1_1 = _$$component(_REGISTRY, "Foo_1_1", _props3 => /*@refresh jsx-skip*/_$ssr(_tmpl$2, _$ssrHydrationKey()), { +const Foo_1_1 = _$$component(_REGISTRY, "Foo_1_1", _props3 => /*@refresh jsx-skip*/(() => { + var _v$2 = _$ssrHydrationKey(); + return _$ssr(_tmpl$2, _v$2); +})(), { location: "example.jsx:8:12", signature: "241c14a4" }); @@ -713,13 +800,16 @@ if (import.meta.hot) { `; exports[`esm (server, hydratable) > VariableDeclarator > ArrowFunctionExpression > should skip VariableDeclarator w/ ArrowFunctionExpression with @refresh reload 1`] = ` -"import { ssr as _$ssr } from "solid-js/web"; -import { ssrHydrationKey as _$ssrHydrationKey } from "solid-js/web"; +"import { ssr as _$ssr } from "@solidjs/web"; +import { ssrHydrationKey as _$ssrHydrationKey } from "@solidjs/web"; var _tmpl$ = ["Foo

"]; import { $$decline as _$$decline } from "solid-refresh"; // @refresh reload const Foo = () => { - return _$ssr(_tmpl$, _$ssrHydrationKey()); + return (() => { + var _v$ = _$ssrHydrationKey(); + return _$ssr(_tmpl$, _v$); + })(); }; if (import.meta.hot) { _$$decline("esm", import.meta.hot); @@ -727,25 +817,31 @@ if (import.meta.hot) { `; exports[`esm (server, hydratable) > VariableDeclarator > ArrowFunctionExpression > should skip VariableDeclarator w/ ArrowFunctionExpression with @refresh skip 1`] = ` -"import { ssr as _$ssr } from "solid-js/web"; -import { ssrHydrationKey as _$ssrHydrationKey } from "solid-js/web"; +"import { ssr as _$ssr } from "@solidjs/web"; +import { ssrHydrationKey as _$ssrHydrationKey } from "@solidjs/web"; var _tmpl$ = ["Foo

"]; // @refresh skip const Foo = () => { - return _$ssr(_tmpl$, _$ssrHydrationKey()); + return (() => { + var _v$ = _$ssrHydrationKey(); + return _$ssr(_tmpl$, _v$); + })(); };" `; exports[`esm (server, hydratable) > VariableDeclarator > ArrowFunctionExpression > should skip VariableDeclarator w/ ArrowFunctionExpression with invalid Component name 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; -import { ssrHydrationKey as _$ssrHydrationKey } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; +import { ssrHydrationKey as _$ssrHydrationKey } from "@solidjs/web"; var _tmpl$ = ["Foo

"]; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; const _REGISTRY = _$$registry(); -const JSX_foo_1 = _$$component(_REGISTRY, "JSX_foo_1", _props => /*@refresh jsx-skip*/_$ssr(_tmpl$, _$ssrHydrationKey()), { +const JSX_foo_1 = _$$component(_REGISTRY, "JSX_foo_1", _props => /*@refresh jsx-skip*/(() => { + var _v$ = _$ssrHydrationKey(); + return _$ssr(_tmpl$, _v$); +})(), { location: "example.jsx:3:17", signature: "4b145a58" }); @@ -758,15 +854,18 @@ if (import.meta.hot) { `; exports[`esm (server, hydratable) > VariableDeclarator > ArrowFunctionExpression > should skip VariableDeclarator w/ ArrowFunctionExpression with valid Component name and >1 params 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; -import { ssrHydrationKey as _$ssrHydrationKey } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; +import { ssrHydrationKey as _$ssrHydrationKey } from "@solidjs/web"; var _tmpl$ = ["Foo

"]; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; const _REGISTRY = _$$registry(); -const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/_$ssr(_tmpl$, _$ssrHydrationKey()), { +const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/(() => { + var _v$ = _$ssrHydrationKey(); + return _$ssr(_tmpl$, _v$); +})(), { location: "example.jsx:3:17", signature: "4b145a58" }); @@ -779,15 +878,18 @@ if (import.meta.hot) { `; exports[`esm (server, hydratable) > VariableDeclarator > ArrowFunctionExpression > should transform VariableDeclarator w/ ArrowFunctionExpression with valid Component name and params 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; -import { ssrHydrationKey as _$ssrHydrationKey } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; +import { ssrHydrationKey as _$ssrHydrationKey } from "@solidjs/web"; var _tmpl$ = ["Foo

"]; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; const _REGISTRY = _$$registry(); -const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/_$ssr(_tmpl$, _$ssrHydrationKey()), { +const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/(() => { + var _v$ = _$ssrHydrationKey(); + return _$ssr(_tmpl$, _v$); +})(), { location: "example.jsx:3:17", signature: "4b145a58" }); @@ -803,15 +905,18 @@ if (import.meta.hot) { `; exports[`esm (server, hydratable) > VariableDeclarator > ArrowFunctionExpression > should transform VariableDeclarator w/ ArrowFunctionExpression with valid Component name and params 2`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; -import { ssrHydrationKey as _$ssrHydrationKey } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; +import { ssrHydrationKey as _$ssrHydrationKey } from "@solidjs/web"; var _tmpl$ = ["Foo

"]; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; const _REGISTRY = _$$registry(); -const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/_$ssr(_tmpl$, _$ssrHydrationKey()), { +const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/(() => { + var _v$ = _$ssrHydrationKey(); + return _$ssr(_tmpl$, _v$); +})(), { location: "example.jsx:3:17", signature: "4b145a58" }); @@ -827,17 +932,22 @@ if (import.meta.hot) { `; exports[`esm (server, hydratable) > VariableDeclarator > ArrowFunctionExpression > should transform VariableDeclarator w/ ArrowFunctionExpression with valid Component name and params 3`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; -import { escape as _$escape } from "solid-js/web"; -import { ssrHydrationKey as _$ssrHydrationKey } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; +import { ssrRunInScope as _$ssrRunInScope } from "@solidjs/web"; +import { escape as _$escape } from "@solidjs/web"; +import { ssrHydrationKey as _$ssrHydrationKey } from "@solidjs/web"; var _tmpl$ = ["", "

"]; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; const example = 'Foo'; const _REGISTRY = _$$registry(); -const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/_$ssr(_tmpl$, _$ssrHydrationKey(), _$escape(_props.v0)), { +const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/(() => { + var _v$ = _$ssrHydrationKey(), + _v$2 = _$ssrRunInScope(() => _$escape(_props.v0)); + return _$ssr(_tmpl$, _v$, _v$2); +})(), { location: "example.jsx:4:17", signature: "ae0f2a31" }); @@ -858,7 +968,7 @@ if (import.meta.hot) { `; exports[`esm (server, hydratable) > VariableDeclarator > ArrowFunctionExpression > should transform VariableDeclarator w/ ArrowFunctionExpression with valid Component name and params 4`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; @@ -889,16 +999,19 @@ if (import.meta.hot) { `; exports[`esm (server, hydratable) > VariableDeclarator > ArrowFunctionExpression > should transform VariableDeclarator w/ ArrowFunctionExpression with valid Component name and params 5`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; -import { ssrHydrationKey as _$ssrHydrationKey } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; +import { ssrHydrationKey as _$ssrHydrationKey } from "@solidjs/web"; var _tmpl$ = ["bar
"], _tmpl$2 = ["foo
"]; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; const _REGISTRY = _$$registry(); -const Bar_1 = _$$component(_REGISTRY, "Bar_1", _props => /*@refresh jsx-skip*/_$ssr(_tmpl$, _$ssrHydrationKey()), { +const Bar_1 = _$$component(_REGISTRY, "Bar_1", _props => /*@refresh jsx-skip*/(() => { + var _v$ = _$ssrHydrationKey(); + return _$ssr(_tmpl$, _v$); +})(), { location: "example.jsx:3:17", signature: "61dd3182" }); @@ -908,7 +1021,10 @@ const Bar = _$$component(_REGISTRY, "Bar", () => { location: "example.jsx:2:20", signature: "d1c6ca9b" }); -const Foo_1_1 = _$$component(_REGISTRY, "Foo_1_1", _props3 => /*@refresh jsx-skip*/_$ssr(_tmpl$2, _$ssrHydrationKey()), { +const Foo_1_1 = _$$component(_REGISTRY, "Foo_1_1", _props3 => /*@refresh jsx-skip*/(() => { + var _v$2 = _$ssrHydrationKey(); + return _$ssr(_tmpl$2, _v$2); +})(), { location: "example.jsx:8:14", signature: "241c14a4" }); @@ -932,13 +1048,16 @@ if (import.meta.hot) { `; exports[`esm (server, hydratable) > VariableDeclarator > FunctionExpression > should skip VariableDeclarator w/ FunctionExpression with @refresh reload 1`] = ` -"import { ssr as _$ssr } from "solid-js/web"; -import { ssrHydrationKey as _$ssrHydrationKey } from "solid-js/web"; +"import { ssr as _$ssr } from "@solidjs/web"; +import { ssrHydrationKey as _$ssrHydrationKey } from "@solidjs/web"; var _tmpl$ = ["Foo

"]; import { $$decline as _$$decline } from "solid-refresh"; // @refresh reload const Foo = function () { - return _$ssr(_tmpl$, _$ssrHydrationKey()); + return (() => { + var _v$ = _$ssrHydrationKey(); + return _$ssr(_tmpl$, _v$); + })(); }; if (import.meta.hot) { _$$decline("esm", import.meta.hot); @@ -946,25 +1065,31 @@ if (import.meta.hot) { `; exports[`esm (server, hydratable) > VariableDeclarator > FunctionExpression > should skip VariableDeclarator w/ FunctionExpression with @refresh skip 1`] = ` -"import { ssr as _$ssr } from "solid-js/web"; -import { ssrHydrationKey as _$ssrHydrationKey } from "solid-js/web"; +"import { ssr as _$ssr } from "@solidjs/web"; +import { ssrHydrationKey as _$ssrHydrationKey } from "@solidjs/web"; var _tmpl$ = ["Foo

"]; // @refresh skip const Foo = function () { - return _$ssr(_tmpl$, _$ssrHydrationKey()); + return (() => { + var _v$ = _$ssrHydrationKey(); + return _$ssr(_tmpl$, _v$); + })(); };" `; exports[`esm (server, hydratable) > VariableDeclarator > FunctionExpression > should skip VariableDeclarator w/ FunctionExpression with invalid Component name 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; -import { ssrHydrationKey as _$ssrHydrationKey } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; +import { ssrHydrationKey as _$ssrHydrationKey } from "@solidjs/web"; var _tmpl$ = ["Foo

"]; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; const _REGISTRY = _$$registry(); -const JSX_foo_1 = _$$component(_REGISTRY, "JSX_foo_1", _props => /*@refresh jsx-skip*/_$ssr(_tmpl$, _$ssrHydrationKey()), { +const JSX_foo_1 = _$$component(_REGISTRY, "JSX_foo_1", _props => /*@refresh jsx-skip*/(() => { + var _v$ = _$ssrHydrationKey(); + return _$ssr(_tmpl$, _v$); +})(), { location: "example.jsx:3:17", signature: "4b145a58" }); @@ -977,15 +1102,18 @@ if (import.meta.hot) { `; exports[`esm (server, hydratable) > VariableDeclarator > FunctionExpression > should skip VariableDeclarator w/ FunctionExpression with valid Component name and >1 params 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; -import { ssrHydrationKey as _$ssrHydrationKey } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; +import { ssrHydrationKey as _$ssrHydrationKey } from "@solidjs/web"; var _tmpl$ = ["Foo

"]; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; const _REGISTRY = _$$registry(); -const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/_$ssr(_tmpl$, _$ssrHydrationKey()), { +const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/(() => { + var _v$ = _$ssrHydrationKey(); + return _$ssr(_tmpl$, _v$); +})(), { location: "example.jsx:3:17", signature: "4b145a58" }); @@ -998,15 +1126,18 @@ if (import.meta.hot) { `; exports[`esm (server, hydratable) > VariableDeclarator > FunctionExpression > should transform VariableDeclarator w/ FunctionExpression with valid Component name and params 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; -import { ssrHydrationKey as _$ssrHydrationKey } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; +import { ssrHydrationKey as _$ssrHydrationKey } from "@solidjs/web"; var _tmpl$ = ["Foo

"]; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; const _REGISTRY = _$$registry(); -const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/_$ssr(_tmpl$, _$ssrHydrationKey()), { +const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/(() => { + var _v$ = _$ssrHydrationKey(); + return _$ssr(_tmpl$, _v$); +})(), { location: "example.jsx:3:17", signature: "4b145a58" }); @@ -1022,15 +1153,18 @@ if (import.meta.hot) { `; exports[`esm (server, hydratable) > VariableDeclarator > FunctionExpression > should transform VariableDeclarator w/ FunctionExpression with valid Component name and params 2`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; -import { ssrHydrationKey as _$ssrHydrationKey } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; +import { ssrHydrationKey as _$ssrHydrationKey } from "@solidjs/web"; var _tmpl$ = ["Foo

"]; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; const _REGISTRY = _$$registry(); -const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/_$ssr(_tmpl$, _$ssrHydrationKey()), { +const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/(() => { + var _v$ = _$ssrHydrationKey(); + return _$ssr(_tmpl$, _v$); +})(), { location: "example.jsx:3:17", signature: "4b145a58" }); @@ -1046,17 +1180,22 @@ if (import.meta.hot) { `; exports[`esm (server, hydratable) > VariableDeclarator > FunctionExpression > should transform VariableDeclarator w/ FunctionExpression with valid Component name and params 3`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; -import { escape as _$escape } from "solid-js/web"; -import { ssrHydrationKey as _$ssrHydrationKey } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; +import { ssrRunInScope as _$ssrRunInScope } from "@solidjs/web"; +import { escape as _$escape } from "@solidjs/web"; +import { ssrHydrationKey as _$ssrHydrationKey } from "@solidjs/web"; var _tmpl$ = ["", "

"]; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; const example = 'Foo'; const _REGISTRY = _$$registry(); -const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/_$ssr(_tmpl$, _$ssrHydrationKey(), _$escape(_props.v0)), { +const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/(() => { + var _v$ = _$ssrHydrationKey(), + _v$2 = _$ssrRunInScope(() => _$escape(_props.v0)); + return _$ssr(_tmpl$, _v$, _v$2); +})(), { location: "example.jsx:4:17", signature: "ae0f2a31" }); @@ -1077,7 +1216,7 @@ if (import.meta.hot) { `; exports[`esm (server, hydratable) > VariableDeclarator > FunctionExpression > should transform VariableDeclarator w/ FunctionExpression with valid Component name and params 4`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; @@ -1108,16 +1247,19 @@ if (import.meta.hot) { `; exports[`esm (server, hydratable) > VariableDeclarator > FunctionExpression > should transform VariableDeclarator w/ FunctionExpression with valid Component name and params 5`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; -import { ssrHydrationKey as _$ssrHydrationKey } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; +import { ssrHydrationKey as _$ssrHydrationKey } from "@solidjs/web"; var _tmpl$ = ["bar
"], _tmpl$2 = ["foo
"]; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; const _REGISTRY = _$$registry(); -const Bar_1 = _$$component(_REGISTRY, "Bar_1", _props => /*@refresh jsx-skip*/_$ssr(_tmpl$, _$ssrHydrationKey()), { +const Bar_1 = _$$component(_REGISTRY, "Bar_1", _props => /*@refresh jsx-skip*/(() => { + var _v$ = _$ssrHydrationKey(); + return _$ssr(_tmpl$, _v$); +})(), { location: "example.jsx:3:17", signature: "61dd3182" }); @@ -1127,7 +1269,10 @@ const Bar = _$$component(_REGISTRY, "Bar", function () { location: "example.jsx:2:20", signature: "1fb34faa" }); -const Foo_1_1 = _$$component(_REGISTRY, "Foo_1_1", _props3 => /*@refresh jsx-skip*/_$ssr(_tmpl$2, _$ssrHydrationKey()), { +const Foo_1_1 = _$$component(_REGISTRY, "Foo_1_1", _props3 => /*@refresh jsx-skip*/(() => { + var _v$2 = _$ssrHydrationKey(); + return _$ssr(_tmpl$2, _v$2); +})(), { location: "example.jsx:8:14", signature: "241c14a4" }); @@ -1151,15 +1296,19 @@ if (import.meta.hot) { `; exports[`esm (server, hydratable) > fix build > refs > should work with a function 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; -import { ssrHydrationKey as _$ssrHydrationKey } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; +import { ssrHydrationKey as _$ssrHydrationKey } from "@solidjs/web"; var _tmpl$ = ["Comp
"]; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; const _REGISTRY = _$$registry(); -const Comp_1 = _$$component(_REGISTRY, "Comp_1", _props => /*@refresh jsx-skip*/_$ssr(_tmpl$, _$ssrHydrationKey()), { +const Comp_1 = _$$component(_REGISTRY, "Comp_1", _props => /*@refresh jsx-skip*/(() => { + var _v$ = _$ssrHydrationKey(), + _ref$ = _props.v0; + return _$ssr(_tmpl$, _v$); +})(), { location: "example.jsx:4:19", signature: "6f76290" }); @@ -1178,15 +1327,19 @@ if (import.meta.hot) { `; exports[`esm (server, hydratable) > fix build > refs > should work with a mutable variable 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; -import { ssrHydrationKey as _$ssrHydrationKey } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; +import { ssrHydrationKey as _$ssrHydrationKey } from "@solidjs/web"; var _tmpl$ = ["Comp
"]; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; const _REGISTRY = _$$registry(); -const Comp_1 = _$$component(_REGISTRY, "Comp_1", _props => /*@refresh jsx-skip*/_$ssr(_tmpl$, _$ssrHydrationKey()), { +const Comp_1 = _$$component(_REGISTRY, "Comp_1", _props => /*@refresh jsx-skip*/(() => { + var _v$ = _$ssrHydrationKey(), + _ref$ = _props.v0; + return _$ssr(_tmpl$, _v$); +})(), { location: "example.jsx:4:19", signature: "6f76290" }); @@ -1211,16 +1364,20 @@ if (import.meta.hot) { `; exports[`esm (server, hydratable) > fix build > signals as refs > should work 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; -import { ssrHydrationKey as _$ssrHydrationKey } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; +import { ssrHydrationKey as _$ssrHydrationKey } from "@solidjs/web"; var _tmpl$ = ["Comp
"]; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; import { createSignal } from 'solid-js'; const _REGISTRY = _$$registry(); -const Comp_1 = _$$component(_REGISTRY, "Comp_1", _props => /*@refresh jsx-skip*/_$ssr(_tmpl$, _$ssrHydrationKey()), { +const Comp_1 = _$$component(_REGISTRY, "Comp_1", _props => /*@refresh jsx-skip*/(() => { + var _v$ = _$ssrHydrationKey(), + _ref$ = _props.v0; + return _$ssr(_tmpl$, _v$); +})(), { location: "example.jsx:6:19", signature: "6f76290" }); @@ -1246,7 +1403,7 @@ if (import.meta.hot) { `; exports[`esm (server, hydratable) > fix render > @refresh reload > should work 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; import { $$decline as _$$decline } from "solid-refresh"; // @refresh reload import { render } from 'solid-js/web'; @@ -1260,7 +1417,7 @@ if (import.meta.hot) { `; exports[`esm (server, hydratable) > fix render > import specifiers > should work with ImportNamespaceSpecifier 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; @@ -1280,7 +1437,7 @@ if (import.meta.hot) { `; exports[`esm (server, hydratable) > fix render > import specifiers > should work with ImportSpecifier + Identifier 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; @@ -1300,7 +1457,7 @@ if (import.meta.hot) { `; exports[`esm (server, hydratable) > fix render > import specifiers > should work with ImportSpecifier + aliased Identifier 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; @@ -1320,7 +1477,7 @@ if (import.meta.hot) { `; exports[`esm (server, hydratable) > fix render > import specifiers > should work with ImportSpecifier + aliased Identifier from StringLiteral 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; @@ -1340,7 +1497,7 @@ if (import.meta.hot) { `; exports[`esm (server, hydratable) > fix render > top-level statements > should work with IfStatement 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; diff --git a/tests/server-hydratable/__snapshots__/rspack-esm.test.ts.snap b/tests/server-hydratable/__snapshots__/rspack-esm.test.ts.snap index 5dcd159..7456be1 100644 --- a/tests/server-hydratable/__snapshots__/rspack-esm.test.ts.snap +++ b/tests/server-hydratable/__snapshots__/rspack-esm.test.ts.snap @@ -8,37 +8,40 @@ if (someCond) { `; exports[`esm (server, hydratable) > Context API > should support ExportNamedDeclaration 1`] = ` -"import { $$context as _$$context } from "solid-refresh"; +"import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; import { createContext } from 'solid-js'; const _REGISTRY = _$$registry(); -export const Example = _$$context(_REGISTRY, "Example", createContext()); +export const Example = _$$component(_REGISTRY, "Example", createContext()); if (import.meta.hot) { _$$refresh("esm", import.meta.hot, _REGISTRY); }" `; exports[`esm (server, hydratable) > Context API > should support top-level VariableDeclaration 1`] = ` -"import { $$context as _$$context } from "solid-refresh"; +"import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; import { createContext } from 'solid-js'; const _REGISTRY = _$$registry(); -const Example = _$$context(_REGISTRY, "Example", createContext()); +const Example = _$$component(_REGISTRY, "Example", createContext()); if (import.meta.hot) { _$$refresh("esm", import.meta.hot, _REGISTRY); }" `; exports[`esm (server, hydratable) > ExportDefaultDeclaration w/ FunctionExpression > should skip ExportDefaultDeclaration w/ FunctionExpression with @refresh reload 1`] = ` -"import { ssr as _$ssr } from "solid-js/web"; -import { ssrHydrationKey as _$ssrHydrationKey } from "solid-js/web"; +"import { ssr as _$ssr } from "@solidjs/web"; +import { ssrHydrationKey as _$ssrHydrationKey } from "@solidjs/web"; var _tmpl$ = ["Foo

"]; import { $$decline as _$$decline } from "solid-refresh"; // @refresh reload export default function Foo() { - return _$ssr(_tmpl$, _$ssrHydrationKey()); + return (() => { + var _v$ = _$ssrHydrationKey(); + return _$ssr(_tmpl$, _v$); + })(); } if (import.meta.hot) { _$$decline("esm", import.meta.hot); @@ -46,25 +49,31 @@ if (import.meta.hot) { `; exports[`esm (server, hydratable) > ExportDefaultDeclaration w/ FunctionExpression > should skip ExportDefaultDeclaration w/ FunctionExpression with @refresh skip 1`] = ` -"import { ssr as _$ssr } from "solid-js/web"; -import { ssrHydrationKey as _$ssrHydrationKey } from "solid-js/web"; +"import { ssr as _$ssr } from "@solidjs/web"; +import { ssrHydrationKey as _$ssrHydrationKey } from "@solidjs/web"; var _tmpl$ = ["Foo

"]; // @refresh skip export default function Foo() { - return _$ssr(_tmpl$, _$ssrHydrationKey()); + return (() => { + var _v$ = _$ssrHydrationKey(); + return _$ssr(_tmpl$, _v$); + })(); }" `; exports[`esm (server, hydratable) > ExportDefaultDeclaration w/ FunctionExpression > should skip ExportDefaultDeclaration w/ FunctionExpression with invalid Component name 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; -import { ssrHydrationKey as _$ssrHydrationKey } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; +import { ssrHydrationKey as _$ssrHydrationKey } from "@solidjs/web"; var _tmpl$ = ["Foo

"]; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; const _REGISTRY = _$$registry(); -const JSX_foo_1 = _$$component(_REGISTRY, "JSX_foo_1", _props => /*@refresh jsx-skip*/_$ssr(_tmpl$, _$ssrHydrationKey()), { +const JSX_foo_1 = _$$component(_REGISTRY, "JSX_foo_1", _props => /*@refresh jsx-skip*/(() => { + var _v$ = _$ssrHydrationKey(); + return _$ssr(_tmpl$, _v$); +})(), { location: "example.jsx:3:15", signature: "4b145a58" }); @@ -77,15 +86,18 @@ if (import.meta.hot) { `; exports[`esm (server, hydratable) > ExportDefaultDeclaration w/ FunctionExpression > should skip ExportDefaultDeclaration w/ FunctionExpression with valid Component name and >1 params 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; -import { ssrHydrationKey as _$ssrHydrationKey } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; +import { ssrHydrationKey as _$ssrHydrationKey } from "@solidjs/web"; var _tmpl$ = ["Foo

"]; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; const _REGISTRY = _$$registry(); -const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/_$ssr(_tmpl$, _$ssrHydrationKey()), { +const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/(() => { + var _v$ = _$ssrHydrationKey(); + return _$ssr(_tmpl$, _v$); +})(), { location: "example.jsx:3:15", signature: "4b145a58" }); @@ -98,15 +110,18 @@ if (import.meta.hot) { `; exports[`esm (server, hydratable) > ExportDefaultDeclaration w/ FunctionExpression > should transform ExportDefaultDeclaration w/ FunctionExpression with valid Component name and params 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; -import { ssrHydrationKey as _$ssrHydrationKey } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; +import { ssrHydrationKey as _$ssrHydrationKey } from "@solidjs/web"; var _tmpl$ = ["Foo

"]; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; const _REGISTRY = _$$registry(); -const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/_$ssr(_tmpl$, _$ssrHydrationKey()), { +const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/(() => { + var _v$ = _$ssrHydrationKey(); + return _$ssr(_tmpl$, _v$); +})(), { location: "example.jsx:3:15", signature: "4b145a58" }); @@ -123,15 +138,18 @@ if (import.meta.hot) { `; exports[`esm (server, hydratable) > ExportDefaultDeclaration w/ FunctionExpression > should transform ExportDefaultDeclaration w/ FunctionExpression with valid Component name and params 2`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; -import { ssrHydrationKey as _$ssrHydrationKey } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; +import { ssrHydrationKey as _$ssrHydrationKey } from "@solidjs/web"; var _tmpl$ = ["Foo

"]; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; const _REGISTRY = _$$registry(); -const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/_$ssr(_tmpl$, _$ssrHydrationKey()), { +const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/(() => { + var _v$ = _$ssrHydrationKey(); + return _$ssr(_tmpl$, _v$); +})(), { location: "example.jsx:3:15", signature: "4b145a58" }); @@ -148,16 +166,21 @@ if (import.meta.hot) { `; exports[`esm (server, hydratable) > ExportDefaultDeclaration w/ FunctionExpression > should transform ExportDefaultDeclaration w/ FunctionExpression with valid Component name and params 3`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; -import { escape as _$escape } from "solid-js/web"; -import { ssrHydrationKey as _$ssrHydrationKey } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; +import { ssrRunInScope as _$ssrRunInScope } from "@solidjs/web"; +import { escape as _$escape } from "@solidjs/web"; +import { ssrHydrationKey as _$ssrHydrationKey } from "@solidjs/web"; var _tmpl$ = ["", "

"]; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; const _REGISTRY = _$$registry(); -const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/_$ssr(_tmpl$, _$ssrHydrationKey(), _$escape(_props.v0)), { +const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/(() => { + var _v$ = _$ssrHydrationKey(), + _v$2 = _$ssrRunInScope(() => _$escape(_props.v0)); + return _$ssr(_tmpl$, _v$, _v$2); +})(), { location: "example.jsx:4:15", signature: "ae0f2a31" }); @@ -180,7 +203,7 @@ if (import.meta.hot) { `; exports[`esm (server, hydratable) > ExportDefaultDeclaration w/ FunctionExpression > should transform ExportDefaultDeclaration w/ FunctionExpression with valid Component name and params 4`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; @@ -212,16 +235,19 @@ if (import.meta.hot) { `; exports[`esm (server, hydratable) > ExportDefaultDeclaration w/ FunctionExpression > should transform ExportDefaultDeclaration w/ FunctionExpression with valid Component name and params 5`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; -import { ssrHydrationKey as _$ssrHydrationKey } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; +import { ssrHydrationKey as _$ssrHydrationKey } from "@solidjs/web"; var _tmpl$ = ["foo
"], _tmpl$2 = ["bar
"]; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; const _REGISTRY = _$$registry(); -const Foo_1_1 = _$$component(_REGISTRY, "Foo_1_1", _props3 => /*@refresh jsx-skip*/_$ssr(_tmpl$, _$ssrHydrationKey()), { +const Foo_1_1 = _$$component(_REGISTRY, "Foo_1_1", _props3 => /*@refresh jsx-skip*/(() => { + var _v$ = _$ssrHydrationKey(); + return _$ssr(_tmpl$, _v$); +})(), { location: "example.jsx:8:12", signature: "241c14a4" }); @@ -239,7 +265,10 @@ const Foo = _$$component(_REGISTRY, "Foo", function Foo() { location: "example.jsx:5:21", signature: "c963b907" }); -const Bar_1 = _$$component(_REGISTRY, "Bar_1", _props2 => /*@refresh jsx-skip*/_$ssr(_tmpl$2, _$ssrHydrationKey()), { +const Bar_1 = _$$component(_REGISTRY, "Bar_1", _props2 => /*@refresh jsx-skip*/(() => { + var _v$2 = _$ssrHydrationKey(); + return _$ssr(_tmpl$2, _v$2); +})(), { location: "example.jsx:3:15", signature: "fad4daa8" }); @@ -256,13 +285,16 @@ if (import.meta.hot) { `; exports[`esm (server, hydratable) > ExportNamedDeclaration w/ FunctionExpression > should skip ExportNamedDeclaration w/ FunctionExpression with @refresh reload 1`] = ` -"import { ssr as _$ssr } from "solid-js/web"; -import { ssrHydrationKey as _$ssrHydrationKey } from "solid-js/web"; +"import { ssr as _$ssr } from "@solidjs/web"; +import { ssrHydrationKey as _$ssrHydrationKey } from "@solidjs/web"; var _tmpl$ = ["Foo

"]; import { $$decline as _$$decline } from "solid-refresh"; // @refresh reload export function Foo() { - return _$ssr(_tmpl$, _$ssrHydrationKey()); + return (() => { + var _v$ = _$ssrHydrationKey(); + return _$ssr(_tmpl$, _v$); + })(); } if (import.meta.hot) { _$$decline("esm", import.meta.hot); @@ -270,25 +302,31 @@ if (import.meta.hot) { `; exports[`esm (server, hydratable) > ExportNamedDeclaration w/ FunctionExpression > should skip ExportNamedDeclaration w/ FunctionExpression with @refresh skip 1`] = ` -"import { ssr as _$ssr } from "solid-js/web"; -import { ssrHydrationKey as _$ssrHydrationKey } from "solid-js/web"; +"import { ssr as _$ssr } from "@solidjs/web"; +import { ssrHydrationKey as _$ssrHydrationKey } from "@solidjs/web"; var _tmpl$ = ["Foo

"]; // @refresh skip export function Foo() { - return _$ssr(_tmpl$, _$ssrHydrationKey()); + return (() => { + var _v$ = _$ssrHydrationKey(); + return _$ssr(_tmpl$, _v$); + })(); }" `; exports[`esm (server, hydratable) > ExportNamedDeclaration w/ FunctionExpression > should skip ExportNamedDeclaration w/ FunctionExpression with invalid Component name 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; -import { ssrHydrationKey as _$ssrHydrationKey } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; +import { ssrHydrationKey as _$ssrHydrationKey } from "@solidjs/web"; var _tmpl$ = ["Foo

"]; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; const _REGISTRY = _$$registry(); -const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/_$ssr(_tmpl$, _$ssrHydrationKey()), { +const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/(() => { + var _v$ = _$ssrHydrationKey(); + return _$ssr(_tmpl$, _v$); +})(), { location: "example.jsx:3:15", signature: "4b145a58" }); @@ -305,15 +343,18 @@ if (import.meta.hot) { `; exports[`esm (server, hydratable) > ExportNamedDeclaration w/ FunctionExpression > should skip ExportNamedDeclaration w/ FunctionExpression with valid Component name and >1 params 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; -import { ssrHydrationKey as _$ssrHydrationKey } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; +import { ssrHydrationKey as _$ssrHydrationKey } from "@solidjs/web"; var _tmpl$ = ["Foo

"]; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; const _REGISTRY = _$$registry(); -const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/_$ssr(_tmpl$, _$ssrHydrationKey()), { +const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/(() => { + var _v$ = _$ssrHydrationKey(); + return _$ssr(_tmpl$, _v$); +})(), { location: "example.jsx:3:15", signature: "4b145a58" }); @@ -326,15 +367,18 @@ if (import.meta.hot) { `; exports[`esm (server, hydratable) > ExportNamedDeclaration w/ FunctionExpression > should transform ExportNamedDeclaration w/ FunctionExpression with valid Component name and params 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; -import { ssrHydrationKey as _$ssrHydrationKey } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; +import { ssrHydrationKey as _$ssrHydrationKey } from "@solidjs/web"; var _tmpl$ = ["Foo

"]; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; const _REGISTRY = _$$registry(); -const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/_$ssr(_tmpl$, _$ssrHydrationKey()), { +const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/(() => { + var _v$ = _$ssrHydrationKey(); + return _$ssr(_tmpl$, _v$); +})(), { location: "example.jsx:3:15", signature: "4b145a58" }); @@ -351,15 +395,18 @@ if (import.meta.hot) { `; exports[`esm (server, hydratable) > ExportNamedDeclaration w/ FunctionExpression > should transform ExportNamedDeclaration w/ FunctionExpression with valid Component name and params 2`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; -import { ssrHydrationKey as _$ssrHydrationKey } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; +import { ssrHydrationKey as _$ssrHydrationKey } from "@solidjs/web"; var _tmpl$ = ["Foo

"]; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; const _REGISTRY = _$$registry(); -const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/_$ssr(_tmpl$, _$ssrHydrationKey()), { +const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/(() => { + var _v$ = _$ssrHydrationKey(); + return _$ssr(_tmpl$, _v$); +})(), { location: "example.jsx:3:15", signature: "4b145a58" }); @@ -376,16 +423,21 @@ if (import.meta.hot) { `; exports[`esm (server, hydratable) > ExportNamedDeclaration w/ FunctionExpression > should transform ExportNamedDeclaration w/ FunctionExpression with valid Component name and params 3`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; -import { escape as _$escape } from "solid-js/web"; -import { ssrHydrationKey as _$ssrHydrationKey } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; +import { ssrRunInScope as _$ssrRunInScope } from "@solidjs/web"; +import { escape as _$escape } from "@solidjs/web"; +import { ssrHydrationKey as _$ssrHydrationKey } from "@solidjs/web"; var _tmpl$ = ["", "

"]; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; const _REGISTRY = _$$registry(); -const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/_$ssr(_tmpl$, _$ssrHydrationKey(), _$escape(_props.v0)), { +const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/(() => { + var _v$ = _$ssrHydrationKey(), + _v$2 = _$ssrRunInScope(() => _$escape(_props.v0)); + return _$ssr(_tmpl$, _v$, _v$2); +})(), { location: "example.jsx:4:15", signature: "ae0f2a31" }); @@ -408,7 +460,7 @@ if (import.meta.hot) { `; exports[`esm (server, hydratable) > ExportNamedDeclaration w/ FunctionExpression > should transform ExportNamedDeclaration w/ FunctionExpression with valid Component name and params 4`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; @@ -440,16 +492,19 @@ if (import.meta.hot) { `; exports[`esm (server, hydratable) > ExportNamedDeclaration w/ FunctionExpression > should transform ExportNamedDeclaration w/ FunctionExpression with valid Component name and params 5`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; -import { ssrHydrationKey as _$ssrHydrationKey } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; +import { ssrHydrationKey as _$ssrHydrationKey } from "@solidjs/web"; var _tmpl$ = ["foo
"], _tmpl$2 = ["bar
"]; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; const _REGISTRY = _$$registry(); -const Foo_1_1 = _$$component(_REGISTRY, "Foo_1_1", _props3 => /*@refresh jsx-skip*/_$ssr(_tmpl$, _$ssrHydrationKey()), { +const Foo_1_1 = _$$component(_REGISTRY, "Foo_1_1", _props3 => /*@refresh jsx-skip*/(() => { + var _v$ = _$ssrHydrationKey(); + return _$ssr(_tmpl$, _v$); +})(), { location: "example.jsx:8:12", signature: "241c14a4" }); @@ -476,7 +531,10 @@ const Foo = _$$component(_REGISTRY, "Foo", function Foo() { Bar }) }); -const Bar_1 = _$$component(_REGISTRY, "Bar_1", _props2 => /*@refresh jsx-skip*/_$ssr(_tmpl$2, _$ssrHydrationKey()), { +const Bar_1 = _$$component(_REGISTRY, "Bar_1", _props2 => /*@refresh jsx-skip*/(() => { + var _v$2 = _$ssrHydrationKey(); + return _$ssr(_tmpl$2, _v$2); +})(), { location: "example.jsx:3:15", signature: "fad4daa8" }); @@ -494,13 +552,16 @@ if (import.meta.hot) { `; exports[`esm (server, hydratable) > FunctionDeclaration > should skip FunctionDeclaration with @refresh reload 1`] = ` -"import { ssr as _$ssr } from "solid-js/web"; -import { ssrHydrationKey as _$ssrHydrationKey } from "solid-js/web"; +"import { ssr as _$ssr } from "@solidjs/web"; +import { ssrHydrationKey as _$ssrHydrationKey } from "@solidjs/web"; var _tmpl$ = ["Foo

"]; import { $$decline as _$$decline } from "solid-refresh"; // @refresh reload function Foo() { - return _$ssr(_tmpl$, _$ssrHydrationKey()); + return (() => { + var _v$ = _$ssrHydrationKey(); + return _$ssr(_tmpl$, _v$); + })(); } if (import.meta.hot) { _$$decline("esm", import.meta.hot); @@ -508,25 +569,31 @@ if (import.meta.hot) { `; exports[`esm (server, hydratable) > FunctionDeclaration > should skip FunctionDeclaration with @refresh skip 1`] = ` -"import { ssr as _$ssr } from "solid-js/web"; -import { ssrHydrationKey as _$ssrHydrationKey } from "solid-js/web"; +"import { ssr as _$ssr } from "@solidjs/web"; +import { ssrHydrationKey as _$ssrHydrationKey } from "@solidjs/web"; var _tmpl$ = ["Foo"]; // @refresh skip function Foo() { - return _$ssr(_tmpl$, _$ssrHydrationKey()); + return (() => { + var _v$ = _$ssrHydrationKey(); + return _$ssr(_tmpl$, _v$); + })(); }" `; exports[`esm (server, hydratable) > FunctionDeclaration > should skip FunctionDeclaration with invalid Component name 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; -import { ssrHydrationKey as _$ssrHydrationKey } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; +import { ssrHydrationKey as _$ssrHydrationKey } from "@solidjs/web"; var _tmpl$ = ["Foo"]; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; const _REGISTRY = _$$registry(); -const JSX_foo_1 = _$$component(_REGISTRY, "JSX_foo_1", _props => /*@refresh jsx-skip*/_$ssr(_tmpl$, _$ssrHydrationKey()), { +const JSX_foo_1 = _$$component(_REGISTRY, "JSX_foo_1", _props => /*@refresh jsx-skip*/(() => { + var _v$ = _$ssrHydrationKey(); + return _$ssr(_tmpl$, _v$); +})(), { location: "example.jsx:3:15", signature: "4b145a58" }); @@ -539,15 +606,18 @@ if (import.meta.hot) { `; exports[`esm (server, hydratable) > FunctionDeclaration > should skip FunctionDeclaration with valid Component name and >1 params 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; -import { ssrHydrationKey as _$ssrHydrationKey } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; +import { ssrHydrationKey as _$ssrHydrationKey } from "@solidjs/web"; var _tmpl$ = ["Foo"]; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; const _REGISTRY = _$$registry(); -const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/_$ssr(_tmpl$, _$ssrHydrationKey()), { +const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/(() => { + var _v$ = _$ssrHydrationKey(); + return _$ssr(_tmpl$, _v$); +})(), { location: "example.jsx:3:15", signature: "4b145a58" }); @@ -560,15 +630,18 @@ if (import.meta.hot) { `; exports[`esm (server, hydratable) > FunctionDeclaration > should transform FunctionDeclaration with valid Component name and params 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; -import { ssrHydrationKey as _$ssrHydrationKey } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; +import { ssrHydrationKey as _$ssrHydrationKey } from "@solidjs/web"; var _tmpl$ = ["Foo"]; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; const _REGISTRY = _$$registry(); -const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/_$ssr(_tmpl$, _$ssrHydrationKey()), { +const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/(() => { + var _v$ = _$ssrHydrationKey(); + return _$ssr(_tmpl$, _v$); +})(), { location: "example.jsx:3:15", signature: "4b145a58" }); @@ -584,15 +657,18 @@ if (import.meta.hot) { `; exports[`esm (server, hydratable) > FunctionDeclaration > should transform FunctionDeclaration with valid Component name and params 2`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; -import { ssrHydrationKey as _$ssrHydrationKey } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; +import { ssrHydrationKey as _$ssrHydrationKey } from "@solidjs/web"; var _tmpl$ = ["Foo"]; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; const _REGISTRY = _$$registry(); -const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/_$ssr(_tmpl$, _$ssrHydrationKey()), { +const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/(() => { + var _v$ = _$ssrHydrationKey(); + return _$ssr(_tmpl$, _v$); +})(), { location: "example.jsx:3:15", signature: "4b145a58" }); @@ -608,17 +684,22 @@ if (import.meta.hot) { `; exports[`esm (server, hydratable) > FunctionDeclaration > should transform FunctionDeclaration with valid Component name and params 3`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; -import { escape as _$escape } from "solid-js/web"; -import { ssrHydrationKey as _$ssrHydrationKey } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; +import { ssrRunInScope as _$ssrRunInScope } from "@solidjs/web"; +import { escape as _$escape } from "@solidjs/web"; +import { ssrHydrationKey as _$ssrHydrationKey } from "@solidjs/web"; var _tmpl$ = ["", ""]; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; const example = 'Foo'; const _REGISTRY = _$$registry(); -const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/_$ssr(_tmpl$, _$ssrHydrationKey(), _$escape(_props.v0)), { +const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/(() => { + var _v$ = _$ssrHydrationKey(), + _v$2 = _$ssrRunInScope(() => _$escape(_props.v0)); + return _$ssr(_tmpl$, _v$, _v$2); +})(), { location: "example.jsx:4:15", signature: "ae0f2a31" }); @@ -639,7 +720,7 @@ if (import.meta.hot) { `; exports[`esm (server, hydratable) > FunctionDeclaration > should transform FunctionDeclaration with valid Component name and params 4`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; @@ -670,16 +751,19 @@ if (import.meta.hot) { `; exports[`esm (server, hydratable) > FunctionDeclaration > should transform FunctionDeclaration with valid Component name and params 5`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; -import { ssrHydrationKey as _$ssrHydrationKey } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; +import { ssrHydrationKey as _$ssrHydrationKey } from "@solidjs/web"; var _tmpl$ = ["bar"], _tmpl$2 = ["foo"]; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; const _REGISTRY = _$$registry(); -const Bar_1 = _$$component(_REGISTRY, "Bar_1", _props => /*@refresh jsx-skip*/_$ssr(_tmpl$, _$ssrHydrationKey()), { +const Bar_1 = _$$component(_REGISTRY, "Bar_1", _props => /*@refresh jsx-skip*/(() => { + var _v$ = _$ssrHydrationKey(); + return _$ssr(_tmpl$, _v$); +})(), { location: "example.jsx:3:15", signature: "61dd3182" }); @@ -689,7 +773,10 @@ const Bar = _$$component(_REGISTRY, "Bar", function Bar() { location: "example.jsx:2:6", signature: "e93ca257" }); -const Foo_1_1 = _$$component(_REGISTRY, "Foo_1_1", _props3 => /*@refresh jsx-skip*/_$ssr(_tmpl$2, _$ssrHydrationKey()), { +const Foo_1_1 = _$$component(_REGISTRY, "Foo_1_1", _props3 => /*@refresh jsx-skip*/(() => { + var _v$2 = _$ssrHydrationKey(); + return _$ssr(_tmpl$2, _v$2); +})(), { location: "example.jsx:8:12", signature: "241c14a4" }); @@ -713,13 +800,16 @@ if (import.meta.hot) { `; exports[`esm (server, hydratable) > VariableDeclarator > ArrowFunctionExpression > should skip VariableDeclarator w/ ArrowFunctionExpression with @refresh reload 1`] = ` -"import { ssr as _$ssr } from "solid-js/web"; -import { ssrHydrationKey as _$ssrHydrationKey } from "solid-js/web"; +"import { ssr as _$ssr } from "@solidjs/web"; +import { ssrHydrationKey as _$ssrHydrationKey } from "@solidjs/web"; var _tmpl$ = ["Foo"]; import { $$decline as _$$decline } from "solid-refresh"; // @refresh reload const Foo = () => { - return _$ssr(_tmpl$, _$ssrHydrationKey()); + return (() => { + var _v$ = _$ssrHydrationKey(); + return _$ssr(_tmpl$, _v$); + })(); }; if (import.meta.hot) { _$$decline("esm", import.meta.hot); @@ -727,25 +817,31 @@ if (import.meta.hot) { `; exports[`esm (server, hydratable) > VariableDeclarator > ArrowFunctionExpression > should skip VariableDeclarator w/ ArrowFunctionExpression with @refresh skip 1`] = ` -"import { ssr as _$ssr } from "solid-js/web"; -import { ssrHydrationKey as _$ssrHydrationKey } from "solid-js/web"; +"import { ssr as _$ssr } from "@solidjs/web"; +import { ssrHydrationKey as _$ssrHydrationKey } from "@solidjs/web"; var _tmpl$ = ["Foo"]; // @refresh skip const Foo = () => { - return _$ssr(_tmpl$, _$ssrHydrationKey()); + return (() => { + var _v$ = _$ssrHydrationKey(); + return _$ssr(_tmpl$, _v$); + })(); };" `; exports[`esm (server, hydratable) > VariableDeclarator > ArrowFunctionExpression > should skip VariableDeclarator w/ ArrowFunctionExpression with invalid Component name 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; -import { ssrHydrationKey as _$ssrHydrationKey } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; +import { ssrHydrationKey as _$ssrHydrationKey } from "@solidjs/web"; var _tmpl$ = ["Foo"]; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; const _REGISTRY = _$$registry(); -const JSX_foo_1 = _$$component(_REGISTRY, "JSX_foo_1", _props => /*@refresh jsx-skip*/_$ssr(_tmpl$, _$ssrHydrationKey()), { +const JSX_foo_1 = _$$component(_REGISTRY, "JSX_foo_1", _props => /*@refresh jsx-skip*/(() => { + var _v$ = _$ssrHydrationKey(); + return _$ssr(_tmpl$, _v$); +})(), { location: "example.jsx:3:17", signature: "4b145a58" }); @@ -758,15 +854,18 @@ if (import.meta.hot) { `; exports[`esm (server, hydratable) > VariableDeclarator > ArrowFunctionExpression > should skip VariableDeclarator w/ ArrowFunctionExpression with valid Component name and >1 params 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; -import { ssrHydrationKey as _$ssrHydrationKey } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; +import { ssrHydrationKey as _$ssrHydrationKey } from "@solidjs/web"; var _tmpl$ = ["Foo"]; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; const _REGISTRY = _$$registry(); -const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/_$ssr(_tmpl$, _$ssrHydrationKey()), { +const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/(() => { + var _v$ = _$ssrHydrationKey(); + return _$ssr(_tmpl$, _v$); +})(), { location: "example.jsx:3:17", signature: "4b145a58" }); @@ -779,15 +878,18 @@ if (import.meta.hot) { `; exports[`esm (server, hydratable) > VariableDeclarator > ArrowFunctionExpression > should transform VariableDeclarator w/ ArrowFunctionExpression with valid Component name and params 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; -import { ssrHydrationKey as _$ssrHydrationKey } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; +import { ssrHydrationKey as _$ssrHydrationKey } from "@solidjs/web"; var _tmpl$ = ["Foo"]; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; const _REGISTRY = _$$registry(); -const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/_$ssr(_tmpl$, _$ssrHydrationKey()), { +const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/(() => { + var _v$ = _$ssrHydrationKey(); + return _$ssr(_tmpl$, _v$); +})(), { location: "example.jsx:3:17", signature: "4b145a58" }); @@ -803,15 +905,18 @@ if (import.meta.hot) { `; exports[`esm (server, hydratable) > VariableDeclarator > ArrowFunctionExpression > should transform VariableDeclarator w/ ArrowFunctionExpression with valid Component name and params 2`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; -import { ssrHydrationKey as _$ssrHydrationKey } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; +import { ssrHydrationKey as _$ssrHydrationKey } from "@solidjs/web"; var _tmpl$ = ["Foo"]; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; const _REGISTRY = _$$registry(); -const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/_$ssr(_tmpl$, _$ssrHydrationKey()), { +const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/(() => { + var _v$ = _$ssrHydrationKey(); + return _$ssr(_tmpl$, _v$); +})(), { location: "example.jsx:3:17", signature: "4b145a58" }); @@ -827,17 +932,22 @@ if (import.meta.hot) { `; exports[`esm (server, hydratable) > VariableDeclarator > ArrowFunctionExpression > should transform VariableDeclarator w/ ArrowFunctionExpression with valid Component name and params 3`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; -import { escape as _$escape } from "solid-js/web"; -import { ssrHydrationKey as _$ssrHydrationKey } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; +import { ssrRunInScope as _$ssrRunInScope } from "@solidjs/web"; +import { escape as _$escape } from "@solidjs/web"; +import { ssrHydrationKey as _$ssrHydrationKey } from "@solidjs/web"; var _tmpl$ = ["", ""]; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; const example = 'Foo'; const _REGISTRY = _$$registry(); -const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/_$ssr(_tmpl$, _$ssrHydrationKey(), _$escape(_props.v0)), { +const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/(() => { + var _v$ = _$ssrHydrationKey(), + _v$2 = _$ssrRunInScope(() => _$escape(_props.v0)); + return _$ssr(_tmpl$, _v$, _v$2); +})(), { location: "example.jsx:4:17", signature: "ae0f2a31" }); @@ -858,7 +968,7 @@ if (import.meta.hot) { `; exports[`esm (server, hydratable) > VariableDeclarator > ArrowFunctionExpression > should transform VariableDeclarator w/ ArrowFunctionExpression with valid Component name and params 4`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; @@ -889,16 +999,19 @@ if (import.meta.hot) { `; exports[`esm (server, hydratable) > VariableDeclarator > ArrowFunctionExpression > should transform VariableDeclarator w/ ArrowFunctionExpression with valid Component name and params 5`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; -import { ssrHydrationKey as _$ssrHydrationKey } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; +import { ssrHydrationKey as _$ssrHydrationKey } from "@solidjs/web"; var _tmpl$ = ["bar"], _tmpl$2 = ["foo"]; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; const _REGISTRY = _$$registry(); -const Bar_1 = _$$component(_REGISTRY, "Bar_1", _props => /*@refresh jsx-skip*/_$ssr(_tmpl$, _$ssrHydrationKey()), { +const Bar_1 = _$$component(_REGISTRY, "Bar_1", _props => /*@refresh jsx-skip*/(() => { + var _v$ = _$ssrHydrationKey(); + return _$ssr(_tmpl$, _v$); +})(), { location: "example.jsx:3:17", signature: "61dd3182" }); @@ -908,7 +1021,10 @@ const Bar = _$$component(_REGISTRY, "Bar", () => { location: "example.jsx:2:20", signature: "d1c6ca9b" }); -const Foo_1_1 = _$$component(_REGISTRY, "Foo_1_1", _props3 => /*@refresh jsx-skip*/_$ssr(_tmpl$2, _$ssrHydrationKey()), { +const Foo_1_1 = _$$component(_REGISTRY, "Foo_1_1", _props3 => /*@refresh jsx-skip*/(() => { + var _v$2 = _$ssrHydrationKey(); + return _$ssr(_tmpl$2, _v$2); +})(), { location: "example.jsx:8:14", signature: "241c14a4" }); @@ -932,13 +1048,16 @@ if (import.meta.hot) { `; exports[`esm (server, hydratable) > VariableDeclarator > FunctionExpression > should skip VariableDeclarator w/ FunctionExpression with @refresh reload 1`] = ` -"import { ssr as _$ssr } from "solid-js/web"; -import { ssrHydrationKey as _$ssrHydrationKey } from "solid-js/web"; +"import { ssr as _$ssr } from "@solidjs/web"; +import { ssrHydrationKey as _$ssrHydrationKey } from "@solidjs/web"; var _tmpl$ = ["Foo"]; import { $$decline as _$$decline } from "solid-refresh"; // @refresh reload const Foo = function () { - return _$ssr(_tmpl$, _$ssrHydrationKey()); + return (() => { + var _v$ = _$ssrHydrationKey(); + return _$ssr(_tmpl$, _v$); + })(); }; if (import.meta.hot) { _$$decline("esm", import.meta.hot); @@ -946,25 +1065,31 @@ if (import.meta.hot) { `; exports[`esm (server, hydratable) > VariableDeclarator > FunctionExpression > should skip VariableDeclarator w/ FunctionExpression with @refresh skip 1`] = ` -"import { ssr as _$ssr } from "solid-js/web"; -import { ssrHydrationKey as _$ssrHydrationKey } from "solid-js/web"; +"import { ssr as _$ssr } from "@solidjs/web"; +import { ssrHydrationKey as _$ssrHydrationKey } from "@solidjs/web"; var _tmpl$ = ["Foo"]; // @refresh skip const Foo = function () { - return _$ssr(_tmpl$, _$ssrHydrationKey()); + return (() => { + var _v$ = _$ssrHydrationKey(); + return _$ssr(_tmpl$, _v$); + })(); };" `; exports[`esm (server, hydratable) > VariableDeclarator > FunctionExpression > should skip VariableDeclarator w/ FunctionExpression with invalid Component name 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; -import { ssrHydrationKey as _$ssrHydrationKey } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; +import { ssrHydrationKey as _$ssrHydrationKey } from "@solidjs/web"; var _tmpl$ = ["Foo"]; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; const _REGISTRY = _$$registry(); -const JSX_foo_1 = _$$component(_REGISTRY, "JSX_foo_1", _props => /*@refresh jsx-skip*/_$ssr(_tmpl$, _$ssrHydrationKey()), { +const JSX_foo_1 = _$$component(_REGISTRY, "JSX_foo_1", _props => /*@refresh jsx-skip*/(() => { + var _v$ = _$ssrHydrationKey(); + return _$ssr(_tmpl$, _v$); +})(), { location: "example.jsx:3:17", signature: "4b145a58" }); @@ -977,15 +1102,18 @@ if (import.meta.hot) { `; exports[`esm (server, hydratable) > VariableDeclarator > FunctionExpression > should skip VariableDeclarator w/ FunctionExpression with valid Component name and >1 params 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; -import { ssrHydrationKey as _$ssrHydrationKey } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; +import { ssrHydrationKey as _$ssrHydrationKey } from "@solidjs/web"; var _tmpl$ = ["Foo"]; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; const _REGISTRY = _$$registry(); -const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/_$ssr(_tmpl$, _$ssrHydrationKey()), { +const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/(() => { + var _v$ = _$ssrHydrationKey(); + return _$ssr(_tmpl$, _v$); +})(), { location: "example.jsx:3:17", signature: "4b145a58" }); @@ -998,15 +1126,18 @@ if (import.meta.hot) { `; exports[`esm (server, hydratable) > VariableDeclarator > FunctionExpression > should transform VariableDeclarator w/ FunctionExpression with valid Component name and params 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; -import { ssrHydrationKey as _$ssrHydrationKey } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; +import { ssrHydrationKey as _$ssrHydrationKey } from "@solidjs/web"; var _tmpl$ = ["Foo"]; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; const _REGISTRY = _$$registry(); -const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/_$ssr(_tmpl$, _$ssrHydrationKey()), { +const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/(() => { + var _v$ = _$ssrHydrationKey(); + return _$ssr(_tmpl$, _v$); +})(), { location: "example.jsx:3:17", signature: "4b145a58" }); @@ -1022,15 +1153,18 @@ if (import.meta.hot) { `; exports[`esm (server, hydratable) > VariableDeclarator > FunctionExpression > should transform VariableDeclarator w/ FunctionExpression with valid Component name and params 2`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; -import { ssrHydrationKey as _$ssrHydrationKey } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; +import { ssrHydrationKey as _$ssrHydrationKey } from "@solidjs/web"; var _tmpl$ = ["Foo"]; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; const _REGISTRY = _$$registry(); -const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/_$ssr(_tmpl$, _$ssrHydrationKey()), { +const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/(() => { + var _v$ = _$ssrHydrationKey(); + return _$ssr(_tmpl$, _v$); +})(), { location: "example.jsx:3:17", signature: "4b145a58" }); @@ -1046,17 +1180,22 @@ if (import.meta.hot) { `; exports[`esm (server, hydratable) > VariableDeclarator > FunctionExpression > should transform VariableDeclarator w/ FunctionExpression with valid Component name and params 3`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; -import { escape as _$escape } from "solid-js/web"; -import { ssrHydrationKey as _$ssrHydrationKey } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; +import { ssrRunInScope as _$ssrRunInScope } from "@solidjs/web"; +import { escape as _$escape } from "@solidjs/web"; +import { ssrHydrationKey as _$ssrHydrationKey } from "@solidjs/web"; var _tmpl$ = ["", ""]; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; const example = 'Foo'; const _REGISTRY = _$$registry(); -const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/_$ssr(_tmpl$, _$ssrHydrationKey(), _$escape(_props.v0)), { +const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/(() => { + var _v$ = _$ssrHydrationKey(), + _v$2 = _$ssrRunInScope(() => _$escape(_props.v0)); + return _$ssr(_tmpl$, _v$, _v$2); +})(), { location: "example.jsx:4:17", signature: "ae0f2a31" }); @@ -1077,7 +1216,7 @@ if (import.meta.hot) { `; exports[`esm (server, hydratable) > VariableDeclarator > FunctionExpression > should transform VariableDeclarator w/ FunctionExpression with valid Component name and params 4`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; @@ -1108,16 +1247,19 @@ if (import.meta.hot) { `; exports[`esm (server, hydratable) > VariableDeclarator > FunctionExpression > should transform VariableDeclarator w/ FunctionExpression with valid Component name and params 5`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; -import { ssrHydrationKey as _$ssrHydrationKey } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; +import { ssrHydrationKey as _$ssrHydrationKey } from "@solidjs/web"; var _tmpl$ = ["bar"], _tmpl$2 = ["foo"]; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; const _REGISTRY = _$$registry(); -const Bar_1 = _$$component(_REGISTRY, "Bar_1", _props => /*@refresh jsx-skip*/_$ssr(_tmpl$, _$ssrHydrationKey()), { +const Bar_1 = _$$component(_REGISTRY, "Bar_1", _props => /*@refresh jsx-skip*/(() => { + var _v$ = _$ssrHydrationKey(); + return _$ssr(_tmpl$, _v$); +})(), { location: "example.jsx:3:17", signature: "61dd3182" }); @@ -1127,7 +1269,10 @@ const Bar = _$$component(_REGISTRY, "Bar", function () { location: "example.jsx:2:20", signature: "1fb34faa" }); -const Foo_1_1 = _$$component(_REGISTRY, "Foo_1_1", _props3 => /*@refresh jsx-skip*/_$ssr(_tmpl$2, _$ssrHydrationKey()), { +const Foo_1_1 = _$$component(_REGISTRY, "Foo_1_1", _props3 => /*@refresh jsx-skip*/(() => { + var _v$2 = _$ssrHydrationKey(); + return _$ssr(_tmpl$2, _v$2); +})(), { location: "example.jsx:8:14", signature: "241c14a4" }); @@ -1151,15 +1296,19 @@ if (import.meta.hot) { `; exports[`esm (server, hydratable) > fix build > refs > should work with a function 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; -import { ssrHydrationKey as _$ssrHydrationKey } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; +import { ssrHydrationKey as _$ssrHydrationKey } from "@solidjs/web"; var _tmpl$ = ["Comp"]; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; const _REGISTRY = _$$registry(); -const Comp_1 = _$$component(_REGISTRY, "Comp_1", _props => /*@refresh jsx-skip*/_$ssr(_tmpl$, _$ssrHydrationKey()), { +const Comp_1 = _$$component(_REGISTRY, "Comp_1", _props => /*@refresh jsx-skip*/(() => { + var _v$ = _$ssrHydrationKey(), + _ref$ = _props.v0; + return _$ssr(_tmpl$, _v$); +})(), { location: "example.jsx:4:19", signature: "6f76290" }); @@ -1178,15 +1327,19 @@ if (import.meta.webpackHot) { `; exports[`esm (server, hydratable) > fix build > refs > should work with a mutable variable 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; -import { ssrHydrationKey as _$ssrHydrationKey } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; +import { ssrHydrationKey as _$ssrHydrationKey } from "@solidjs/web"; var _tmpl$ = ["Comp"]; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; const _REGISTRY = _$$registry(); -const Comp_1 = _$$component(_REGISTRY, "Comp_1", _props => /*@refresh jsx-skip*/_$ssr(_tmpl$, _$ssrHydrationKey()), { +const Comp_1 = _$$component(_REGISTRY, "Comp_1", _props => /*@refresh jsx-skip*/(() => { + var _v$ = _$ssrHydrationKey(), + _ref$ = _props.v0; + return _$ssr(_tmpl$, _v$); +})(), { location: "example.jsx:4:19", signature: "6f76290" }); @@ -1211,16 +1364,20 @@ if (import.meta.webpackHot) { `; exports[`esm (server, hydratable) > fix build > signals as refs > should work 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; -import { ssrHydrationKey as _$ssrHydrationKey } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; +import { ssrHydrationKey as _$ssrHydrationKey } from "@solidjs/web"; var _tmpl$ = ["Comp"]; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; import { createSignal } from 'solid-js'; const _REGISTRY = _$$registry(); -const Comp_1 = _$$component(_REGISTRY, "Comp_1", _props => /*@refresh jsx-skip*/_$ssr(_tmpl$, _$ssrHydrationKey()), { +const Comp_1 = _$$component(_REGISTRY, "Comp_1", _props => /*@refresh jsx-skip*/(() => { + var _v$ = _$ssrHydrationKey(), + _ref$ = _props.v0; + return _$ssr(_tmpl$, _v$); +})(), { location: "example.jsx:6:19", signature: "6f76290" }); @@ -1246,7 +1403,7 @@ if (import.meta.webpackHot) { `; exports[`esm (server, hydratable) > fix render > @refresh reload > should work 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; import { $$decline as _$$decline } from "solid-refresh"; // @refresh reload import { render } from 'solid-js/web'; @@ -1260,7 +1417,7 @@ if (import.meta.hot) { `; exports[`esm (server, hydratable) > fix render > import specifiers > should work with ImportNamespaceSpecifier 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; @@ -1280,7 +1437,7 @@ if (import.meta.hot) { `; exports[`esm (server, hydratable) > fix render > import specifiers > should work with ImportSpecifier + Identifier 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; @@ -1300,7 +1457,7 @@ if (import.meta.hot) { `; exports[`esm (server, hydratable) > fix render > import specifiers > should work with ImportSpecifier + aliased Identifier 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; @@ -1320,7 +1477,7 @@ if (import.meta.hot) { `; exports[`esm (server, hydratable) > fix render > import specifiers > should work with ImportSpecifier + aliased Identifier from StringLiteral 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; @@ -1340,7 +1497,7 @@ if (import.meta.hot) { `; exports[`esm (server, hydratable) > fix render > top-level statements > should work with IfStatement 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; diff --git a/tests/server-hydratable/__snapshots__/standard.test.ts.snap b/tests/server-hydratable/__snapshots__/standard.test.ts.snap index 3636a11..200402a 100644 --- a/tests/server-hydratable/__snapshots__/standard.test.ts.snap +++ b/tests/server-hydratable/__snapshots__/standard.test.ts.snap @@ -8,37 +8,40 @@ if (someCond) { `; exports[`standard (server, hydratable) > Context API > should support ExportNamedDeclaration 1`] = ` -"import { $$context as _$$context } from "solid-refresh"; +"import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; import { createContext } from 'solid-js'; const _REGISTRY = _$$registry(); -export const Example = _$$context(_REGISTRY, "Example", createContext()); +export const Example = _$$component(_REGISTRY, "Example", createContext()); if (module.hot) { _$$refresh("standard", module.hot, _REGISTRY); }" `; exports[`standard (server, hydratable) > Context API > should support top-level VariableDeclaration 1`] = ` -"import { $$context as _$$context } from "solid-refresh"; +"import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; import { createContext } from 'solid-js'; const _REGISTRY = _$$registry(); -const Example = _$$context(_REGISTRY, "Example", createContext()); +const Example = _$$component(_REGISTRY, "Example", createContext()); if (module.hot) { _$$refresh("standard", module.hot, _REGISTRY); }" `; exports[`standard (server, hydratable) > ExportDefaultDeclaration w/ FunctionExpression > should skip ExportDefaultDeclaration w/ FunctionExpression with @refresh reload 1`] = ` -"import { ssr as _$ssr } from "solid-js/web"; -import { ssrHydrationKey as _$ssrHydrationKey } from "solid-js/web"; +"import { ssr as _$ssr } from "@solidjs/web"; +import { ssrHydrationKey as _$ssrHydrationKey } from "@solidjs/web"; var _tmpl$ = ["Foo"]; import { $$decline as _$$decline } from "solid-refresh"; // @refresh reload export default function Foo() { - return _$ssr(_tmpl$, _$ssrHydrationKey()); + return (() => { + var _v$ = _$ssrHydrationKey(); + return _$ssr(_tmpl$, _v$); + })(); } if (module.hot) { _$$decline("standard", module.hot); @@ -46,25 +49,31 @@ if (module.hot) { `; exports[`standard (server, hydratable) > ExportDefaultDeclaration w/ FunctionExpression > should skip ExportDefaultDeclaration w/ FunctionExpression with @refresh skip 1`] = ` -"import { ssr as _$ssr } from "solid-js/web"; -import { ssrHydrationKey as _$ssrHydrationKey } from "solid-js/web"; +"import { ssr as _$ssr } from "@solidjs/web"; +import { ssrHydrationKey as _$ssrHydrationKey } from "@solidjs/web"; var _tmpl$ = ["Foo"]; // @refresh skip export default function Foo() { - return _$ssr(_tmpl$, _$ssrHydrationKey()); + return (() => { + var _v$ = _$ssrHydrationKey(); + return _$ssr(_tmpl$, _v$); + })(); }" `; exports[`standard (server, hydratable) > ExportDefaultDeclaration w/ FunctionExpression > should skip ExportDefaultDeclaration w/ FunctionExpression with invalid Component name 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; -import { ssrHydrationKey as _$ssrHydrationKey } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; +import { ssrHydrationKey as _$ssrHydrationKey } from "@solidjs/web"; var _tmpl$ = ["Foo"]; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; const _REGISTRY = _$$registry(); -const JSX_foo_1 = _$$component(_REGISTRY, "JSX_foo_1", _props => /*@refresh jsx-skip*/_$ssr(_tmpl$, _$ssrHydrationKey()), { +const JSX_foo_1 = _$$component(_REGISTRY, "JSX_foo_1", _props => /*@refresh jsx-skip*/(() => { + var _v$ = _$ssrHydrationKey(); + return _$ssr(_tmpl$, _v$); +})(), { location: "example.jsx:3:15", signature: "4b145a58" }); @@ -77,15 +86,18 @@ if (module.hot) { `; exports[`standard (server, hydratable) > ExportDefaultDeclaration w/ FunctionExpression > should skip ExportDefaultDeclaration w/ FunctionExpression with valid Component name and >1 params 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; -import { ssrHydrationKey as _$ssrHydrationKey } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; +import { ssrHydrationKey as _$ssrHydrationKey } from "@solidjs/web"; var _tmpl$ = ["Foo"]; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; const _REGISTRY = _$$registry(); -const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/_$ssr(_tmpl$, _$ssrHydrationKey()), { +const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/(() => { + var _v$ = _$ssrHydrationKey(); + return _$ssr(_tmpl$, _v$); +})(), { location: "example.jsx:3:15", signature: "4b145a58" }); @@ -98,15 +110,18 @@ if (module.hot) { `; exports[`standard (server, hydratable) > ExportDefaultDeclaration w/ FunctionExpression > should transform ExportDefaultDeclaration w/ FunctionExpression with valid Component name and params 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; -import { ssrHydrationKey as _$ssrHydrationKey } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; +import { ssrHydrationKey as _$ssrHydrationKey } from "@solidjs/web"; var _tmpl$ = ["Foo"]; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; const _REGISTRY = _$$registry(); -const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/_$ssr(_tmpl$, _$ssrHydrationKey()), { +const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/(() => { + var _v$ = _$ssrHydrationKey(); + return _$ssr(_tmpl$, _v$); +})(), { location: "example.jsx:3:15", signature: "4b145a58" }); @@ -123,15 +138,18 @@ if (module.hot) { `; exports[`standard (server, hydratable) > ExportDefaultDeclaration w/ FunctionExpression > should transform ExportDefaultDeclaration w/ FunctionExpression with valid Component name and params 2`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; -import { ssrHydrationKey as _$ssrHydrationKey } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; +import { ssrHydrationKey as _$ssrHydrationKey } from "@solidjs/web"; var _tmpl$ = ["Foo"]; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; const _REGISTRY = _$$registry(); -const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/_$ssr(_tmpl$, _$ssrHydrationKey()), { +const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/(() => { + var _v$ = _$ssrHydrationKey(); + return _$ssr(_tmpl$, _v$); +})(), { location: "example.jsx:3:15", signature: "4b145a58" }); @@ -148,16 +166,21 @@ if (module.hot) { `; exports[`standard (server, hydratable) > ExportDefaultDeclaration w/ FunctionExpression > should transform ExportDefaultDeclaration w/ FunctionExpression with valid Component name and params 3`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; -import { escape as _$escape } from "solid-js/web"; -import { ssrHydrationKey as _$ssrHydrationKey } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; +import { ssrRunInScope as _$ssrRunInScope } from "@solidjs/web"; +import { escape as _$escape } from "@solidjs/web"; +import { ssrHydrationKey as _$ssrHydrationKey } from "@solidjs/web"; var _tmpl$ = ["", ""]; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; const _REGISTRY = _$$registry(); -const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/_$ssr(_tmpl$, _$ssrHydrationKey(), _$escape(_props.v0)), { +const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/(() => { + var _v$ = _$ssrHydrationKey(), + _v$2 = _$ssrRunInScope(() => _$escape(_props.v0)); + return _$ssr(_tmpl$, _v$, _v$2); +})(), { location: "example.jsx:4:15", signature: "ae0f2a31" }); @@ -180,7 +203,7 @@ if (module.hot) { `; exports[`standard (server, hydratable) > ExportDefaultDeclaration w/ FunctionExpression > should transform ExportDefaultDeclaration w/ FunctionExpression with valid Component name and params 4`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; @@ -212,16 +235,19 @@ if (module.hot) { `; exports[`standard (server, hydratable) > ExportDefaultDeclaration w/ FunctionExpression > should transform ExportDefaultDeclaration w/ FunctionExpression with valid Component name and params 5`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; -import { ssrHydrationKey as _$ssrHydrationKey } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; +import { ssrHydrationKey as _$ssrHydrationKey } from "@solidjs/web"; var _tmpl$ = ["foo"], _tmpl$2 = ["bar"]; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; const _REGISTRY = _$$registry(); -const Foo_1_1 = _$$component(_REGISTRY, "Foo_1_1", _props3 => /*@refresh jsx-skip*/_$ssr(_tmpl$, _$ssrHydrationKey()), { +const Foo_1_1 = _$$component(_REGISTRY, "Foo_1_1", _props3 => /*@refresh jsx-skip*/(() => { + var _v$ = _$ssrHydrationKey(); + return _$ssr(_tmpl$, _v$); +})(), { location: "example.jsx:8:12", signature: "241c14a4" }); @@ -239,7 +265,10 @@ const Foo = _$$component(_REGISTRY, "Foo", function Foo() { location: "example.jsx:5:21", signature: "c963b907" }); -const Bar_1 = _$$component(_REGISTRY, "Bar_1", _props2 => /*@refresh jsx-skip*/_$ssr(_tmpl$2, _$ssrHydrationKey()), { +const Bar_1 = _$$component(_REGISTRY, "Bar_1", _props2 => /*@refresh jsx-skip*/(() => { + var _v$2 = _$ssrHydrationKey(); + return _$ssr(_tmpl$2, _v$2); +})(), { location: "example.jsx:3:15", signature: "fad4daa8" }); @@ -256,13 +285,16 @@ if (module.hot) { `; exports[`standard (server, hydratable) > ExportNamedDeclaration w/ FunctionExpression > should skip ExportNamedDeclaration w/ FunctionExpression with @refresh reload 1`] = ` -"import { ssr as _$ssr } from "solid-js/web"; -import { ssrHydrationKey as _$ssrHydrationKey } from "solid-js/web"; +"import { ssr as _$ssr } from "@solidjs/web"; +import { ssrHydrationKey as _$ssrHydrationKey } from "@solidjs/web"; var _tmpl$ = ["Foo"]; import { $$decline as _$$decline } from "solid-refresh"; // @refresh reload export function Foo() { - return _$ssr(_tmpl$, _$ssrHydrationKey()); + return (() => { + var _v$ = _$ssrHydrationKey(); + return _$ssr(_tmpl$, _v$); + })(); } if (module.hot) { _$$decline("standard", module.hot); @@ -270,25 +302,31 @@ if (module.hot) { `; exports[`standard (server, hydratable) > ExportNamedDeclaration w/ FunctionExpression > should skip ExportNamedDeclaration w/ FunctionExpression with @refresh skip 1`] = ` -"import { ssr as _$ssr } from "solid-js/web"; -import { ssrHydrationKey as _$ssrHydrationKey } from "solid-js/web"; +"import { ssr as _$ssr } from "@solidjs/web"; +import { ssrHydrationKey as _$ssrHydrationKey } from "@solidjs/web"; var _tmpl$ = ["Foo"]; // @refresh skip export function Foo() { - return _$ssr(_tmpl$, _$ssrHydrationKey()); + return (() => { + var _v$ = _$ssrHydrationKey(); + return _$ssr(_tmpl$, _v$); + })(); }" `; exports[`standard (server, hydratable) > ExportNamedDeclaration w/ FunctionExpression > should skip ExportNamedDeclaration w/ FunctionExpression with invalid Component name 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; -import { ssrHydrationKey as _$ssrHydrationKey } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; +import { ssrHydrationKey as _$ssrHydrationKey } from "@solidjs/web"; var _tmpl$ = ["Foo"]; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; const _REGISTRY = _$$registry(); -const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/_$ssr(_tmpl$, _$ssrHydrationKey()), { +const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/(() => { + var _v$ = _$ssrHydrationKey(); + return _$ssr(_tmpl$, _v$); +})(), { location: "example.jsx:3:15", signature: "4b145a58" }); @@ -305,15 +343,18 @@ if (module.hot) { `; exports[`standard (server, hydratable) > ExportNamedDeclaration w/ FunctionExpression > should skip ExportNamedDeclaration w/ FunctionExpression with valid Component name and >1 params 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; -import { ssrHydrationKey as _$ssrHydrationKey } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; +import { ssrHydrationKey as _$ssrHydrationKey } from "@solidjs/web"; var _tmpl$ = ["Foo"]; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; const _REGISTRY = _$$registry(); -const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/_$ssr(_tmpl$, _$ssrHydrationKey()), { +const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/(() => { + var _v$ = _$ssrHydrationKey(); + return _$ssr(_tmpl$, _v$); +})(), { location: "example.jsx:3:15", signature: "4b145a58" }); @@ -326,15 +367,18 @@ if (module.hot) { `; exports[`standard (server, hydratable) > ExportNamedDeclaration w/ FunctionExpression > should transform ExportNamedDeclaration w/ FunctionExpression with valid Component name and params 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; -import { ssrHydrationKey as _$ssrHydrationKey } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; +import { ssrHydrationKey as _$ssrHydrationKey } from "@solidjs/web"; var _tmpl$ = ["Foo"]; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; const _REGISTRY = _$$registry(); -const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/_$ssr(_tmpl$, _$ssrHydrationKey()), { +const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/(() => { + var _v$ = _$ssrHydrationKey(); + return _$ssr(_tmpl$, _v$); +})(), { location: "example.jsx:3:15", signature: "4b145a58" }); @@ -351,15 +395,18 @@ if (module.hot) { `; exports[`standard (server, hydratable) > ExportNamedDeclaration w/ FunctionExpression > should transform ExportNamedDeclaration w/ FunctionExpression with valid Component name and params 2`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; -import { ssrHydrationKey as _$ssrHydrationKey } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; +import { ssrHydrationKey as _$ssrHydrationKey } from "@solidjs/web"; var _tmpl$ = ["Foo"]; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; const _REGISTRY = _$$registry(); -const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/_$ssr(_tmpl$, _$ssrHydrationKey()), { +const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/(() => { + var _v$ = _$ssrHydrationKey(); + return _$ssr(_tmpl$, _v$); +})(), { location: "example.jsx:3:15", signature: "4b145a58" }); @@ -376,16 +423,21 @@ if (module.hot) { `; exports[`standard (server, hydratable) > ExportNamedDeclaration w/ FunctionExpression > should transform ExportNamedDeclaration w/ FunctionExpression with valid Component name and params 3`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; -import { escape as _$escape } from "solid-js/web"; -import { ssrHydrationKey as _$ssrHydrationKey } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; +import { ssrRunInScope as _$ssrRunInScope } from "@solidjs/web"; +import { escape as _$escape } from "@solidjs/web"; +import { ssrHydrationKey as _$ssrHydrationKey } from "@solidjs/web"; var _tmpl$ = ["", ""]; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; const _REGISTRY = _$$registry(); -const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/_$ssr(_tmpl$, _$ssrHydrationKey(), _$escape(_props.v0)), { +const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/(() => { + var _v$ = _$ssrHydrationKey(), + _v$2 = _$ssrRunInScope(() => _$escape(_props.v0)); + return _$ssr(_tmpl$, _v$, _v$2); +})(), { location: "example.jsx:4:15", signature: "ae0f2a31" }); @@ -408,7 +460,7 @@ if (module.hot) { `; exports[`standard (server, hydratable) > ExportNamedDeclaration w/ FunctionExpression > should transform ExportNamedDeclaration w/ FunctionExpression with valid Component name and params 4`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; @@ -440,16 +492,19 @@ if (module.hot) { `; exports[`standard (server, hydratable) > ExportNamedDeclaration w/ FunctionExpression > should transform ExportNamedDeclaration w/ FunctionExpression with valid Component name and params 5`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; -import { ssrHydrationKey as _$ssrHydrationKey } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; +import { ssrHydrationKey as _$ssrHydrationKey } from "@solidjs/web"; var _tmpl$ = ["foo"], _tmpl$2 = ["bar"]; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; const _REGISTRY = _$$registry(); -const Foo_1_1 = _$$component(_REGISTRY, "Foo_1_1", _props3 => /*@refresh jsx-skip*/_$ssr(_tmpl$, _$ssrHydrationKey()), { +const Foo_1_1 = _$$component(_REGISTRY, "Foo_1_1", _props3 => /*@refresh jsx-skip*/(() => { + var _v$ = _$ssrHydrationKey(); + return _$ssr(_tmpl$, _v$); +})(), { location: "example.jsx:8:12", signature: "241c14a4" }); @@ -476,7 +531,10 @@ const Foo = _$$component(_REGISTRY, "Foo", function Foo() { Bar }) }); -const Bar_1 = _$$component(_REGISTRY, "Bar_1", _props2 => /*@refresh jsx-skip*/_$ssr(_tmpl$2, _$ssrHydrationKey()), { +const Bar_1 = _$$component(_REGISTRY, "Bar_1", _props2 => /*@refresh jsx-skip*/(() => { + var _v$2 = _$ssrHydrationKey(); + return _$ssr(_tmpl$2, _v$2); +})(), { location: "example.jsx:3:15", signature: "fad4daa8" }); @@ -494,13 +552,16 @@ if (module.hot) { `; exports[`standard (server, hydratable) > FunctionDeclaration > should skip FunctionDeclaration with @refresh reload 1`] = ` -"import { ssr as _$ssr } from "solid-js/web"; -import { ssrHydrationKey as _$ssrHydrationKey } from "solid-js/web"; +"import { ssr as _$ssr } from "@solidjs/web"; +import { ssrHydrationKey as _$ssrHydrationKey } from "@solidjs/web"; var _tmpl$ = ["Foo"]; import { $$decline as _$$decline } from "solid-refresh"; // @refresh reload function Foo() { - return _$ssr(_tmpl$, _$ssrHydrationKey()); + return (() => { + var _v$ = _$ssrHydrationKey(); + return _$ssr(_tmpl$, _v$); + })(); } if (module.hot) { _$$decline("standard", module.hot); @@ -508,25 +569,31 @@ if (module.hot) { `; exports[`standard (server, hydratable) > FunctionDeclaration > should skip FunctionDeclaration with @refresh skip 1`] = ` -"import { ssr as _$ssr } from "solid-js/web"; -import { ssrHydrationKey as _$ssrHydrationKey } from "solid-js/web"; +"import { ssr as _$ssr } from "@solidjs/web"; +import { ssrHydrationKey as _$ssrHydrationKey } from "@solidjs/web"; var _tmpl$ = ["Foo"]; // @refresh skip function Foo() { - return _$ssr(_tmpl$, _$ssrHydrationKey()); + return (() => { + var _v$ = _$ssrHydrationKey(); + return _$ssr(_tmpl$, _v$); + })(); }" `; exports[`standard (server, hydratable) > FunctionDeclaration > should skip FunctionDeclaration with invalid Component name 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; -import { ssrHydrationKey as _$ssrHydrationKey } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; +import { ssrHydrationKey as _$ssrHydrationKey } from "@solidjs/web"; var _tmpl$ = ["Foo"]; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; const _REGISTRY = _$$registry(); -const JSX_foo_1 = _$$component(_REGISTRY, "JSX_foo_1", _props => /*@refresh jsx-skip*/_$ssr(_tmpl$, _$ssrHydrationKey()), { +const JSX_foo_1 = _$$component(_REGISTRY, "JSX_foo_1", _props => /*@refresh jsx-skip*/(() => { + var _v$ = _$ssrHydrationKey(); + return _$ssr(_tmpl$, _v$); +})(), { location: "example.jsx:3:15", signature: "4b145a58" }); @@ -539,15 +606,18 @@ if (module.hot) { `; exports[`standard (server, hydratable) > FunctionDeclaration > should skip FunctionDeclaration with valid Component name and >1 params 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; -import { ssrHydrationKey as _$ssrHydrationKey } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; +import { ssrHydrationKey as _$ssrHydrationKey } from "@solidjs/web"; var _tmpl$ = ["Foo"]; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; const _REGISTRY = _$$registry(); -const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/_$ssr(_tmpl$, _$ssrHydrationKey()), { +const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/(() => { + var _v$ = _$ssrHydrationKey(); + return _$ssr(_tmpl$, _v$); +})(), { location: "example.jsx:3:15", signature: "4b145a58" }); @@ -560,15 +630,18 @@ if (module.hot) { `; exports[`standard (server, hydratable) > FunctionDeclaration > should transform FunctionDeclaration with valid Component name and params 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; -import { ssrHydrationKey as _$ssrHydrationKey } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; +import { ssrHydrationKey as _$ssrHydrationKey } from "@solidjs/web"; var _tmpl$ = ["Foo"]; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; const _REGISTRY = _$$registry(); -const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/_$ssr(_tmpl$, _$ssrHydrationKey()), { +const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/(() => { + var _v$ = _$ssrHydrationKey(); + return _$ssr(_tmpl$, _v$); +})(), { location: "example.jsx:3:15", signature: "4b145a58" }); @@ -584,15 +657,18 @@ if (module.hot) { `; exports[`standard (server, hydratable) > FunctionDeclaration > should transform FunctionDeclaration with valid Component name and params 2`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; -import { ssrHydrationKey as _$ssrHydrationKey } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; +import { ssrHydrationKey as _$ssrHydrationKey } from "@solidjs/web"; var _tmpl$ = ["Foo"]; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; const _REGISTRY = _$$registry(); -const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/_$ssr(_tmpl$, _$ssrHydrationKey()), { +const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/(() => { + var _v$ = _$ssrHydrationKey(); + return _$ssr(_tmpl$, _v$); +})(), { location: "example.jsx:3:15", signature: "4b145a58" }); @@ -608,17 +684,22 @@ if (module.hot) { `; exports[`standard (server, hydratable) > FunctionDeclaration > should transform FunctionDeclaration with valid Component name and params 3`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; -import { escape as _$escape } from "solid-js/web"; -import { ssrHydrationKey as _$ssrHydrationKey } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; +import { ssrRunInScope as _$ssrRunInScope } from "@solidjs/web"; +import { escape as _$escape } from "@solidjs/web"; +import { ssrHydrationKey as _$ssrHydrationKey } from "@solidjs/web"; var _tmpl$ = ["", ""]; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; const example = 'Foo'; const _REGISTRY = _$$registry(); -const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/_$ssr(_tmpl$, _$ssrHydrationKey(), _$escape(_props.v0)), { +const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/(() => { + var _v$ = _$ssrHydrationKey(), + _v$2 = _$ssrRunInScope(() => _$escape(_props.v0)); + return _$ssr(_tmpl$, _v$, _v$2); +})(), { location: "example.jsx:4:15", signature: "ae0f2a31" }); @@ -639,7 +720,7 @@ if (module.hot) { `; exports[`standard (server, hydratable) > FunctionDeclaration > should transform FunctionDeclaration with valid Component name and params 4`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; @@ -670,16 +751,19 @@ if (module.hot) { `; exports[`standard (server, hydratable) > FunctionDeclaration > should transform FunctionDeclaration with valid Component name and params 5`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; -import { ssrHydrationKey as _$ssrHydrationKey } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; +import { ssrHydrationKey as _$ssrHydrationKey } from "@solidjs/web"; var _tmpl$ = ["bar"], _tmpl$2 = ["foo"]; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; const _REGISTRY = _$$registry(); -const Bar_1 = _$$component(_REGISTRY, "Bar_1", _props => /*@refresh jsx-skip*/_$ssr(_tmpl$, _$ssrHydrationKey()), { +const Bar_1 = _$$component(_REGISTRY, "Bar_1", _props => /*@refresh jsx-skip*/(() => { + var _v$ = _$ssrHydrationKey(); + return _$ssr(_tmpl$, _v$); +})(), { location: "example.jsx:3:15", signature: "61dd3182" }); @@ -689,7 +773,10 @@ const Bar = _$$component(_REGISTRY, "Bar", function Bar() { location: "example.jsx:2:6", signature: "e93ca257" }); -const Foo_1_1 = _$$component(_REGISTRY, "Foo_1_1", _props3 => /*@refresh jsx-skip*/_$ssr(_tmpl$2, _$ssrHydrationKey()), { +const Foo_1_1 = _$$component(_REGISTRY, "Foo_1_1", _props3 => /*@refresh jsx-skip*/(() => { + var _v$2 = _$ssrHydrationKey(); + return _$ssr(_tmpl$2, _v$2); +})(), { location: "example.jsx:8:12", signature: "241c14a4" }); @@ -713,13 +800,16 @@ if (module.hot) { `; exports[`standard (server, hydratable) > VariableDeclarator > ArrowFunctionExpression > should skip VariableDeclarator w/ ArrowFunctionExpression with @refresh reload 1`] = ` -"import { ssr as _$ssr } from "solid-js/web"; -import { ssrHydrationKey as _$ssrHydrationKey } from "solid-js/web"; +"import { ssr as _$ssr } from "@solidjs/web"; +import { ssrHydrationKey as _$ssrHydrationKey } from "@solidjs/web"; var _tmpl$ = ["Foo"]; import { $$decline as _$$decline } from "solid-refresh"; // @refresh reload const Foo = () => { - return _$ssr(_tmpl$, _$ssrHydrationKey()); + return (() => { + var _v$ = _$ssrHydrationKey(); + return _$ssr(_tmpl$, _v$); + })(); }; if (module.hot) { _$$decline("standard", module.hot); @@ -727,25 +817,31 @@ if (module.hot) { `; exports[`standard (server, hydratable) > VariableDeclarator > ArrowFunctionExpression > should skip VariableDeclarator w/ ArrowFunctionExpression with @refresh skip 1`] = ` -"import { ssr as _$ssr } from "solid-js/web"; -import { ssrHydrationKey as _$ssrHydrationKey } from "solid-js/web"; +"import { ssr as _$ssr } from "@solidjs/web"; +import { ssrHydrationKey as _$ssrHydrationKey } from "@solidjs/web"; var _tmpl$ = ["Foo"]; // @refresh skip const Foo = () => { - return _$ssr(_tmpl$, _$ssrHydrationKey()); + return (() => { + var _v$ = _$ssrHydrationKey(); + return _$ssr(_tmpl$, _v$); + })(); };" `; exports[`standard (server, hydratable) > VariableDeclarator > ArrowFunctionExpression > should skip VariableDeclarator w/ ArrowFunctionExpression with invalid Component name 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; -import { ssrHydrationKey as _$ssrHydrationKey } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; +import { ssrHydrationKey as _$ssrHydrationKey } from "@solidjs/web"; var _tmpl$ = ["Foo"]; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; const _REGISTRY = _$$registry(); -const JSX_foo_1 = _$$component(_REGISTRY, "JSX_foo_1", _props => /*@refresh jsx-skip*/_$ssr(_tmpl$, _$ssrHydrationKey()), { +const JSX_foo_1 = _$$component(_REGISTRY, "JSX_foo_1", _props => /*@refresh jsx-skip*/(() => { + var _v$ = _$ssrHydrationKey(); + return _$ssr(_tmpl$, _v$); +})(), { location: "example.jsx:3:17", signature: "4b145a58" }); @@ -758,15 +854,18 @@ if (module.hot) { `; exports[`standard (server, hydratable) > VariableDeclarator > ArrowFunctionExpression > should skip VariableDeclarator w/ ArrowFunctionExpression with valid Component name and >1 params 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; -import { ssrHydrationKey as _$ssrHydrationKey } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; +import { ssrHydrationKey as _$ssrHydrationKey } from "@solidjs/web"; var _tmpl$ = ["Foo"]; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; const _REGISTRY = _$$registry(); -const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/_$ssr(_tmpl$, _$ssrHydrationKey()), { +const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/(() => { + var _v$ = _$ssrHydrationKey(); + return _$ssr(_tmpl$, _v$); +})(), { location: "example.jsx:3:17", signature: "4b145a58" }); @@ -779,15 +878,18 @@ if (module.hot) { `; exports[`standard (server, hydratable) > VariableDeclarator > ArrowFunctionExpression > should transform VariableDeclarator w/ ArrowFunctionExpression with valid Component name and params 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; -import { ssrHydrationKey as _$ssrHydrationKey } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; +import { ssrHydrationKey as _$ssrHydrationKey } from "@solidjs/web"; var _tmpl$ = ["Foo"]; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; const _REGISTRY = _$$registry(); -const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/_$ssr(_tmpl$, _$ssrHydrationKey()), { +const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/(() => { + var _v$ = _$ssrHydrationKey(); + return _$ssr(_tmpl$, _v$); +})(), { location: "example.jsx:3:17", signature: "4b145a58" }); @@ -803,15 +905,18 @@ if (module.hot) { `; exports[`standard (server, hydratable) > VariableDeclarator > ArrowFunctionExpression > should transform VariableDeclarator w/ ArrowFunctionExpression with valid Component name and params 2`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; -import { ssrHydrationKey as _$ssrHydrationKey } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; +import { ssrHydrationKey as _$ssrHydrationKey } from "@solidjs/web"; var _tmpl$ = ["Foo"]; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; const _REGISTRY = _$$registry(); -const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/_$ssr(_tmpl$, _$ssrHydrationKey()), { +const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/(() => { + var _v$ = _$ssrHydrationKey(); + return _$ssr(_tmpl$, _v$); +})(), { location: "example.jsx:3:17", signature: "4b145a58" }); @@ -827,17 +932,22 @@ if (module.hot) { `; exports[`standard (server, hydratable) > VariableDeclarator > ArrowFunctionExpression > should transform VariableDeclarator w/ ArrowFunctionExpression with valid Component name and params 3`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; -import { escape as _$escape } from "solid-js/web"; -import { ssrHydrationKey as _$ssrHydrationKey } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; +import { ssrRunInScope as _$ssrRunInScope } from "@solidjs/web"; +import { escape as _$escape } from "@solidjs/web"; +import { ssrHydrationKey as _$ssrHydrationKey } from "@solidjs/web"; var _tmpl$ = ["", ""]; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; const example = 'Foo'; const _REGISTRY = _$$registry(); -const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/_$ssr(_tmpl$, _$ssrHydrationKey(), _$escape(_props.v0)), { +const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/(() => { + var _v$ = _$ssrHydrationKey(), + _v$2 = _$ssrRunInScope(() => _$escape(_props.v0)); + return _$ssr(_tmpl$, _v$, _v$2); +})(), { location: "example.jsx:4:17", signature: "ae0f2a31" }); @@ -858,7 +968,7 @@ if (module.hot) { `; exports[`standard (server, hydratable) > VariableDeclarator > ArrowFunctionExpression > should transform VariableDeclarator w/ ArrowFunctionExpression with valid Component name and params 4`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; @@ -889,16 +999,19 @@ if (module.hot) { `; exports[`standard (server, hydratable) > VariableDeclarator > ArrowFunctionExpression > should transform VariableDeclarator w/ ArrowFunctionExpression with valid Component name and params 5`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; -import { ssrHydrationKey as _$ssrHydrationKey } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; +import { ssrHydrationKey as _$ssrHydrationKey } from "@solidjs/web"; var _tmpl$ = ["bar"], _tmpl$2 = ["foo"]; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; const _REGISTRY = _$$registry(); -const Bar_1 = _$$component(_REGISTRY, "Bar_1", _props => /*@refresh jsx-skip*/_$ssr(_tmpl$, _$ssrHydrationKey()), { +const Bar_1 = _$$component(_REGISTRY, "Bar_1", _props => /*@refresh jsx-skip*/(() => { + var _v$ = _$ssrHydrationKey(); + return _$ssr(_tmpl$, _v$); +})(), { location: "example.jsx:3:17", signature: "61dd3182" }); @@ -908,7 +1021,10 @@ const Bar = _$$component(_REGISTRY, "Bar", () => { location: "example.jsx:2:20", signature: "d1c6ca9b" }); -const Foo_1_1 = _$$component(_REGISTRY, "Foo_1_1", _props3 => /*@refresh jsx-skip*/_$ssr(_tmpl$2, _$ssrHydrationKey()), { +const Foo_1_1 = _$$component(_REGISTRY, "Foo_1_1", _props3 => /*@refresh jsx-skip*/(() => { + var _v$2 = _$ssrHydrationKey(); + return _$ssr(_tmpl$2, _v$2); +})(), { location: "example.jsx:8:14", signature: "241c14a4" }); @@ -932,13 +1048,16 @@ if (module.hot) { `; exports[`standard (server, hydratable) > VariableDeclarator > FunctionExpression > should skip VariableDeclarator w/ FunctionExpression with @refresh reload 1`] = ` -"import { ssr as _$ssr } from "solid-js/web"; -import { ssrHydrationKey as _$ssrHydrationKey } from "solid-js/web"; +"import { ssr as _$ssr } from "@solidjs/web"; +import { ssrHydrationKey as _$ssrHydrationKey } from "@solidjs/web"; var _tmpl$ = ["Foo"]; import { $$decline as _$$decline } from "solid-refresh"; // @refresh reload const Foo = function () { - return _$ssr(_tmpl$, _$ssrHydrationKey()); + return (() => { + var _v$ = _$ssrHydrationKey(); + return _$ssr(_tmpl$, _v$); + })(); }; if (module.hot) { _$$decline("standard", module.hot); @@ -946,25 +1065,31 @@ if (module.hot) { `; exports[`standard (server, hydratable) > VariableDeclarator > FunctionExpression > should skip VariableDeclarator w/ FunctionExpression with @refresh skip 1`] = ` -"import { ssr as _$ssr } from "solid-js/web"; -import { ssrHydrationKey as _$ssrHydrationKey } from "solid-js/web"; +"import { ssr as _$ssr } from "@solidjs/web"; +import { ssrHydrationKey as _$ssrHydrationKey } from "@solidjs/web"; var _tmpl$ = ["Foo"]; // @refresh skip const Foo = function () { - return _$ssr(_tmpl$, _$ssrHydrationKey()); + return (() => { + var _v$ = _$ssrHydrationKey(); + return _$ssr(_tmpl$, _v$); + })(); };" `; exports[`standard (server, hydratable) > VariableDeclarator > FunctionExpression > should skip VariableDeclarator w/ FunctionExpression with invalid Component name 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; -import { ssrHydrationKey as _$ssrHydrationKey } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; +import { ssrHydrationKey as _$ssrHydrationKey } from "@solidjs/web"; var _tmpl$ = ["Foo"]; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; const _REGISTRY = _$$registry(); -const JSX_foo_1 = _$$component(_REGISTRY, "JSX_foo_1", _props => /*@refresh jsx-skip*/_$ssr(_tmpl$, _$ssrHydrationKey()), { +const JSX_foo_1 = _$$component(_REGISTRY, "JSX_foo_1", _props => /*@refresh jsx-skip*/(() => { + var _v$ = _$ssrHydrationKey(); + return _$ssr(_tmpl$, _v$); +})(), { location: "example.jsx:3:17", signature: "4b145a58" }); @@ -977,15 +1102,18 @@ if (module.hot) { `; exports[`standard (server, hydratable) > VariableDeclarator > FunctionExpression > should skip VariableDeclarator w/ FunctionExpression with valid Component name and >1 params 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; -import { ssrHydrationKey as _$ssrHydrationKey } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; +import { ssrHydrationKey as _$ssrHydrationKey } from "@solidjs/web"; var _tmpl$ = ["Foo"]; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; const _REGISTRY = _$$registry(); -const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/_$ssr(_tmpl$, _$ssrHydrationKey()), { +const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/(() => { + var _v$ = _$ssrHydrationKey(); + return _$ssr(_tmpl$, _v$); +})(), { location: "example.jsx:3:17", signature: "4b145a58" }); @@ -998,15 +1126,18 @@ if (module.hot) { `; exports[`standard (server, hydratable) > VariableDeclarator > FunctionExpression > should transform VariableDeclarator w/ FunctionExpression with valid Component name and params 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; -import { ssrHydrationKey as _$ssrHydrationKey } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; +import { ssrHydrationKey as _$ssrHydrationKey } from "@solidjs/web"; var _tmpl$ = ["Foo"]; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; const _REGISTRY = _$$registry(); -const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/_$ssr(_tmpl$, _$ssrHydrationKey()), { +const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/(() => { + var _v$ = _$ssrHydrationKey(); + return _$ssr(_tmpl$, _v$); +})(), { location: "example.jsx:3:17", signature: "4b145a58" }); @@ -1022,15 +1153,18 @@ if (module.hot) { `; exports[`standard (server, hydratable) > VariableDeclarator > FunctionExpression > should transform VariableDeclarator w/ FunctionExpression with valid Component name and params 2`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; -import { ssrHydrationKey as _$ssrHydrationKey } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; +import { ssrHydrationKey as _$ssrHydrationKey } from "@solidjs/web"; var _tmpl$ = ["Foo"]; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; const _REGISTRY = _$$registry(); -const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/_$ssr(_tmpl$, _$ssrHydrationKey()), { +const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/(() => { + var _v$ = _$ssrHydrationKey(); + return _$ssr(_tmpl$, _v$); +})(), { location: "example.jsx:3:17", signature: "4b145a58" }); @@ -1046,17 +1180,22 @@ if (module.hot) { `; exports[`standard (server, hydratable) > VariableDeclarator > FunctionExpression > should transform VariableDeclarator w/ FunctionExpression with valid Component name and params 3`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; -import { escape as _$escape } from "solid-js/web"; -import { ssrHydrationKey as _$ssrHydrationKey } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; +import { ssrRunInScope as _$ssrRunInScope } from "@solidjs/web"; +import { escape as _$escape } from "@solidjs/web"; +import { ssrHydrationKey as _$ssrHydrationKey } from "@solidjs/web"; var _tmpl$ = ["", ""]; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; const example = 'Foo'; const _REGISTRY = _$$registry(); -const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/_$ssr(_tmpl$, _$ssrHydrationKey(), _$escape(_props.v0)), { +const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/(() => { + var _v$ = _$ssrHydrationKey(), + _v$2 = _$ssrRunInScope(() => _$escape(_props.v0)); + return _$ssr(_tmpl$, _v$, _v$2); +})(), { location: "example.jsx:4:17", signature: "ae0f2a31" }); @@ -1077,7 +1216,7 @@ if (module.hot) { `; exports[`standard (server, hydratable) > VariableDeclarator > FunctionExpression > should transform VariableDeclarator w/ FunctionExpression with valid Component name and params 4`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; @@ -1108,16 +1247,19 @@ if (module.hot) { `; exports[`standard (server, hydratable) > VariableDeclarator > FunctionExpression > should transform VariableDeclarator w/ FunctionExpression with valid Component name and params 5`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; -import { ssrHydrationKey as _$ssrHydrationKey } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; +import { ssrHydrationKey as _$ssrHydrationKey } from "@solidjs/web"; var _tmpl$ = ["bar"], _tmpl$2 = ["foo"]; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; const _REGISTRY = _$$registry(); -const Bar_1 = _$$component(_REGISTRY, "Bar_1", _props => /*@refresh jsx-skip*/_$ssr(_tmpl$, _$ssrHydrationKey()), { +const Bar_1 = _$$component(_REGISTRY, "Bar_1", _props => /*@refresh jsx-skip*/(() => { + var _v$ = _$ssrHydrationKey(); + return _$ssr(_tmpl$, _v$); +})(), { location: "example.jsx:3:17", signature: "61dd3182" }); @@ -1127,7 +1269,10 @@ const Bar = _$$component(_REGISTRY, "Bar", function () { location: "example.jsx:2:20", signature: "1fb34faa" }); -const Foo_1_1 = _$$component(_REGISTRY, "Foo_1_1", _props3 => /*@refresh jsx-skip*/_$ssr(_tmpl$2, _$ssrHydrationKey()), { +const Foo_1_1 = _$$component(_REGISTRY, "Foo_1_1", _props3 => /*@refresh jsx-skip*/(() => { + var _v$2 = _$ssrHydrationKey(); + return _$ssr(_tmpl$2, _v$2); +})(), { location: "example.jsx:8:14", signature: "241c14a4" }); @@ -1151,15 +1296,19 @@ if (module.hot) { `; exports[`standard (server, hydratable) > fix build > refs > should work with a function 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; -import { ssrHydrationKey as _$ssrHydrationKey } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; +import { ssrHydrationKey as _$ssrHydrationKey } from "@solidjs/web"; var _tmpl$ = ["Comp"]; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; const _REGISTRY = _$$registry(); -const Comp_1 = _$$component(_REGISTRY, "Comp_1", _props => /*@refresh jsx-skip*/_$ssr(_tmpl$, _$ssrHydrationKey()), { +const Comp_1 = _$$component(_REGISTRY, "Comp_1", _props => /*@refresh jsx-skip*/(() => { + var _v$ = _$ssrHydrationKey(), + _ref$ = _props.v0; + return _$ssr(_tmpl$, _v$); +})(), { location: "example.jsx:4:19", signature: "6f76290" }); @@ -1178,15 +1327,19 @@ if (module.hot) { `; exports[`standard (server, hydratable) > fix build > refs > should work with a mutable variable 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; -import { ssrHydrationKey as _$ssrHydrationKey } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; +import { ssrHydrationKey as _$ssrHydrationKey } from "@solidjs/web"; var _tmpl$ = ["Comp"]; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; const _REGISTRY = _$$registry(); -const Comp_1 = _$$component(_REGISTRY, "Comp_1", _props => /*@refresh jsx-skip*/_$ssr(_tmpl$, _$ssrHydrationKey()), { +const Comp_1 = _$$component(_REGISTRY, "Comp_1", _props => /*@refresh jsx-skip*/(() => { + var _v$ = _$ssrHydrationKey(), + _ref$ = _props.v0; + return _$ssr(_tmpl$, _v$); +})(), { location: "example.jsx:4:19", signature: "6f76290" }); @@ -1211,16 +1364,20 @@ if (module.hot) { `; exports[`standard (server, hydratable) > fix build > signals as refs > should work 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; -import { ssrHydrationKey as _$ssrHydrationKey } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; +import { ssrHydrationKey as _$ssrHydrationKey } from "@solidjs/web"; var _tmpl$ = ["Comp"]; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; import { createSignal } from 'solid-js'; const _REGISTRY = _$$registry(); -const Comp_1 = _$$component(_REGISTRY, "Comp_1", _props => /*@refresh jsx-skip*/_$ssr(_tmpl$, _$ssrHydrationKey()), { +const Comp_1 = _$$component(_REGISTRY, "Comp_1", _props => /*@refresh jsx-skip*/(() => { + var _v$ = _$ssrHydrationKey(), + _ref$ = _props.v0; + return _$ssr(_tmpl$, _v$); +})(), { location: "example.jsx:6:19", signature: "6f76290" }); @@ -1246,7 +1403,7 @@ if (module.hot) { `; exports[`standard (server, hydratable) > fix render > @refresh reload > should work 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; import { $$decline as _$$decline } from "solid-refresh"; // @refresh reload import { render } from 'solid-js/web'; @@ -1260,7 +1417,7 @@ if (module.hot) { `; exports[`standard (server, hydratable) > fix render > import specifiers > should work with ImportNamespaceSpecifier 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; @@ -1280,7 +1437,7 @@ if (module.hot) { `; exports[`standard (server, hydratable) > fix render > import specifiers > should work with ImportSpecifier + Identifier 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; @@ -1300,7 +1457,7 @@ if (module.hot) { `; exports[`standard (server, hydratable) > fix render > import specifiers > should work with ImportSpecifier + aliased Identifier 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; @@ -1320,7 +1477,7 @@ if (module.hot) { `; exports[`standard (server, hydratable) > fix render > import specifiers > should work with ImportSpecifier + aliased Identifier from StringLiteral 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; @@ -1340,7 +1497,7 @@ if (module.hot) { `; exports[`standard (server, hydratable) > fix render > top-level statements > should work with IfStatement 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; diff --git a/tests/server-hydratable/__snapshots__/vite.test.ts.snap b/tests/server-hydratable/__snapshots__/vite.test.ts.snap index 3720512..cc49b83 100644 --- a/tests/server-hydratable/__snapshots__/vite.test.ts.snap +++ b/tests/server-hydratable/__snapshots__/vite.test.ts.snap @@ -8,36 +8,39 @@ if (someCond) { `; exports[`vite (server, hydratable) > Context API > should support ExportNamedDeclaration 1`] = ` -"import { $$context as _$$context } from "solid-refresh"; +"import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; import { createContext } from 'solid-js'; const _REGISTRY = _$$registry(); -export const Example = _$$context(_REGISTRY, "Example", createContext()); +export const Example = _$$component(_REGISTRY, "Example", createContext()); if (import.meta.hot) { _$$refresh("vite", import.meta.hot, _REGISTRY); }" `; exports[`vite (server, hydratable) > Context API > should support top-level VariableDeclaration 1`] = ` -"import { $$context as _$$context } from "solid-refresh"; +"import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; import { createContext } from 'solid-js'; const _REGISTRY = _$$registry(); -const Example = _$$context(_REGISTRY, "Example", createContext()); +const Example = _$$component(_REGISTRY, "Example", createContext()); if (import.meta.hot) { _$$refresh("vite", import.meta.hot, _REGISTRY); }" `; exports[`vite (server, hydratable) > ExportDefaultDeclaration w/ FunctionExpression > should skip ExportDefaultDeclaration w/ FunctionExpression with @refresh reload 1`] = ` -"import { ssr as _$ssr } from "solid-js/web"; -import { ssrHydrationKey as _$ssrHydrationKey } from "solid-js/web"; +"import { ssr as _$ssr } from "@solidjs/web"; +import { ssrHydrationKey as _$ssrHydrationKey } from "@solidjs/web"; var _tmpl$ = ["Foo"]; // @refresh reload export default function Foo() { - return _$ssr(_tmpl$, _$ssrHydrationKey()); + return (() => { + var _v$ = _$ssrHydrationKey(); + return _$ssr(_tmpl$, _v$); + })(); } if (import.meta.hot) { import.meta.hot.accept(() => import.meta.hot.invalidate()); @@ -45,25 +48,31 @@ if (import.meta.hot) { `; exports[`vite (server, hydratable) > ExportDefaultDeclaration w/ FunctionExpression > should skip ExportDefaultDeclaration w/ FunctionExpression with @refresh skip 1`] = ` -"import { ssr as _$ssr } from "solid-js/web"; -import { ssrHydrationKey as _$ssrHydrationKey } from "solid-js/web"; +"import { ssr as _$ssr } from "@solidjs/web"; +import { ssrHydrationKey as _$ssrHydrationKey } from "@solidjs/web"; var _tmpl$ = ["Foo"]; // @refresh skip export default function Foo() { - return _$ssr(_tmpl$, _$ssrHydrationKey()); + return (() => { + var _v$ = _$ssrHydrationKey(); + return _$ssr(_tmpl$, _v$); + })(); }" `; exports[`vite (server, hydratable) > ExportDefaultDeclaration w/ FunctionExpression > should skip ExportDefaultDeclaration w/ FunctionExpression with invalid Component name 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; -import { ssrHydrationKey as _$ssrHydrationKey } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; +import { ssrHydrationKey as _$ssrHydrationKey } from "@solidjs/web"; var _tmpl$ = ["Foo"]; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; const _REGISTRY = _$$registry(); -const JSX_foo_1 = _$$component(_REGISTRY, "JSX_foo_1", _props => /*@refresh jsx-skip*/_$ssr(_tmpl$, _$ssrHydrationKey()), { +const JSX_foo_1 = _$$component(_REGISTRY, "JSX_foo_1", _props => /*@refresh jsx-skip*/(() => { + var _v$ = _$ssrHydrationKey(); + return _$ssr(_tmpl$, _v$); +})(), { location: "example.jsx:3:15", signature: "4b145a58" }); @@ -76,15 +85,18 @@ if (import.meta.hot) { `; exports[`vite (server, hydratable) > ExportDefaultDeclaration w/ FunctionExpression > should skip ExportDefaultDeclaration w/ FunctionExpression with valid Component name and >1 params 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; -import { ssrHydrationKey as _$ssrHydrationKey } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; +import { ssrHydrationKey as _$ssrHydrationKey } from "@solidjs/web"; var _tmpl$ = ["Foo"]; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; const _REGISTRY = _$$registry(); -const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/_$ssr(_tmpl$, _$ssrHydrationKey()), { +const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/(() => { + var _v$ = _$ssrHydrationKey(); + return _$ssr(_tmpl$, _v$); +})(), { location: "example.jsx:3:15", signature: "4b145a58" }); @@ -97,15 +109,18 @@ if (import.meta.hot) { `; exports[`vite (server, hydratable) > ExportDefaultDeclaration w/ FunctionExpression > should transform ExportDefaultDeclaration w/ FunctionExpression with valid Component name and params 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; -import { ssrHydrationKey as _$ssrHydrationKey } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; +import { ssrHydrationKey as _$ssrHydrationKey } from "@solidjs/web"; var _tmpl$ = ["Foo"]; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; const _REGISTRY = _$$registry(); -const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/_$ssr(_tmpl$, _$ssrHydrationKey()), { +const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/(() => { + var _v$ = _$ssrHydrationKey(); + return _$ssr(_tmpl$, _v$); +})(), { location: "example.jsx:3:15", signature: "4b145a58" }); @@ -122,15 +137,18 @@ if (import.meta.hot) { `; exports[`vite (server, hydratable) > ExportDefaultDeclaration w/ FunctionExpression > should transform ExportDefaultDeclaration w/ FunctionExpression with valid Component name and params 2`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; -import { ssrHydrationKey as _$ssrHydrationKey } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; +import { ssrHydrationKey as _$ssrHydrationKey } from "@solidjs/web"; var _tmpl$ = ["Foo"]; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; const _REGISTRY = _$$registry(); -const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/_$ssr(_tmpl$, _$ssrHydrationKey()), { +const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/(() => { + var _v$ = _$ssrHydrationKey(); + return _$ssr(_tmpl$, _v$); +})(), { location: "example.jsx:3:15", signature: "4b145a58" }); @@ -147,16 +165,21 @@ if (import.meta.hot) { `; exports[`vite (server, hydratable) > ExportDefaultDeclaration w/ FunctionExpression > should transform ExportDefaultDeclaration w/ FunctionExpression with valid Component name and params 3`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; -import { escape as _$escape } from "solid-js/web"; -import { ssrHydrationKey as _$ssrHydrationKey } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; +import { ssrRunInScope as _$ssrRunInScope } from "@solidjs/web"; +import { escape as _$escape } from "@solidjs/web"; +import { ssrHydrationKey as _$ssrHydrationKey } from "@solidjs/web"; var _tmpl$ = ["", ""]; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; const _REGISTRY = _$$registry(); -const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/_$ssr(_tmpl$, _$ssrHydrationKey(), _$escape(_props.v0)), { +const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/(() => { + var _v$ = _$ssrHydrationKey(), + _v$2 = _$ssrRunInScope(() => _$escape(_props.v0)); + return _$ssr(_tmpl$, _v$, _v$2); +})(), { location: "example.jsx:4:15", signature: "ae0f2a31" }); @@ -179,7 +202,7 @@ if (import.meta.hot) { `; exports[`vite (server, hydratable) > ExportDefaultDeclaration w/ FunctionExpression > should transform ExportDefaultDeclaration w/ FunctionExpression with valid Component name and params 4`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; @@ -211,16 +234,19 @@ if (import.meta.hot) { `; exports[`vite (server, hydratable) > ExportDefaultDeclaration w/ FunctionExpression > should transform ExportDefaultDeclaration w/ FunctionExpression with valid Component name and params 5`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; -import { ssrHydrationKey as _$ssrHydrationKey } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; +import { ssrHydrationKey as _$ssrHydrationKey } from "@solidjs/web"; var _tmpl$ = ["foo"], _tmpl$2 = ["bar"]; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; const _REGISTRY = _$$registry(); -const Foo_1_1 = _$$component(_REGISTRY, "Foo_1_1", _props3 => /*@refresh jsx-skip*/_$ssr(_tmpl$, _$ssrHydrationKey()), { +const Foo_1_1 = _$$component(_REGISTRY, "Foo_1_1", _props3 => /*@refresh jsx-skip*/(() => { + var _v$ = _$ssrHydrationKey(); + return _$ssr(_tmpl$, _v$); +})(), { location: "example.jsx:8:12", signature: "241c14a4" }); @@ -238,7 +264,10 @@ const Foo = _$$component(_REGISTRY, "Foo", function Foo() { location: "example.jsx:5:21", signature: "c963b907" }); -const Bar_1 = _$$component(_REGISTRY, "Bar_1", _props2 => /*@refresh jsx-skip*/_$ssr(_tmpl$2, _$ssrHydrationKey()), { +const Bar_1 = _$$component(_REGISTRY, "Bar_1", _props2 => /*@refresh jsx-skip*/(() => { + var _v$2 = _$ssrHydrationKey(); + return _$ssr(_tmpl$2, _v$2); +})(), { location: "example.jsx:3:15", signature: "fad4daa8" }); @@ -255,12 +284,15 @@ if (import.meta.hot) { `; exports[`vite (server, hydratable) > ExportNamedDeclaration w/ FunctionExpression > should skip ExportNamedDeclaration w/ FunctionExpression with @refresh reload 1`] = ` -"import { ssr as _$ssr } from "solid-js/web"; -import { ssrHydrationKey as _$ssrHydrationKey } from "solid-js/web"; +"import { ssr as _$ssr } from "@solidjs/web"; +import { ssrHydrationKey as _$ssrHydrationKey } from "@solidjs/web"; var _tmpl$ = ["Foo"]; // @refresh reload export function Foo() { - return _$ssr(_tmpl$, _$ssrHydrationKey()); + return (() => { + var _v$ = _$ssrHydrationKey(); + return _$ssr(_tmpl$, _v$); + })(); } if (import.meta.hot) { import.meta.hot.accept(() => import.meta.hot.invalidate()); @@ -268,25 +300,31 @@ if (import.meta.hot) { `; exports[`vite (server, hydratable) > ExportNamedDeclaration w/ FunctionExpression > should skip ExportNamedDeclaration w/ FunctionExpression with @refresh skip 1`] = ` -"import { ssr as _$ssr } from "solid-js/web"; -import { ssrHydrationKey as _$ssrHydrationKey } from "solid-js/web"; +"import { ssr as _$ssr } from "@solidjs/web"; +import { ssrHydrationKey as _$ssrHydrationKey } from "@solidjs/web"; var _tmpl$ = ["Foo"]; // @refresh skip export function Foo() { - return _$ssr(_tmpl$, _$ssrHydrationKey()); + return (() => { + var _v$ = _$ssrHydrationKey(); + return _$ssr(_tmpl$, _v$); + })(); }" `; exports[`vite (server, hydratable) > ExportNamedDeclaration w/ FunctionExpression > should skip ExportNamedDeclaration w/ FunctionExpression with invalid Component name 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; -import { ssrHydrationKey as _$ssrHydrationKey } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; +import { ssrHydrationKey as _$ssrHydrationKey } from "@solidjs/web"; var _tmpl$ = ["Foo"]; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; const _REGISTRY = _$$registry(); -const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/_$ssr(_tmpl$, _$ssrHydrationKey()), { +const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/(() => { + var _v$ = _$ssrHydrationKey(); + return _$ssr(_tmpl$, _v$); +})(), { location: "example.jsx:3:15", signature: "4b145a58" }); @@ -303,15 +341,18 @@ if (import.meta.hot) { `; exports[`vite (server, hydratable) > ExportNamedDeclaration w/ FunctionExpression > should skip ExportNamedDeclaration w/ FunctionExpression with valid Component name and >1 params 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; -import { ssrHydrationKey as _$ssrHydrationKey } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; +import { ssrHydrationKey as _$ssrHydrationKey } from "@solidjs/web"; var _tmpl$ = ["Foo"]; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; const _REGISTRY = _$$registry(); -const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/_$ssr(_tmpl$, _$ssrHydrationKey()), { +const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/(() => { + var _v$ = _$ssrHydrationKey(); + return _$ssr(_tmpl$, _v$); +})(), { location: "example.jsx:3:15", signature: "4b145a58" }); @@ -324,15 +365,18 @@ if (import.meta.hot) { `; exports[`vite (server, hydratable) > ExportNamedDeclaration w/ FunctionExpression > should transform ExportNamedDeclaration w/ FunctionExpression with valid Component name and params 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; -import { ssrHydrationKey as _$ssrHydrationKey } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; +import { ssrHydrationKey as _$ssrHydrationKey } from "@solidjs/web"; var _tmpl$ = ["Foo"]; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; const _REGISTRY = _$$registry(); -const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/_$ssr(_tmpl$, _$ssrHydrationKey()), { +const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/(() => { + var _v$ = _$ssrHydrationKey(); + return _$ssr(_tmpl$, _v$); +})(), { location: "example.jsx:3:15", signature: "4b145a58" }); @@ -349,15 +393,18 @@ if (import.meta.hot) { `; exports[`vite (server, hydratable) > ExportNamedDeclaration w/ FunctionExpression > should transform ExportNamedDeclaration w/ FunctionExpression with valid Component name and params 2`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; -import { ssrHydrationKey as _$ssrHydrationKey } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; +import { ssrHydrationKey as _$ssrHydrationKey } from "@solidjs/web"; var _tmpl$ = ["Foo"]; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; const _REGISTRY = _$$registry(); -const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/_$ssr(_tmpl$, _$ssrHydrationKey()), { +const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/(() => { + var _v$ = _$ssrHydrationKey(); + return _$ssr(_tmpl$, _v$); +})(), { location: "example.jsx:3:15", signature: "4b145a58" }); @@ -374,16 +421,21 @@ if (import.meta.hot) { `; exports[`vite (server, hydratable) > ExportNamedDeclaration w/ FunctionExpression > should transform ExportNamedDeclaration w/ FunctionExpression with valid Component name and params 3`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; -import { escape as _$escape } from "solid-js/web"; -import { ssrHydrationKey as _$ssrHydrationKey } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; +import { ssrRunInScope as _$ssrRunInScope } from "@solidjs/web"; +import { escape as _$escape } from "@solidjs/web"; +import { ssrHydrationKey as _$ssrHydrationKey } from "@solidjs/web"; var _tmpl$ = ["", ""]; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; const _REGISTRY = _$$registry(); -const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/_$ssr(_tmpl$, _$ssrHydrationKey(), _$escape(_props.v0)), { +const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/(() => { + var _v$ = _$ssrHydrationKey(), + _v$2 = _$ssrRunInScope(() => _$escape(_props.v0)); + return _$ssr(_tmpl$, _v$, _v$2); +})(), { location: "example.jsx:4:15", signature: "ae0f2a31" }); @@ -406,7 +458,7 @@ if (import.meta.hot) { `; exports[`vite (server, hydratable) > ExportNamedDeclaration w/ FunctionExpression > should transform ExportNamedDeclaration w/ FunctionExpression with valid Component name and params 4`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; @@ -438,16 +490,19 @@ if (import.meta.hot) { `; exports[`vite (server, hydratable) > ExportNamedDeclaration w/ FunctionExpression > should transform ExportNamedDeclaration w/ FunctionExpression with valid Component name and params 5`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; -import { ssrHydrationKey as _$ssrHydrationKey } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; +import { ssrHydrationKey as _$ssrHydrationKey } from "@solidjs/web"; var _tmpl$ = ["foo"], _tmpl$2 = ["bar"]; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; const _REGISTRY = _$$registry(); -const Foo_1_1 = _$$component(_REGISTRY, "Foo_1_1", _props3 => /*@refresh jsx-skip*/_$ssr(_tmpl$, _$ssrHydrationKey()), { +const Foo_1_1 = _$$component(_REGISTRY, "Foo_1_1", _props3 => /*@refresh jsx-skip*/(() => { + var _v$ = _$ssrHydrationKey(); + return _$ssr(_tmpl$, _v$); +})(), { location: "example.jsx:8:12", signature: "241c14a4" }); @@ -474,7 +529,10 @@ const Foo = _$$component(_REGISTRY, "Foo", function Foo() { Bar }) }); -const Bar_1 = _$$component(_REGISTRY, "Bar_1", _props2 => /*@refresh jsx-skip*/_$ssr(_tmpl$2, _$ssrHydrationKey()), { +const Bar_1 = _$$component(_REGISTRY, "Bar_1", _props2 => /*@refresh jsx-skip*/(() => { + var _v$2 = _$ssrHydrationKey(); + return _$ssr(_tmpl$2, _v$2); +})(), { location: "example.jsx:3:15", signature: "fad4daa8" }); @@ -492,12 +550,15 @@ if (import.meta.hot) { `; exports[`vite (server, hydratable) > FunctionDeclaration > should skip FunctionDeclaration with @refresh reload 1`] = ` -"import { ssr as _$ssr } from "solid-js/web"; -import { ssrHydrationKey as _$ssrHydrationKey } from "solid-js/web"; +"import { ssr as _$ssr } from "@solidjs/web"; +import { ssrHydrationKey as _$ssrHydrationKey } from "@solidjs/web"; var _tmpl$ = ["Foo"]; // @refresh reload function Foo() { - return _$ssr(_tmpl$, _$ssrHydrationKey()); + return (() => { + var _v$ = _$ssrHydrationKey(); + return _$ssr(_tmpl$, _v$); + })(); } if (import.meta.hot) { import.meta.hot.accept(() => import.meta.hot.invalidate()); @@ -505,25 +566,31 @@ if (import.meta.hot) { `; exports[`vite (server, hydratable) > FunctionDeclaration > should skip FunctionDeclaration with @refresh skip 1`] = ` -"import { ssr as _$ssr } from "solid-js/web"; -import { ssrHydrationKey as _$ssrHydrationKey } from "solid-js/web"; +"import { ssr as _$ssr } from "@solidjs/web"; +import { ssrHydrationKey as _$ssrHydrationKey } from "@solidjs/web"; var _tmpl$ = ["Foo"]; // @refresh skip function Foo() { - return _$ssr(_tmpl$, _$ssrHydrationKey()); + return (() => { + var _v$ = _$ssrHydrationKey(); + return _$ssr(_tmpl$, _v$); + })(); }" `; exports[`vite (server, hydratable) > FunctionDeclaration > should skip FunctionDeclaration with invalid Component name 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; -import { ssrHydrationKey as _$ssrHydrationKey } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; +import { ssrHydrationKey as _$ssrHydrationKey } from "@solidjs/web"; var _tmpl$ = ["Foo"]; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; const _REGISTRY = _$$registry(); -const JSX_foo_1 = _$$component(_REGISTRY, "JSX_foo_1", _props => /*@refresh jsx-skip*/_$ssr(_tmpl$, _$ssrHydrationKey()), { +const JSX_foo_1 = _$$component(_REGISTRY, "JSX_foo_1", _props => /*@refresh jsx-skip*/(() => { + var _v$ = _$ssrHydrationKey(); + return _$ssr(_tmpl$, _v$); +})(), { location: "example.jsx:3:15", signature: "4b145a58" }); @@ -536,15 +603,18 @@ if (import.meta.hot) { `; exports[`vite (server, hydratable) > FunctionDeclaration > should skip FunctionDeclaration with valid Component name and >1 params 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; -import { ssrHydrationKey as _$ssrHydrationKey } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; +import { ssrHydrationKey as _$ssrHydrationKey } from "@solidjs/web"; var _tmpl$ = ["Foo"]; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; const _REGISTRY = _$$registry(); -const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/_$ssr(_tmpl$, _$ssrHydrationKey()), { +const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/(() => { + var _v$ = _$ssrHydrationKey(); + return _$ssr(_tmpl$, _v$); +})(), { location: "example.jsx:3:15", signature: "4b145a58" }); @@ -557,15 +627,18 @@ if (import.meta.hot) { `; exports[`vite (server, hydratable) > FunctionDeclaration > should transform FunctionDeclaration with valid Component name and params 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; -import { ssrHydrationKey as _$ssrHydrationKey } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; +import { ssrHydrationKey as _$ssrHydrationKey } from "@solidjs/web"; var _tmpl$ = ["Foo"]; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; const _REGISTRY = _$$registry(); -const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/_$ssr(_tmpl$, _$ssrHydrationKey()), { +const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/(() => { + var _v$ = _$ssrHydrationKey(); + return _$ssr(_tmpl$, _v$); +})(), { location: "example.jsx:3:15", signature: "4b145a58" }); @@ -581,15 +654,18 @@ if (import.meta.hot) { `; exports[`vite (server, hydratable) > FunctionDeclaration > should transform FunctionDeclaration with valid Component name and params 2`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; -import { ssrHydrationKey as _$ssrHydrationKey } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; +import { ssrHydrationKey as _$ssrHydrationKey } from "@solidjs/web"; var _tmpl$ = ["Foo"]; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; const _REGISTRY = _$$registry(); -const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/_$ssr(_tmpl$, _$ssrHydrationKey()), { +const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/(() => { + var _v$ = _$ssrHydrationKey(); + return _$ssr(_tmpl$, _v$); +})(), { location: "example.jsx:3:15", signature: "4b145a58" }); @@ -605,17 +681,22 @@ if (import.meta.hot) { `; exports[`vite (server, hydratable) > FunctionDeclaration > should transform FunctionDeclaration with valid Component name and params 3`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; -import { escape as _$escape } from "solid-js/web"; -import { ssrHydrationKey as _$ssrHydrationKey } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; +import { ssrRunInScope as _$ssrRunInScope } from "@solidjs/web"; +import { escape as _$escape } from "@solidjs/web"; +import { ssrHydrationKey as _$ssrHydrationKey } from "@solidjs/web"; var _tmpl$ = ["", ""]; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; const example = 'Foo'; const _REGISTRY = _$$registry(); -const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/_$ssr(_tmpl$, _$ssrHydrationKey(), _$escape(_props.v0)), { +const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/(() => { + var _v$ = _$ssrHydrationKey(), + _v$2 = _$ssrRunInScope(() => _$escape(_props.v0)); + return _$ssr(_tmpl$, _v$, _v$2); +})(), { location: "example.jsx:4:15", signature: "ae0f2a31" }); @@ -636,7 +717,7 @@ if (import.meta.hot) { `; exports[`vite (server, hydratable) > FunctionDeclaration > should transform FunctionDeclaration with valid Component name and params 4`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; @@ -667,16 +748,19 @@ if (import.meta.hot) { `; exports[`vite (server, hydratable) > FunctionDeclaration > should transform FunctionDeclaration with valid Component name and params 5`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; -import { ssrHydrationKey as _$ssrHydrationKey } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; +import { ssrHydrationKey as _$ssrHydrationKey } from "@solidjs/web"; var _tmpl$ = ["bar"], _tmpl$2 = ["foo"]; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; const _REGISTRY = _$$registry(); -const Bar_1 = _$$component(_REGISTRY, "Bar_1", _props => /*@refresh jsx-skip*/_$ssr(_tmpl$, _$ssrHydrationKey()), { +const Bar_1 = _$$component(_REGISTRY, "Bar_1", _props => /*@refresh jsx-skip*/(() => { + var _v$ = _$ssrHydrationKey(); + return _$ssr(_tmpl$, _v$); +})(), { location: "example.jsx:3:15", signature: "61dd3182" }); @@ -686,7 +770,10 @@ const Bar = _$$component(_REGISTRY, "Bar", function Bar() { location: "example.jsx:2:6", signature: "e93ca257" }); -const Foo_1_1 = _$$component(_REGISTRY, "Foo_1_1", _props3 => /*@refresh jsx-skip*/_$ssr(_tmpl$2, _$ssrHydrationKey()), { +const Foo_1_1 = _$$component(_REGISTRY, "Foo_1_1", _props3 => /*@refresh jsx-skip*/(() => { + var _v$2 = _$ssrHydrationKey(); + return _$ssr(_tmpl$2, _v$2); +})(), { location: "example.jsx:8:12", signature: "241c14a4" }); @@ -710,12 +797,15 @@ if (import.meta.hot) { `; exports[`vite (server, hydratable) > VariableDeclarator > ArrowFunctionExpression > should skip VariableDeclarator w/ ArrowFunctionExpression with @refresh reload 1`] = ` -"import { ssr as _$ssr } from "solid-js/web"; -import { ssrHydrationKey as _$ssrHydrationKey } from "solid-js/web"; +"import { ssr as _$ssr } from "@solidjs/web"; +import { ssrHydrationKey as _$ssrHydrationKey } from "@solidjs/web"; var _tmpl$ = ["Foo"]; // @refresh reload const Foo = () => { - return _$ssr(_tmpl$, _$ssrHydrationKey()); + return (() => { + var _v$ = _$ssrHydrationKey(); + return _$ssr(_tmpl$, _v$); + })(); }; if (import.meta.hot) { import.meta.hot.accept(() => import.meta.hot.invalidate()); @@ -723,25 +813,31 @@ if (import.meta.hot) { `; exports[`vite (server, hydratable) > VariableDeclarator > ArrowFunctionExpression > should skip VariableDeclarator w/ ArrowFunctionExpression with @refresh skip 1`] = ` -"import { ssr as _$ssr } from "solid-js/web"; -import { ssrHydrationKey as _$ssrHydrationKey } from "solid-js/web"; +"import { ssr as _$ssr } from "@solidjs/web"; +import { ssrHydrationKey as _$ssrHydrationKey } from "@solidjs/web"; var _tmpl$ = ["Foo"]; // @refresh skip const Foo = () => { - return _$ssr(_tmpl$, _$ssrHydrationKey()); + return (() => { + var _v$ = _$ssrHydrationKey(); + return _$ssr(_tmpl$, _v$); + })(); };" `; exports[`vite (server, hydratable) > VariableDeclarator > ArrowFunctionExpression > should skip VariableDeclarator w/ ArrowFunctionExpression with invalid Component name 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; -import { ssrHydrationKey as _$ssrHydrationKey } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; +import { ssrHydrationKey as _$ssrHydrationKey } from "@solidjs/web"; var _tmpl$ = ["Foo"]; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; const _REGISTRY = _$$registry(); -const JSX_foo_1 = _$$component(_REGISTRY, "JSX_foo_1", _props => /*@refresh jsx-skip*/_$ssr(_tmpl$, _$ssrHydrationKey()), { +const JSX_foo_1 = _$$component(_REGISTRY, "JSX_foo_1", _props => /*@refresh jsx-skip*/(() => { + var _v$ = _$ssrHydrationKey(); + return _$ssr(_tmpl$, _v$); +})(), { location: "example.jsx:3:17", signature: "4b145a58" }); @@ -754,15 +850,18 @@ if (import.meta.hot) { `; exports[`vite (server, hydratable) > VariableDeclarator > ArrowFunctionExpression > should skip VariableDeclarator w/ ArrowFunctionExpression with valid Component name and >1 params 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; -import { ssrHydrationKey as _$ssrHydrationKey } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; +import { ssrHydrationKey as _$ssrHydrationKey } from "@solidjs/web"; var _tmpl$ = ["Foo"]; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; const _REGISTRY = _$$registry(); -const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/_$ssr(_tmpl$, _$ssrHydrationKey()), { +const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/(() => { + var _v$ = _$ssrHydrationKey(); + return _$ssr(_tmpl$, _v$); +})(), { location: "example.jsx:3:17", signature: "4b145a58" }); @@ -775,15 +874,18 @@ if (import.meta.hot) { `; exports[`vite (server, hydratable) > VariableDeclarator > ArrowFunctionExpression > should transform VariableDeclarator w/ ArrowFunctionExpression with valid Component name and params 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; -import { ssrHydrationKey as _$ssrHydrationKey } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; +import { ssrHydrationKey as _$ssrHydrationKey } from "@solidjs/web"; var _tmpl$ = ["Foo"]; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; const _REGISTRY = _$$registry(); -const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/_$ssr(_tmpl$, _$ssrHydrationKey()), { +const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/(() => { + var _v$ = _$ssrHydrationKey(); + return _$ssr(_tmpl$, _v$); +})(), { location: "example.jsx:3:17", signature: "4b145a58" }); @@ -799,15 +901,18 @@ if (import.meta.hot) { `; exports[`vite (server, hydratable) > VariableDeclarator > ArrowFunctionExpression > should transform VariableDeclarator w/ ArrowFunctionExpression with valid Component name and params 2`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; -import { ssrHydrationKey as _$ssrHydrationKey } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; +import { ssrHydrationKey as _$ssrHydrationKey } from "@solidjs/web"; var _tmpl$ = ["Foo"]; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; const _REGISTRY = _$$registry(); -const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/_$ssr(_tmpl$, _$ssrHydrationKey()), { +const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/(() => { + var _v$ = _$ssrHydrationKey(); + return _$ssr(_tmpl$, _v$); +})(), { location: "example.jsx:3:17", signature: "4b145a58" }); @@ -823,17 +928,22 @@ if (import.meta.hot) { `; exports[`vite (server, hydratable) > VariableDeclarator > ArrowFunctionExpression > should transform VariableDeclarator w/ ArrowFunctionExpression with valid Component name and params 3`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; -import { escape as _$escape } from "solid-js/web"; -import { ssrHydrationKey as _$ssrHydrationKey } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; +import { ssrRunInScope as _$ssrRunInScope } from "@solidjs/web"; +import { escape as _$escape } from "@solidjs/web"; +import { ssrHydrationKey as _$ssrHydrationKey } from "@solidjs/web"; var _tmpl$ = ["", ""]; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; const example = 'Foo'; const _REGISTRY = _$$registry(); -const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/_$ssr(_tmpl$, _$ssrHydrationKey(), _$escape(_props.v0)), { +const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/(() => { + var _v$ = _$ssrHydrationKey(), + _v$2 = _$ssrRunInScope(() => _$escape(_props.v0)); + return _$ssr(_tmpl$, _v$, _v$2); +})(), { location: "example.jsx:4:17", signature: "ae0f2a31" }); @@ -854,7 +964,7 @@ if (import.meta.hot) { `; exports[`vite (server, hydratable) > VariableDeclarator > ArrowFunctionExpression > should transform VariableDeclarator w/ ArrowFunctionExpression with valid Component name and params 4`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; @@ -885,16 +995,19 @@ if (import.meta.hot) { `; exports[`vite (server, hydratable) > VariableDeclarator > ArrowFunctionExpression > should transform VariableDeclarator w/ ArrowFunctionExpression with valid Component name and params 5`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; -import { ssrHydrationKey as _$ssrHydrationKey } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; +import { ssrHydrationKey as _$ssrHydrationKey } from "@solidjs/web"; var _tmpl$ = ["bar"], _tmpl$2 = ["foo"]; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; const _REGISTRY = _$$registry(); -const Bar_1 = _$$component(_REGISTRY, "Bar_1", _props => /*@refresh jsx-skip*/_$ssr(_tmpl$, _$ssrHydrationKey()), { +const Bar_1 = _$$component(_REGISTRY, "Bar_1", _props => /*@refresh jsx-skip*/(() => { + var _v$ = _$ssrHydrationKey(); + return _$ssr(_tmpl$, _v$); +})(), { location: "example.jsx:3:17", signature: "61dd3182" }); @@ -904,7 +1017,10 @@ const Bar = _$$component(_REGISTRY, "Bar", () => { location: "example.jsx:2:20", signature: "d1c6ca9b" }); -const Foo_1_1 = _$$component(_REGISTRY, "Foo_1_1", _props3 => /*@refresh jsx-skip*/_$ssr(_tmpl$2, _$ssrHydrationKey()), { +const Foo_1_1 = _$$component(_REGISTRY, "Foo_1_1", _props3 => /*@refresh jsx-skip*/(() => { + var _v$2 = _$ssrHydrationKey(); + return _$ssr(_tmpl$2, _v$2); +})(), { location: "example.jsx:8:14", signature: "241c14a4" }); @@ -928,12 +1044,15 @@ if (import.meta.hot) { `; exports[`vite (server, hydratable) > VariableDeclarator > FunctionExpression > should skip VariableDeclarator w/ FunctionExpression with @refresh reload 1`] = ` -"import { ssr as _$ssr } from "solid-js/web"; -import { ssrHydrationKey as _$ssrHydrationKey } from "solid-js/web"; +"import { ssr as _$ssr } from "@solidjs/web"; +import { ssrHydrationKey as _$ssrHydrationKey } from "@solidjs/web"; var _tmpl$ = ["Foo"]; // @refresh reload const Foo = function () { - return _$ssr(_tmpl$, _$ssrHydrationKey()); + return (() => { + var _v$ = _$ssrHydrationKey(); + return _$ssr(_tmpl$, _v$); + })(); }; if (import.meta.hot) { import.meta.hot.accept(() => import.meta.hot.invalidate()); @@ -941,25 +1060,31 @@ if (import.meta.hot) { `; exports[`vite (server, hydratable) > VariableDeclarator > FunctionExpression > should skip VariableDeclarator w/ FunctionExpression with @refresh skip 1`] = ` -"import { ssr as _$ssr } from "solid-js/web"; -import { ssrHydrationKey as _$ssrHydrationKey } from "solid-js/web"; +"import { ssr as _$ssr } from "@solidjs/web"; +import { ssrHydrationKey as _$ssrHydrationKey } from "@solidjs/web"; var _tmpl$ = ["Foo"]; // @refresh skip const Foo = function () { - return _$ssr(_tmpl$, _$ssrHydrationKey()); + return (() => { + var _v$ = _$ssrHydrationKey(); + return _$ssr(_tmpl$, _v$); + })(); };" `; exports[`vite (server, hydratable) > VariableDeclarator > FunctionExpression > should skip VariableDeclarator w/ FunctionExpression with invalid Component name 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; -import { ssrHydrationKey as _$ssrHydrationKey } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; +import { ssrHydrationKey as _$ssrHydrationKey } from "@solidjs/web"; var _tmpl$ = ["Foo"]; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; const _REGISTRY = _$$registry(); -const JSX_foo_1 = _$$component(_REGISTRY, "JSX_foo_1", _props => /*@refresh jsx-skip*/_$ssr(_tmpl$, _$ssrHydrationKey()), { +const JSX_foo_1 = _$$component(_REGISTRY, "JSX_foo_1", _props => /*@refresh jsx-skip*/(() => { + var _v$ = _$ssrHydrationKey(); + return _$ssr(_tmpl$, _v$); +})(), { location: "example.jsx:3:17", signature: "4b145a58" }); @@ -972,15 +1097,18 @@ if (import.meta.hot) { `; exports[`vite (server, hydratable) > VariableDeclarator > FunctionExpression > should skip VariableDeclarator w/ FunctionExpression with valid Component name and >1 params 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; -import { ssrHydrationKey as _$ssrHydrationKey } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; +import { ssrHydrationKey as _$ssrHydrationKey } from "@solidjs/web"; var _tmpl$ = ["Foo"]; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; const _REGISTRY = _$$registry(); -const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/_$ssr(_tmpl$, _$ssrHydrationKey()), { +const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/(() => { + var _v$ = _$ssrHydrationKey(); + return _$ssr(_tmpl$, _v$); +})(), { location: "example.jsx:3:17", signature: "4b145a58" }); @@ -993,15 +1121,18 @@ if (import.meta.hot) { `; exports[`vite (server, hydratable) > VariableDeclarator > FunctionExpression > should transform VariableDeclarator w/ FunctionExpression with valid Component name and params 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; -import { ssrHydrationKey as _$ssrHydrationKey } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; +import { ssrHydrationKey as _$ssrHydrationKey } from "@solidjs/web"; var _tmpl$ = ["Foo"]; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; const _REGISTRY = _$$registry(); -const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/_$ssr(_tmpl$, _$ssrHydrationKey()), { +const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/(() => { + var _v$ = _$ssrHydrationKey(); + return _$ssr(_tmpl$, _v$); +})(), { location: "example.jsx:3:17", signature: "4b145a58" }); @@ -1017,15 +1148,18 @@ if (import.meta.hot) { `; exports[`vite (server, hydratable) > VariableDeclarator > FunctionExpression > should transform VariableDeclarator w/ FunctionExpression with valid Component name and params 2`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; -import { ssrHydrationKey as _$ssrHydrationKey } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; +import { ssrHydrationKey as _$ssrHydrationKey } from "@solidjs/web"; var _tmpl$ = ["Foo"]; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; const _REGISTRY = _$$registry(); -const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/_$ssr(_tmpl$, _$ssrHydrationKey()), { +const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/(() => { + var _v$ = _$ssrHydrationKey(); + return _$ssr(_tmpl$, _v$); +})(), { location: "example.jsx:3:17", signature: "4b145a58" }); @@ -1041,17 +1175,22 @@ if (import.meta.hot) { `; exports[`vite (server, hydratable) > VariableDeclarator > FunctionExpression > should transform VariableDeclarator w/ FunctionExpression with valid Component name and params 3`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; -import { escape as _$escape } from "solid-js/web"; -import { ssrHydrationKey as _$ssrHydrationKey } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; +import { ssrRunInScope as _$ssrRunInScope } from "@solidjs/web"; +import { escape as _$escape } from "@solidjs/web"; +import { ssrHydrationKey as _$ssrHydrationKey } from "@solidjs/web"; var _tmpl$ = ["", ""]; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; const example = 'Foo'; const _REGISTRY = _$$registry(); -const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/_$ssr(_tmpl$, _$ssrHydrationKey(), _$escape(_props.v0)), { +const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/(() => { + var _v$ = _$ssrHydrationKey(), + _v$2 = _$ssrRunInScope(() => _$escape(_props.v0)); + return _$ssr(_tmpl$, _v$, _v$2); +})(), { location: "example.jsx:4:17", signature: "ae0f2a31" }); @@ -1072,7 +1211,7 @@ if (import.meta.hot) { `; exports[`vite (server, hydratable) > VariableDeclarator > FunctionExpression > should transform VariableDeclarator w/ FunctionExpression with valid Component name and params 4`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; @@ -1103,16 +1242,19 @@ if (import.meta.hot) { `; exports[`vite (server, hydratable) > VariableDeclarator > FunctionExpression > should transform VariableDeclarator w/ FunctionExpression with valid Component name and params 5`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; -import { ssrHydrationKey as _$ssrHydrationKey } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; +import { ssrHydrationKey as _$ssrHydrationKey } from "@solidjs/web"; var _tmpl$ = ["bar"], _tmpl$2 = ["foo"]; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; const _REGISTRY = _$$registry(); -const Bar_1 = _$$component(_REGISTRY, "Bar_1", _props => /*@refresh jsx-skip*/_$ssr(_tmpl$, _$ssrHydrationKey()), { +const Bar_1 = _$$component(_REGISTRY, "Bar_1", _props => /*@refresh jsx-skip*/(() => { + var _v$ = _$ssrHydrationKey(); + return _$ssr(_tmpl$, _v$); +})(), { location: "example.jsx:3:17", signature: "61dd3182" }); @@ -1122,7 +1264,10 @@ const Bar = _$$component(_REGISTRY, "Bar", function () { location: "example.jsx:2:20", signature: "1fb34faa" }); -const Foo_1_1 = _$$component(_REGISTRY, "Foo_1_1", _props3 => /*@refresh jsx-skip*/_$ssr(_tmpl$2, _$ssrHydrationKey()), { +const Foo_1_1 = _$$component(_REGISTRY, "Foo_1_1", _props3 => /*@refresh jsx-skip*/(() => { + var _v$2 = _$ssrHydrationKey(); + return _$ssr(_tmpl$2, _v$2); +})(), { location: "example.jsx:8:14", signature: "241c14a4" }); @@ -1146,15 +1291,19 @@ if (import.meta.hot) { `; exports[`vite (server, hydratable) > fix build > refs > should work with a function 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; -import { ssrHydrationKey as _$ssrHydrationKey } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; +import { ssrHydrationKey as _$ssrHydrationKey } from "@solidjs/web"; var _tmpl$ = ["Comp"]; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; const _REGISTRY = _$$registry(); -const Comp_1 = _$$component(_REGISTRY, "Comp_1", _props => /*@refresh jsx-skip*/_$ssr(_tmpl$, _$ssrHydrationKey()), { +const Comp_1 = _$$component(_REGISTRY, "Comp_1", _props => /*@refresh jsx-skip*/(() => { + var _v$ = _$ssrHydrationKey(), + _ref$ = _props.v0; + return _$ssr(_tmpl$, _v$); +})(), { location: "example.jsx:4:19", signature: "6f76290" }); @@ -1173,15 +1322,19 @@ if (import.meta.hot) { `; exports[`vite (server, hydratable) > fix build > refs > should work with a mutable variable 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; -import { ssrHydrationKey as _$ssrHydrationKey } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; +import { ssrHydrationKey as _$ssrHydrationKey } from "@solidjs/web"; var _tmpl$ = ["Comp"]; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; const _REGISTRY = _$$registry(); -const Comp_1 = _$$component(_REGISTRY, "Comp_1", _props => /*@refresh jsx-skip*/_$ssr(_tmpl$, _$ssrHydrationKey()), { +const Comp_1 = _$$component(_REGISTRY, "Comp_1", _props => /*@refresh jsx-skip*/(() => { + var _v$ = _$ssrHydrationKey(), + _ref$ = _props.v0; + return _$ssr(_tmpl$, _v$); +})(), { location: "example.jsx:4:19", signature: "6f76290" }); @@ -1206,16 +1359,20 @@ if (import.meta.hot) { `; exports[`vite (server, hydratable) > fix build > signals as refs > should work 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; -import { ssrHydrationKey as _$ssrHydrationKey } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; +import { ssrHydrationKey as _$ssrHydrationKey } from "@solidjs/web"; var _tmpl$ = ["Comp"]; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; import { createSignal } from 'solid-js'; const _REGISTRY = _$$registry(); -const Comp_1 = _$$component(_REGISTRY, "Comp_1", _props => /*@refresh jsx-skip*/_$ssr(_tmpl$, _$ssrHydrationKey()), { +const Comp_1 = _$$component(_REGISTRY, "Comp_1", _props => /*@refresh jsx-skip*/(() => { + var _v$ = _$ssrHydrationKey(), + _ref$ = _props.v0; + return _$ssr(_tmpl$, _v$); +})(), { location: "example.jsx:6:19", signature: "6f76290" }); @@ -1241,7 +1398,7 @@ if (import.meta.hot) { `; exports[`vite (server, hydratable) > fix render > @refresh reload > should work 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; // @refresh reload import { render } from 'solid-js/web'; if (root) { @@ -1254,7 +1411,7 @@ if (import.meta.hot) { `; exports[`vite (server, hydratable) > fix render > import specifiers > should work with ImportNamespaceSpecifier 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; @@ -1274,7 +1431,7 @@ if (import.meta.hot) { `; exports[`vite (server, hydratable) > fix render > import specifiers > should work with ImportSpecifier + Identifier 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; @@ -1294,7 +1451,7 @@ if (import.meta.hot) { `; exports[`vite (server, hydratable) > fix render > import specifiers > should work with ImportSpecifier + aliased Identifier 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; @@ -1314,7 +1471,7 @@ if (import.meta.hot) { `; exports[`vite (server, hydratable) > fix render > import specifiers > should work with ImportSpecifier + aliased Identifier from StringLiteral 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; @@ -1334,7 +1491,7 @@ if (import.meta.hot) { `; exports[`vite (server, hydratable) > fix render > top-level statements > should work with IfStatement 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; diff --git a/tests/server-hydratable/__snapshots__/webpack5.test.ts.snap b/tests/server-hydratable/__snapshots__/webpack5.test.ts.snap index bc2e131..46fbb80 100644 --- a/tests/server-hydratable/__snapshots__/webpack5.test.ts.snap +++ b/tests/server-hydratable/__snapshots__/webpack5.test.ts.snap @@ -8,37 +8,40 @@ if (someCond) { `; exports[`webpack5 (server, hydratable) > Context API > should support ExportNamedDeclaration 1`] = ` -"import { $$context as _$$context } from "solid-refresh"; +"import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; import { createContext } from 'solid-js'; const _REGISTRY = _$$registry(); -export const Example = _$$context(_REGISTRY, "Example", createContext()); +export const Example = _$$component(_REGISTRY, "Example", createContext()); if (import.meta.webpackHot) { _$$refresh("webpack5", import.meta.webpackHot, _REGISTRY); }" `; exports[`webpack5 (server, hydratable) > Context API > should support top-level VariableDeclaration 1`] = ` -"import { $$context as _$$context } from "solid-refresh"; +"import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; import { createContext } from 'solid-js'; const _REGISTRY = _$$registry(); -const Example = _$$context(_REGISTRY, "Example", createContext()); +const Example = _$$component(_REGISTRY, "Example", createContext()); if (import.meta.webpackHot) { _$$refresh("webpack5", import.meta.webpackHot, _REGISTRY); }" `; exports[`webpack5 (server, hydratable) > ExportDefaultDeclaration w/ FunctionExpression > should skip ExportDefaultDeclaration w/ FunctionExpression with @refresh reload 1`] = ` -"import { ssr as _$ssr } from "solid-js/web"; -import { ssrHydrationKey as _$ssrHydrationKey } from "solid-js/web"; +"import { ssr as _$ssr } from "@solidjs/web"; +import { ssrHydrationKey as _$ssrHydrationKey } from "@solidjs/web"; var _tmpl$ = ["Foo"]; import { $$decline as _$$decline } from "solid-refresh"; // @refresh reload export default function Foo() { - return _$ssr(_tmpl$, _$ssrHydrationKey()); + return (() => { + var _v$ = _$ssrHydrationKey(); + return _$ssr(_tmpl$, _v$); + })(); } if (import.meta.webpackHot) { _$$decline("webpack5", import.meta.webpackHot); @@ -46,25 +49,31 @@ if (import.meta.webpackHot) { `; exports[`webpack5 (server, hydratable) > ExportDefaultDeclaration w/ FunctionExpression > should skip ExportDefaultDeclaration w/ FunctionExpression with @refresh skip 1`] = ` -"import { ssr as _$ssr } from "solid-js/web"; -import { ssrHydrationKey as _$ssrHydrationKey } from "solid-js/web"; +"import { ssr as _$ssr } from "@solidjs/web"; +import { ssrHydrationKey as _$ssrHydrationKey } from "@solidjs/web"; var _tmpl$ = ["Foo"]; // @refresh skip export default function Foo() { - return _$ssr(_tmpl$, _$ssrHydrationKey()); + return (() => { + var _v$ = _$ssrHydrationKey(); + return _$ssr(_tmpl$, _v$); + })(); }" `; exports[`webpack5 (server, hydratable) > ExportDefaultDeclaration w/ FunctionExpression > should skip ExportDefaultDeclaration w/ FunctionExpression with invalid Component name 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; -import { ssrHydrationKey as _$ssrHydrationKey } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; +import { ssrHydrationKey as _$ssrHydrationKey } from "@solidjs/web"; var _tmpl$ = ["Foo"]; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; const _REGISTRY = _$$registry(); -const JSX_foo_1 = _$$component(_REGISTRY, "JSX_foo_1", _props => /*@refresh jsx-skip*/_$ssr(_tmpl$, _$ssrHydrationKey()), { +const JSX_foo_1 = _$$component(_REGISTRY, "JSX_foo_1", _props => /*@refresh jsx-skip*/(() => { + var _v$ = _$ssrHydrationKey(); + return _$ssr(_tmpl$, _v$); +})(), { location: "example.jsx:3:15", signature: "4b145a58" }); @@ -77,15 +86,18 @@ if (import.meta.webpackHot) { `; exports[`webpack5 (server, hydratable) > ExportDefaultDeclaration w/ FunctionExpression > should skip ExportDefaultDeclaration w/ FunctionExpression with valid Component name and >1 params 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; -import { ssrHydrationKey as _$ssrHydrationKey } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; +import { ssrHydrationKey as _$ssrHydrationKey } from "@solidjs/web"; var _tmpl$ = ["Foo"]; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; const _REGISTRY = _$$registry(); -const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/_$ssr(_tmpl$, _$ssrHydrationKey()), { +const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/(() => { + var _v$ = _$ssrHydrationKey(); + return _$ssr(_tmpl$, _v$); +})(), { location: "example.jsx:3:15", signature: "4b145a58" }); @@ -98,15 +110,18 @@ if (import.meta.webpackHot) { `; exports[`webpack5 (server, hydratable) > ExportDefaultDeclaration w/ FunctionExpression > should transform ExportDefaultDeclaration w/ FunctionExpression with valid Component name and params 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; -import { ssrHydrationKey as _$ssrHydrationKey } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; +import { ssrHydrationKey as _$ssrHydrationKey } from "@solidjs/web"; var _tmpl$ = ["Foo"]; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; const _REGISTRY = _$$registry(); -const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/_$ssr(_tmpl$, _$ssrHydrationKey()), { +const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/(() => { + var _v$ = _$ssrHydrationKey(); + return _$ssr(_tmpl$, _v$); +})(), { location: "example.jsx:3:15", signature: "4b145a58" }); @@ -123,15 +138,18 @@ if (import.meta.webpackHot) { `; exports[`webpack5 (server, hydratable) > ExportDefaultDeclaration w/ FunctionExpression > should transform ExportDefaultDeclaration w/ FunctionExpression with valid Component name and params 2`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; -import { ssrHydrationKey as _$ssrHydrationKey } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; +import { ssrHydrationKey as _$ssrHydrationKey } from "@solidjs/web"; var _tmpl$ = ["Foo"]; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; const _REGISTRY = _$$registry(); -const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/_$ssr(_tmpl$, _$ssrHydrationKey()), { +const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/(() => { + var _v$ = _$ssrHydrationKey(); + return _$ssr(_tmpl$, _v$); +})(), { location: "example.jsx:3:15", signature: "4b145a58" }); @@ -148,16 +166,21 @@ if (import.meta.webpackHot) { `; exports[`webpack5 (server, hydratable) > ExportDefaultDeclaration w/ FunctionExpression > should transform ExportDefaultDeclaration w/ FunctionExpression with valid Component name and params 3`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; -import { escape as _$escape } from "solid-js/web"; -import { ssrHydrationKey as _$ssrHydrationKey } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; +import { ssrRunInScope as _$ssrRunInScope } from "@solidjs/web"; +import { escape as _$escape } from "@solidjs/web"; +import { ssrHydrationKey as _$ssrHydrationKey } from "@solidjs/web"; var _tmpl$ = ["", ""]; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; const _REGISTRY = _$$registry(); -const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/_$ssr(_tmpl$, _$ssrHydrationKey(), _$escape(_props.v0)), { +const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/(() => { + var _v$ = _$ssrHydrationKey(), + _v$2 = _$ssrRunInScope(() => _$escape(_props.v0)); + return _$ssr(_tmpl$, _v$, _v$2); +})(), { location: "example.jsx:4:15", signature: "ae0f2a31" }); @@ -180,7 +203,7 @@ if (import.meta.webpackHot) { `; exports[`webpack5 (server, hydratable) > ExportDefaultDeclaration w/ FunctionExpression > should transform ExportDefaultDeclaration w/ FunctionExpression with valid Component name and params 4`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; @@ -212,16 +235,19 @@ if (import.meta.webpackHot) { `; exports[`webpack5 (server, hydratable) > ExportDefaultDeclaration w/ FunctionExpression > should transform ExportDefaultDeclaration w/ FunctionExpression with valid Component name and params 5`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; -import { ssrHydrationKey as _$ssrHydrationKey } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; +import { ssrHydrationKey as _$ssrHydrationKey } from "@solidjs/web"; var _tmpl$ = ["foo"], _tmpl$2 = ["bar"]; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; const _REGISTRY = _$$registry(); -const Foo_1_1 = _$$component(_REGISTRY, "Foo_1_1", _props3 => /*@refresh jsx-skip*/_$ssr(_tmpl$, _$ssrHydrationKey()), { +const Foo_1_1 = _$$component(_REGISTRY, "Foo_1_1", _props3 => /*@refresh jsx-skip*/(() => { + var _v$ = _$ssrHydrationKey(); + return _$ssr(_tmpl$, _v$); +})(), { location: "example.jsx:8:12", signature: "241c14a4" }); @@ -239,7 +265,10 @@ const Foo = _$$component(_REGISTRY, "Foo", function Foo() { location: "example.jsx:5:21", signature: "c963b907" }); -const Bar_1 = _$$component(_REGISTRY, "Bar_1", _props2 => /*@refresh jsx-skip*/_$ssr(_tmpl$2, _$ssrHydrationKey()), { +const Bar_1 = _$$component(_REGISTRY, "Bar_1", _props2 => /*@refresh jsx-skip*/(() => { + var _v$2 = _$ssrHydrationKey(); + return _$ssr(_tmpl$2, _v$2); +})(), { location: "example.jsx:3:15", signature: "fad4daa8" }); @@ -256,13 +285,16 @@ if (import.meta.webpackHot) { `; exports[`webpack5 (server, hydratable) > ExportNamedDeclaration w/ FunctionExpression > should skip ExportNamedDeclaration w/ FunctionExpression with @refresh reload 1`] = ` -"import { ssr as _$ssr } from "solid-js/web"; -import { ssrHydrationKey as _$ssrHydrationKey } from "solid-js/web"; +"import { ssr as _$ssr } from "@solidjs/web"; +import { ssrHydrationKey as _$ssrHydrationKey } from "@solidjs/web"; var _tmpl$ = ["Foo"]; import { $$decline as _$$decline } from "solid-refresh"; // @refresh reload export function Foo() { - return _$ssr(_tmpl$, _$ssrHydrationKey()); + return (() => { + var _v$ = _$ssrHydrationKey(); + return _$ssr(_tmpl$, _v$); + })(); } if (import.meta.webpackHot) { _$$decline("webpack5", import.meta.webpackHot); @@ -270,25 +302,31 @@ if (import.meta.webpackHot) { `; exports[`webpack5 (server, hydratable) > ExportNamedDeclaration w/ FunctionExpression > should skip ExportNamedDeclaration w/ FunctionExpression with @refresh skip 1`] = ` -"import { ssr as _$ssr } from "solid-js/web"; -import { ssrHydrationKey as _$ssrHydrationKey } from "solid-js/web"; +"import { ssr as _$ssr } from "@solidjs/web"; +import { ssrHydrationKey as _$ssrHydrationKey } from "@solidjs/web"; var _tmpl$ = ["Foo"]; // @refresh skip export function Foo() { - return _$ssr(_tmpl$, _$ssrHydrationKey()); + return (() => { + var _v$ = _$ssrHydrationKey(); + return _$ssr(_tmpl$, _v$); + })(); }" `; exports[`webpack5 (server, hydratable) > ExportNamedDeclaration w/ FunctionExpression > should skip ExportNamedDeclaration w/ FunctionExpression with invalid Component name 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; -import { ssrHydrationKey as _$ssrHydrationKey } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; +import { ssrHydrationKey as _$ssrHydrationKey } from "@solidjs/web"; var _tmpl$ = ["Foo"]; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; const _REGISTRY = _$$registry(); -const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/_$ssr(_tmpl$, _$ssrHydrationKey()), { +const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/(() => { + var _v$ = _$ssrHydrationKey(); + return _$ssr(_tmpl$, _v$); +})(), { location: "example.jsx:3:15", signature: "4b145a58" }); @@ -305,15 +343,18 @@ if (import.meta.webpackHot) { `; exports[`webpack5 (server, hydratable) > ExportNamedDeclaration w/ FunctionExpression > should skip ExportNamedDeclaration w/ FunctionExpression with valid Component name and >1 params 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; -import { ssrHydrationKey as _$ssrHydrationKey } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; +import { ssrHydrationKey as _$ssrHydrationKey } from "@solidjs/web"; var _tmpl$ = ["Foo"]; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; const _REGISTRY = _$$registry(); -const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/_$ssr(_tmpl$, _$ssrHydrationKey()), { +const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/(() => { + var _v$ = _$ssrHydrationKey(); + return _$ssr(_tmpl$, _v$); +})(), { location: "example.jsx:3:15", signature: "4b145a58" }); @@ -326,15 +367,18 @@ if (import.meta.webpackHot) { `; exports[`webpack5 (server, hydratable) > ExportNamedDeclaration w/ FunctionExpression > should transform ExportNamedDeclaration w/ FunctionExpression with valid Component name and params 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; -import { ssrHydrationKey as _$ssrHydrationKey } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; +import { ssrHydrationKey as _$ssrHydrationKey } from "@solidjs/web"; var _tmpl$ = ["Foo"]; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; const _REGISTRY = _$$registry(); -const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/_$ssr(_tmpl$, _$ssrHydrationKey()), { +const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/(() => { + var _v$ = _$ssrHydrationKey(); + return _$ssr(_tmpl$, _v$); +})(), { location: "example.jsx:3:15", signature: "4b145a58" }); @@ -351,15 +395,18 @@ if (import.meta.webpackHot) { `; exports[`webpack5 (server, hydratable) > ExportNamedDeclaration w/ FunctionExpression > should transform ExportNamedDeclaration w/ FunctionExpression with valid Component name and params 2`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; -import { ssrHydrationKey as _$ssrHydrationKey } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; +import { ssrHydrationKey as _$ssrHydrationKey } from "@solidjs/web"; var _tmpl$ = ["Foo"]; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; const _REGISTRY = _$$registry(); -const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/_$ssr(_tmpl$, _$ssrHydrationKey()), { +const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/(() => { + var _v$ = _$ssrHydrationKey(); + return _$ssr(_tmpl$, _v$); +})(), { location: "example.jsx:3:15", signature: "4b145a58" }); @@ -376,16 +423,21 @@ if (import.meta.webpackHot) { `; exports[`webpack5 (server, hydratable) > ExportNamedDeclaration w/ FunctionExpression > should transform ExportNamedDeclaration w/ FunctionExpression with valid Component name and params 3`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; -import { escape as _$escape } from "solid-js/web"; -import { ssrHydrationKey as _$ssrHydrationKey } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; +import { ssrRunInScope as _$ssrRunInScope } from "@solidjs/web"; +import { escape as _$escape } from "@solidjs/web"; +import { ssrHydrationKey as _$ssrHydrationKey } from "@solidjs/web"; var _tmpl$ = ["", ""]; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; const _REGISTRY = _$$registry(); -const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/_$ssr(_tmpl$, _$ssrHydrationKey(), _$escape(_props.v0)), { +const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/(() => { + var _v$ = _$ssrHydrationKey(), + _v$2 = _$ssrRunInScope(() => _$escape(_props.v0)); + return _$ssr(_tmpl$, _v$, _v$2); +})(), { location: "example.jsx:4:15", signature: "ae0f2a31" }); @@ -408,7 +460,7 @@ if (import.meta.webpackHot) { `; exports[`webpack5 (server, hydratable) > ExportNamedDeclaration w/ FunctionExpression > should transform ExportNamedDeclaration w/ FunctionExpression with valid Component name and params 4`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; @@ -440,16 +492,19 @@ if (import.meta.webpackHot) { `; exports[`webpack5 (server, hydratable) > ExportNamedDeclaration w/ FunctionExpression > should transform ExportNamedDeclaration w/ FunctionExpression with valid Component name and params 5`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; -import { ssrHydrationKey as _$ssrHydrationKey } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; +import { ssrHydrationKey as _$ssrHydrationKey } from "@solidjs/web"; var _tmpl$ = ["foo"], _tmpl$2 = ["bar"]; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; const _REGISTRY = _$$registry(); -const Foo_1_1 = _$$component(_REGISTRY, "Foo_1_1", _props3 => /*@refresh jsx-skip*/_$ssr(_tmpl$, _$ssrHydrationKey()), { +const Foo_1_1 = _$$component(_REGISTRY, "Foo_1_1", _props3 => /*@refresh jsx-skip*/(() => { + var _v$ = _$ssrHydrationKey(); + return _$ssr(_tmpl$, _v$); +})(), { location: "example.jsx:8:12", signature: "241c14a4" }); @@ -476,7 +531,10 @@ const Foo = _$$component(_REGISTRY, "Foo", function Foo() { Bar }) }); -const Bar_1 = _$$component(_REGISTRY, "Bar_1", _props2 => /*@refresh jsx-skip*/_$ssr(_tmpl$2, _$ssrHydrationKey()), { +const Bar_1 = _$$component(_REGISTRY, "Bar_1", _props2 => /*@refresh jsx-skip*/(() => { + var _v$2 = _$ssrHydrationKey(); + return _$ssr(_tmpl$2, _v$2); +})(), { location: "example.jsx:3:15", signature: "fad4daa8" }); @@ -494,13 +552,16 @@ if (import.meta.webpackHot) { `; exports[`webpack5 (server, hydratable) > FunctionDeclaration > should skip FunctionDeclaration with @refresh reload 1`] = ` -"import { ssr as _$ssr } from "solid-js/web"; -import { ssrHydrationKey as _$ssrHydrationKey } from "solid-js/web"; +"import { ssr as _$ssr } from "@solidjs/web"; +import { ssrHydrationKey as _$ssrHydrationKey } from "@solidjs/web"; var _tmpl$ = ["Foo"]; import { $$decline as _$$decline } from "solid-refresh"; // @refresh reload function Foo() { - return _$ssr(_tmpl$, _$ssrHydrationKey()); + return (() => { + var _v$ = _$ssrHydrationKey(); + return _$ssr(_tmpl$, _v$); + })(); } if (import.meta.webpackHot) { _$$decline("webpack5", import.meta.webpackHot); @@ -508,25 +569,31 @@ if (import.meta.webpackHot) { `; exports[`webpack5 (server, hydratable) > FunctionDeclaration > should skip FunctionDeclaration with @refresh skip 1`] = ` -"import { ssr as _$ssr } from "solid-js/web"; -import { ssrHydrationKey as _$ssrHydrationKey } from "solid-js/web"; +"import { ssr as _$ssr } from "@solidjs/web"; +import { ssrHydrationKey as _$ssrHydrationKey } from "@solidjs/web"; var _tmpl$ = ["Foo"]; // @refresh skip function Foo() { - return _$ssr(_tmpl$, _$ssrHydrationKey()); + return (() => { + var _v$ = _$ssrHydrationKey(); + return _$ssr(_tmpl$, _v$); + })(); }" `; exports[`webpack5 (server, hydratable) > FunctionDeclaration > should skip FunctionDeclaration with invalid Component name 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; -import { ssrHydrationKey as _$ssrHydrationKey } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; +import { ssrHydrationKey as _$ssrHydrationKey } from "@solidjs/web"; var _tmpl$ = ["Foo"]; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; const _REGISTRY = _$$registry(); -const JSX_foo_1 = _$$component(_REGISTRY, "JSX_foo_1", _props => /*@refresh jsx-skip*/_$ssr(_tmpl$, _$ssrHydrationKey()), { +const JSX_foo_1 = _$$component(_REGISTRY, "JSX_foo_1", _props => /*@refresh jsx-skip*/(() => { + var _v$ = _$ssrHydrationKey(); + return _$ssr(_tmpl$, _v$); +})(), { location: "example.jsx:3:15", signature: "4b145a58" }); @@ -539,15 +606,18 @@ if (import.meta.webpackHot) { `; exports[`webpack5 (server, hydratable) > FunctionDeclaration > should skip FunctionDeclaration with valid Component name and >1 params 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; -import { ssrHydrationKey as _$ssrHydrationKey } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; +import { ssrHydrationKey as _$ssrHydrationKey } from "@solidjs/web"; var _tmpl$ = ["Foo"]; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; const _REGISTRY = _$$registry(); -const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/_$ssr(_tmpl$, _$ssrHydrationKey()), { +const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/(() => { + var _v$ = _$ssrHydrationKey(); + return _$ssr(_tmpl$, _v$); +})(), { location: "example.jsx:3:15", signature: "4b145a58" }); @@ -560,15 +630,18 @@ if (import.meta.webpackHot) { `; exports[`webpack5 (server, hydratable) > FunctionDeclaration > should transform FunctionDeclaration with valid Component name and params 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; -import { ssrHydrationKey as _$ssrHydrationKey } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; +import { ssrHydrationKey as _$ssrHydrationKey } from "@solidjs/web"; var _tmpl$ = ["Foo"]; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; const _REGISTRY = _$$registry(); -const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/_$ssr(_tmpl$, _$ssrHydrationKey()), { +const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/(() => { + var _v$ = _$ssrHydrationKey(); + return _$ssr(_tmpl$, _v$); +})(), { location: "example.jsx:3:15", signature: "4b145a58" }); @@ -584,15 +657,18 @@ if (import.meta.webpackHot) { `; exports[`webpack5 (server, hydratable) > FunctionDeclaration > should transform FunctionDeclaration with valid Component name and params 2`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; -import { ssrHydrationKey as _$ssrHydrationKey } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; +import { ssrHydrationKey as _$ssrHydrationKey } from "@solidjs/web"; var _tmpl$ = ["Foo"]; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; const _REGISTRY = _$$registry(); -const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/_$ssr(_tmpl$, _$ssrHydrationKey()), { +const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/(() => { + var _v$ = _$ssrHydrationKey(); + return _$ssr(_tmpl$, _v$); +})(), { location: "example.jsx:3:15", signature: "4b145a58" }); @@ -608,17 +684,22 @@ if (import.meta.webpackHot) { `; exports[`webpack5 (server, hydratable) > FunctionDeclaration > should transform FunctionDeclaration with valid Component name and params 3`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; -import { escape as _$escape } from "solid-js/web"; -import { ssrHydrationKey as _$ssrHydrationKey } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; +import { ssrRunInScope as _$ssrRunInScope } from "@solidjs/web"; +import { escape as _$escape } from "@solidjs/web"; +import { ssrHydrationKey as _$ssrHydrationKey } from "@solidjs/web"; var _tmpl$ = ["", ""]; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; const example = 'Foo'; const _REGISTRY = _$$registry(); -const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/_$ssr(_tmpl$, _$ssrHydrationKey(), _$escape(_props.v0)), { +const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/(() => { + var _v$ = _$ssrHydrationKey(), + _v$2 = _$ssrRunInScope(() => _$escape(_props.v0)); + return _$ssr(_tmpl$, _v$, _v$2); +})(), { location: "example.jsx:4:15", signature: "ae0f2a31" }); @@ -639,7 +720,7 @@ if (import.meta.webpackHot) { `; exports[`webpack5 (server, hydratable) > FunctionDeclaration > should transform FunctionDeclaration with valid Component name and params 4`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; @@ -670,16 +751,19 @@ if (import.meta.webpackHot) { `; exports[`webpack5 (server, hydratable) > FunctionDeclaration > should transform FunctionDeclaration with valid Component name and params 5`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; -import { ssrHydrationKey as _$ssrHydrationKey } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; +import { ssrHydrationKey as _$ssrHydrationKey } from "@solidjs/web"; var _tmpl$ = ["bar"], _tmpl$2 = ["foo"]; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; const _REGISTRY = _$$registry(); -const Bar_1 = _$$component(_REGISTRY, "Bar_1", _props => /*@refresh jsx-skip*/_$ssr(_tmpl$, _$ssrHydrationKey()), { +const Bar_1 = _$$component(_REGISTRY, "Bar_1", _props => /*@refresh jsx-skip*/(() => { + var _v$ = _$ssrHydrationKey(); + return _$ssr(_tmpl$, _v$); +})(), { location: "example.jsx:3:15", signature: "61dd3182" }); @@ -689,7 +773,10 @@ const Bar = _$$component(_REGISTRY, "Bar", function Bar() { location: "example.jsx:2:6", signature: "e93ca257" }); -const Foo_1_1 = _$$component(_REGISTRY, "Foo_1_1", _props3 => /*@refresh jsx-skip*/_$ssr(_tmpl$2, _$ssrHydrationKey()), { +const Foo_1_1 = _$$component(_REGISTRY, "Foo_1_1", _props3 => /*@refresh jsx-skip*/(() => { + var _v$2 = _$ssrHydrationKey(); + return _$ssr(_tmpl$2, _v$2); +})(), { location: "example.jsx:8:12", signature: "241c14a4" }); @@ -713,13 +800,16 @@ if (import.meta.webpackHot) { `; exports[`webpack5 (server, hydratable) > VariableDeclarator > ArrowFunctionExpression > should skip VariableDeclarator w/ ArrowFunctionExpression with @refresh reload 1`] = ` -"import { ssr as _$ssr } from "solid-js/web"; -import { ssrHydrationKey as _$ssrHydrationKey } from "solid-js/web"; +"import { ssr as _$ssr } from "@solidjs/web"; +import { ssrHydrationKey as _$ssrHydrationKey } from "@solidjs/web"; var _tmpl$ = ["Foo"]; import { $$decline as _$$decline } from "solid-refresh"; // @refresh reload const Foo = () => { - return _$ssr(_tmpl$, _$ssrHydrationKey()); + return (() => { + var _v$ = _$ssrHydrationKey(); + return _$ssr(_tmpl$, _v$); + })(); }; if (import.meta.webpackHot) { _$$decline("webpack5", import.meta.webpackHot); @@ -727,25 +817,31 @@ if (import.meta.webpackHot) { `; exports[`webpack5 (server, hydratable) > VariableDeclarator > ArrowFunctionExpression > should skip VariableDeclarator w/ ArrowFunctionExpression with @refresh skip 1`] = ` -"import { ssr as _$ssr } from "solid-js/web"; -import { ssrHydrationKey as _$ssrHydrationKey } from "solid-js/web"; +"import { ssr as _$ssr } from "@solidjs/web"; +import { ssrHydrationKey as _$ssrHydrationKey } from "@solidjs/web"; var _tmpl$ = ["Foo"]; // @refresh skip const Foo = () => { - return _$ssr(_tmpl$, _$ssrHydrationKey()); + return (() => { + var _v$ = _$ssrHydrationKey(); + return _$ssr(_tmpl$, _v$); + })(); };" `; exports[`webpack5 (server, hydratable) > VariableDeclarator > ArrowFunctionExpression > should skip VariableDeclarator w/ ArrowFunctionExpression with invalid Component name 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; -import { ssrHydrationKey as _$ssrHydrationKey } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; +import { ssrHydrationKey as _$ssrHydrationKey } from "@solidjs/web"; var _tmpl$ = ["Foo"]; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; const _REGISTRY = _$$registry(); -const JSX_foo_1 = _$$component(_REGISTRY, "JSX_foo_1", _props => /*@refresh jsx-skip*/_$ssr(_tmpl$, _$ssrHydrationKey()), { +const JSX_foo_1 = _$$component(_REGISTRY, "JSX_foo_1", _props => /*@refresh jsx-skip*/(() => { + var _v$ = _$ssrHydrationKey(); + return _$ssr(_tmpl$, _v$); +})(), { location: "example.jsx:3:17", signature: "4b145a58" }); @@ -758,15 +854,18 @@ if (import.meta.webpackHot) { `; exports[`webpack5 (server, hydratable) > VariableDeclarator > ArrowFunctionExpression > should skip VariableDeclarator w/ ArrowFunctionExpression with valid Component name and >1 params 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; -import { ssrHydrationKey as _$ssrHydrationKey } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; +import { ssrHydrationKey as _$ssrHydrationKey } from "@solidjs/web"; var _tmpl$ = ["Foo"]; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; const _REGISTRY = _$$registry(); -const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/_$ssr(_tmpl$, _$ssrHydrationKey()), { +const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/(() => { + var _v$ = _$ssrHydrationKey(); + return _$ssr(_tmpl$, _v$); +})(), { location: "example.jsx:3:17", signature: "4b145a58" }); @@ -779,15 +878,18 @@ if (import.meta.webpackHot) { `; exports[`webpack5 (server, hydratable) > VariableDeclarator > ArrowFunctionExpression > should transform VariableDeclarator w/ ArrowFunctionExpression with valid Component name and params 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; -import { ssrHydrationKey as _$ssrHydrationKey } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; +import { ssrHydrationKey as _$ssrHydrationKey } from "@solidjs/web"; var _tmpl$ = ["Foo"]; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; const _REGISTRY = _$$registry(); -const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/_$ssr(_tmpl$, _$ssrHydrationKey()), { +const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/(() => { + var _v$ = _$ssrHydrationKey(); + return _$ssr(_tmpl$, _v$); +})(), { location: "example.jsx:3:17", signature: "4b145a58" }); @@ -803,15 +905,18 @@ if (import.meta.webpackHot) { `; exports[`webpack5 (server, hydratable) > VariableDeclarator > ArrowFunctionExpression > should transform VariableDeclarator w/ ArrowFunctionExpression with valid Component name and params 2`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; -import { ssrHydrationKey as _$ssrHydrationKey } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; +import { ssrHydrationKey as _$ssrHydrationKey } from "@solidjs/web"; var _tmpl$ = ["Foo"]; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; const _REGISTRY = _$$registry(); -const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/_$ssr(_tmpl$, _$ssrHydrationKey()), { +const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/(() => { + var _v$ = _$ssrHydrationKey(); + return _$ssr(_tmpl$, _v$); +})(), { location: "example.jsx:3:17", signature: "4b145a58" }); @@ -827,17 +932,22 @@ if (import.meta.webpackHot) { `; exports[`webpack5 (server, hydratable) > VariableDeclarator > ArrowFunctionExpression > should transform VariableDeclarator w/ ArrowFunctionExpression with valid Component name and params 3`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; -import { escape as _$escape } from "solid-js/web"; -import { ssrHydrationKey as _$ssrHydrationKey } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; +import { ssrRunInScope as _$ssrRunInScope } from "@solidjs/web"; +import { escape as _$escape } from "@solidjs/web"; +import { ssrHydrationKey as _$ssrHydrationKey } from "@solidjs/web"; var _tmpl$ = ["", ""]; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; const example = 'Foo'; const _REGISTRY = _$$registry(); -const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/_$ssr(_tmpl$, _$ssrHydrationKey(), _$escape(_props.v0)), { +const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/(() => { + var _v$ = _$ssrHydrationKey(), + _v$2 = _$ssrRunInScope(() => _$escape(_props.v0)); + return _$ssr(_tmpl$, _v$, _v$2); +})(), { location: "example.jsx:4:17", signature: "ae0f2a31" }); @@ -858,7 +968,7 @@ if (import.meta.webpackHot) { `; exports[`webpack5 (server, hydratable) > VariableDeclarator > ArrowFunctionExpression > should transform VariableDeclarator w/ ArrowFunctionExpression with valid Component name and params 4`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; @@ -889,16 +999,19 @@ if (import.meta.webpackHot) { `; exports[`webpack5 (server, hydratable) > VariableDeclarator > ArrowFunctionExpression > should transform VariableDeclarator w/ ArrowFunctionExpression with valid Component name and params 5`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; -import { ssrHydrationKey as _$ssrHydrationKey } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; +import { ssrHydrationKey as _$ssrHydrationKey } from "@solidjs/web"; var _tmpl$ = ["bar"], _tmpl$2 = ["foo"]; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; const _REGISTRY = _$$registry(); -const Bar_1 = _$$component(_REGISTRY, "Bar_1", _props => /*@refresh jsx-skip*/_$ssr(_tmpl$, _$ssrHydrationKey()), { +const Bar_1 = _$$component(_REGISTRY, "Bar_1", _props => /*@refresh jsx-skip*/(() => { + var _v$ = _$ssrHydrationKey(); + return _$ssr(_tmpl$, _v$); +})(), { location: "example.jsx:3:17", signature: "61dd3182" }); @@ -908,7 +1021,10 @@ const Bar = _$$component(_REGISTRY, "Bar", () => { location: "example.jsx:2:20", signature: "d1c6ca9b" }); -const Foo_1_1 = _$$component(_REGISTRY, "Foo_1_1", _props3 => /*@refresh jsx-skip*/_$ssr(_tmpl$2, _$ssrHydrationKey()), { +const Foo_1_1 = _$$component(_REGISTRY, "Foo_1_1", _props3 => /*@refresh jsx-skip*/(() => { + var _v$2 = _$ssrHydrationKey(); + return _$ssr(_tmpl$2, _v$2); +})(), { location: "example.jsx:8:14", signature: "241c14a4" }); @@ -932,13 +1048,16 @@ if (import.meta.webpackHot) { `; exports[`webpack5 (server, hydratable) > VariableDeclarator > FunctionExpression > should skip VariableDeclarator w/ FunctionExpression with @refresh reload 1`] = ` -"import { ssr as _$ssr } from "solid-js/web"; -import { ssrHydrationKey as _$ssrHydrationKey } from "solid-js/web"; +"import { ssr as _$ssr } from "@solidjs/web"; +import { ssrHydrationKey as _$ssrHydrationKey } from "@solidjs/web"; var _tmpl$ = ["Foo"]; import { $$decline as _$$decline } from "solid-refresh"; // @refresh reload const Foo = function () { - return _$ssr(_tmpl$, _$ssrHydrationKey()); + return (() => { + var _v$ = _$ssrHydrationKey(); + return _$ssr(_tmpl$, _v$); + })(); }; if (import.meta.webpackHot) { _$$decline("webpack5", import.meta.webpackHot); @@ -946,25 +1065,31 @@ if (import.meta.webpackHot) { `; exports[`webpack5 (server, hydratable) > VariableDeclarator > FunctionExpression > should skip VariableDeclarator w/ FunctionExpression with @refresh skip 1`] = ` -"import { ssr as _$ssr } from "solid-js/web"; -import { ssrHydrationKey as _$ssrHydrationKey } from "solid-js/web"; +"import { ssr as _$ssr } from "@solidjs/web"; +import { ssrHydrationKey as _$ssrHydrationKey } from "@solidjs/web"; var _tmpl$ = ["Foo"]; // @refresh skip const Foo = function () { - return _$ssr(_tmpl$, _$ssrHydrationKey()); + return (() => { + var _v$ = _$ssrHydrationKey(); + return _$ssr(_tmpl$, _v$); + })(); };" `; exports[`webpack5 (server, hydratable) > VariableDeclarator > FunctionExpression > should skip VariableDeclarator w/ FunctionExpression with invalid Component name 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; -import { ssrHydrationKey as _$ssrHydrationKey } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; +import { ssrHydrationKey as _$ssrHydrationKey } from "@solidjs/web"; var _tmpl$ = ["Foo"]; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; const _REGISTRY = _$$registry(); -const JSX_foo_1 = _$$component(_REGISTRY, "JSX_foo_1", _props => /*@refresh jsx-skip*/_$ssr(_tmpl$, _$ssrHydrationKey()), { +const JSX_foo_1 = _$$component(_REGISTRY, "JSX_foo_1", _props => /*@refresh jsx-skip*/(() => { + var _v$ = _$ssrHydrationKey(); + return _$ssr(_tmpl$, _v$); +})(), { location: "example.jsx:3:17", signature: "4b145a58" }); @@ -977,15 +1102,18 @@ if (import.meta.webpackHot) { `; exports[`webpack5 (server, hydratable) > VariableDeclarator > FunctionExpression > should skip VariableDeclarator w/ FunctionExpression with valid Component name and >1 params 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; -import { ssrHydrationKey as _$ssrHydrationKey } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; +import { ssrHydrationKey as _$ssrHydrationKey } from "@solidjs/web"; var _tmpl$ = ["Foo"]; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; const _REGISTRY = _$$registry(); -const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/_$ssr(_tmpl$, _$ssrHydrationKey()), { +const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/(() => { + var _v$ = _$ssrHydrationKey(); + return _$ssr(_tmpl$, _v$); +})(), { location: "example.jsx:3:17", signature: "4b145a58" }); @@ -998,15 +1126,18 @@ if (import.meta.webpackHot) { `; exports[`webpack5 (server, hydratable) > VariableDeclarator > FunctionExpression > should transform VariableDeclarator w/ FunctionExpression with valid Component name and params 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; -import { ssrHydrationKey as _$ssrHydrationKey } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; +import { ssrHydrationKey as _$ssrHydrationKey } from "@solidjs/web"; var _tmpl$ = ["Foo"]; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; const _REGISTRY = _$$registry(); -const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/_$ssr(_tmpl$, _$ssrHydrationKey()), { +const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/(() => { + var _v$ = _$ssrHydrationKey(); + return _$ssr(_tmpl$, _v$); +})(), { location: "example.jsx:3:17", signature: "4b145a58" }); @@ -1022,15 +1153,18 @@ if (import.meta.webpackHot) { `; exports[`webpack5 (server, hydratable) > VariableDeclarator > FunctionExpression > should transform VariableDeclarator w/ FunctionExpression with valid Component name and params 2`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; -import { ssrHydrationKey as _$ssrHydrationKey } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; +import { ssrHydrationKey as _$ssrHydrationKey } from "@solidjs/web"; var _tmpl$ = ["Foo"]; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; const _REGISTRY = _$$registry(); -const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/_$ssr(_tmpl$, _$ssrHydrationKey()), { +const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/(() => { + var _v$ = _$ssrHydrationKey(); + return _$ssr(_tmpl$, _v$); +})(), { location: "example.jsx:3:17", signature: "4b145a58" }); @@ -1046,17 +1180,22 @@ if (import.meta.webpackHot) { `; exports[`webpack5 (server, hydratable) > VariableDeclarator > FunctionExpression > should transform VariableDeclarator w/ FunctionExpression with valid Component name and params 3`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; -import { escape as _$escape } from "solid-js/web"; -import { ssrHydrationKey as _$ssrHydrationKey } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; +import { ssrRunInScope as _$ssrRunInScope } from "@solidjs/web"; +import { escape as _$escape } from "@solidjs/web"; +import { ssrHydrationKey as _$ssrHydrationKey } from "@solidjs/web"; var _tmpl$ = ["", ""]; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; const example = 'Foo'; const _REGISTRY = _$$registry(); -const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/_$ssr(_tmpl$, _$ssrHydrationKey(), _$escape(_props.v0)), { +const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/(() => { + var _v$ = _$ssrHydrationKey(), + _v$2 = _$ssrRunInScope(() => _$escape(_props.v0)); + return _$ssr(_tmpl$, _v$, _v$2); +})(), { location: "example.jsx:4:17", signature: "ae0f2a31" }); @@ -1077,7 +1216,7 @@ if (import.meta.webpackHot) { `; exports[`webpack5 (server, hydratable) > VariableDeclarator > FunctionExpression > should transform VariableDeclarator w/ FunctionExpression with valid Component name and params 4`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; @@ -1108,16 +1247,19 @@ if (import.meta.webpackHot) { `; exports[`webpack5 (server, hydratable) > VariableDeclarator > FunctionExpression > should transform VariableDeclarator w/ FunctionExpression with valid Component name and params 5`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; -import { ssrHydrationKey as _$ssrHydrationKey } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; +import { ssrHydrationKey as _$ssrHydrationKey } from "@solidjs/web"; var _tmpl$ = ["bar"], _tmpl$2 = ["foo"]; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; const _REGISTRY = _$$registry(); -const Bar_1 = _$$component(_REGISTRY, "Bar_1", _props => /*@refresh jsx-skip*/_$ssr(_tmpl$, _$ssrHydrationKey()), { +const Bar_1 = _$$component(_REGISTRY, "Bar_1", _props => /*@refresh jsx-skip*/(() => { + var _v$ = _$ssrHydrationKey(); + return _$ssr(_tmpl$, _v$); +})(), { location: "example.jsx:3:17", signature: "61dd3182" }); @@ -1127,7 +1269,10 @@ const Bar = _$$component(_REGISTRY, "Bar", function () { location: "example.jsx:2:20", signature: "1fb34faa" }); -const Foo_1_1 = _$$component(_REGISTRY, "Foo_1_1", _props3 => /*@refresh jsx-skip*/_$ssr(_tmpl$2, _$ssrHydrationKey()), { +const Foo_1_1 = _$$component(_REGISTRY, "Foo_1_1", _props3 => /*@refresh jsx-skip*/(() => { + var _v$2 = _$ssrHydrationKey(); + return _$ssr(_tmpl$2, _v$2); +})(), { location: "example.jsx:8:14", signature: "241c14a4" }); @@ -1151,15 +1296,19 @@ if (import.meta.webpackHot) { `; exports[`webpack5 (server, hydratable) > fix build > refs > should work with a function 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; -import { ssrHydrationKey as _$ssrHydrationKey } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; +import { ssrHydrationKey as _$ssrHydrationKey } from "@solidjs/web"; var _tmpl$ = ["Comp"]; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; const _REGISTRY = _$$registry(); -const Comp_1 = _$$component(_REGISTRY, "Comp_1", _props => /*@refresh jsx-skip*/_$ssr(_tmpl$, _$ssrHydrationKey()), { +const Comp_1 = _$$component(_REGISTRY, "Comp_1", _props => /*@refresh jsx-skip*/(() => { + var _v$ = _$ssrHydrationKey(), + _ref$ = _props.v0; + return _$ssr(_tmpl$, _v$); +})(), { location: "example.jsx:4:19", signature: "6f76290" }); @@ -1178,15 +1327,19 @@ if (import.meta.webpackHot) { `; exports[`webpack5 (server, hydratable) > fix build > refs > should work with a mutable variable 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; -import { ssrHydrationKey as _$ssrHydrationKey } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; +import { ssrHydrationKey as _$ssrHydrationKey } from "@solidjs/web"; var _tmpl$ = ["Comp"]; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; const _REGISTRY = _$$registry(); -const Comp_1 = _$$component(_REGISTRY, "Comp_1", _props => /*@refresh jsx-skip*/_$ssr(_tmpl$, _$ssrHydrationKey()), { +const Comp_1 = _$$component(_REGISTRY, "Comp_1", _props => /*@refresh jsx-skip*/(() => { + var _v$ = _$ssrHydrationKey(), + _ref$ = _props.v0; + return _$ssr(_tmpl$, _v$); +})(), { location: "example.jsx:4:19", signature: "6f76290" }); @@ -1211,16 +1364,20 @@ if (import.meta.webpackHot) { `; exports[`webpack5 (server, hydratable) > fix build > signals as refs > should work 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; -import { ssrHydrationKey as _$ssrHydrationKey } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; +import { ssrHydrationKey as _$ssrHydrationKey } from "@solidjs/web"; var _tmpl$ = ["Comp"]; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; import { createSignal } from 'solid-js'; const _REGISTRY = _$$registry(); -const Comp_1 = _$$component(_REGISTRY, "Comp_1", _props => /*@refresh jsx-skip*/_$ssr(_tmpl$, _$ssrHydrationKey()), { +const Comp_1 = _$$component(_REGISTRY, "Comp_1", _props => /*@refresh jsx-skip*/(() => { + var _v$ = _$ssrHydrationKey(), + _ref$ = _props.v0; + return _$ssr(_tmpl$, _v$); +})(), { location: "example.jsx:6:19", signature: "6f76290" }); @@ -1246,7 +1403,7 @@ if (import.meta.webpackHot) { `; exports[`webpack5 (server, hydratable) > fix render > @refresh reload > should work 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; import { $$decline as _$$decline } from "solid-refresh"; // @refresh reload import { render } from 'solid-js/web'; @@ -1260,7 +1417,7 @@ if (import.meta.webpackHot) { `; exports[`webpack5 (server, hydratable) > fix render > import specifiers > should work with ImportNamespaceSpecifier 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; @@ -1280,7 +1437,7 @@ if (import.meta.webpackHot) { `; exports[`webpack5 (server, hydratable) > fix render > import specifiers > should work with ImportSpecifier + Identifier 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; @@ -1300,7 +1457,7 @@ if (import.meta.webpackHot) { `; exports[`webpack5 (server, hydratable) > fix render > import specifiers > should work with ImportSpecifier + aliased Identifier 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; @@ -1320,7 +1477,7 @@ if (import.meta.webpackHot) { `; exports[`webpack5 (server, hydratable) > fix render > import specifiers > should work with ImportSpecifier + aliased Identifier from StringLiteral 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; @@ -1340,7 +1497,7 @@ if (import.meta.webpackHot) { `; exports[`webpack5 (server, hydratable) > fix render > top-level statements > should work with IfStatement 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; diff --git a/tests/server/__snapshots__/esm.test.ts.snap b/tests/server/__snapshots__/esm.test.ts.snap index 4e5158b..c5172ee 100644 --- a/tests/server/__snapshots__/esm.test.ts.snap +++ b/tests/server/__snapshots__/esm.test.ts.snap @@ -8,31 +8,31 @@ if (someCond) { `; exports[`esm (server, non-hydratable) > Context API > should support ExportNamedDeclaration 1`] = ` -"import { $$context as _$$context } from "solid-refresh"; +"import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; import { createContext } from 'solid-js'; const _REGISTRY = _$$registry(); -export const Example = _$$context(_REGISTRY, "Example", createContext()); +export const Example = _$$component(_REGISTRY, "Example", createContext()); if (import.meta.hot) { _$$refresh("esm", import.meta.hot, _REGISTRY); }" `; exports[`esm (server, non-hydratable) > Context API > should support top-level VariableDeclaration 1`] = ` -"import { $$context as _$$context } from "solid-refresh"; +"import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; import { createContext } from 'solid-js'; const _REGISTRY = _$$registry(); -const Example = _$$context(_REGISTRY, "Example", createContext()); +const Example = _$$component(_REGISTRY, "Example", createContext()); if (import.meta.hot) { _$$refresh("esm", import.meta.hot, _REGISTRY); }" `; exports[`esm (server, non-hydratable) > ExportDefaultDeclaration w/ FunctionExpression > should skip ExportDefaultDeclaration w/ FunctionExpression with @refresh reload 1`] = ` -"import { ssr as _$ssr } from "solid-js/web"; +"import { ssr as _$ssr } from "@solidjs/web"; var _tmpl$ = "

Foo

"; import { $$decline as _$$decline } from "solid-refresh"; // @refresh reload @@ -45,7 +45,7 @@ if (import.meta.hot) { `; exports[`esm (server, non-hydratable) > ExportDefaultDeclaration w/ FunctionExpression > should skip ExportDefaultDeclaration w/ FunctionExpression with @refresh skip 1`] = ` -"import { ssr as _$ssr } from "solid-js/web"; +"import { ssr as _$ssr } from "@solidjs/web"; var _tmpl$ = "

Foo

"; // @refresh skip export default function Foo() { @@ -54,8 +54,8 @@ export default function Foo() { `; exports[`esm (server, non-hydratable) > ExportDefaultDeclaration w/ FunctionExpression > should skip ExportDefaultDeclaration w/ FunctionExpression with invalid Component name 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; var _tmpl$ = "

Foo

"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -74,8 +74,8 @@ if (import.meta.hot) { `; exports[`esm (server, non-hydratable) > ExportDefaultDeclaration w/ FunctionExpression > should skip ExportDefaultDeclaration w/ FunctionExpression with valid Component name and >1 params 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; var _tmpl$ = "

Foo

"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -94,8 +94,8 @@ if (import.meta.hot) { `; exports[`esm (server, non-hydratable) > ExportDefaultDeclaration w/ FunctionExpression > should transform ExportDefaultDeclaration w/ FunctionExpression with valid Component name and params 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; var _tmpl$ = "

Foo

"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -118,8 +118,8 @@ if (import.meta.hot) { `; exports[`esm (server, non-hydratable) > ExportDefaultDeclaration w/ FunctionExpression > should transform ExportDefaultDeclaration w/ FunctionExpression with valid Component name and params 2`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; var _tmpl$ = "

Foo

"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -142,15 +142,19 @@ if (import.meta.hot) { `; exports[`esm (server, non-hydratable) > ExportDefaultDeclaration w/ FunctionExpression > should transform ExportDefaultDeclaration w/ FunctionExpression with valid Component name and params 3`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; -import { escape as _$escape } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; +import { ssrRunInScope as _$ssrRunInScope } from "@solidjs/web"; +import { escape as _$escape } from "@solidjs/web"; var _tmpl$ = ["

", "

"]; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; const _REGISTRY = _$$registry(); -const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/_$ssr(_tmpl$, _$escape(_props.v0)), { +const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/(() => { + var _v$ = _$ssrRunInScope(() => _$escape(_props.v0)); + return _$ssr(_tmpl$, _v$); +})(), { location: "example.jsx:4:15", signature: "ae0f2a31" }); @@ -173,7 +177,7 @@ if (import.meta.hot) { `; exports[`esm (server, non-hydratable) > ExportDefaultDeclaration w/ FunctionExpression > should transform ExportDefaultDeclaration w/ FunctionExpression with valid Component name and params 4`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; @@ -205,8 +209,8 @@ if (import.meta.hot) { `; exports[`esm (server, non-hydratable) > ExportDefaultDeclaration w/ FunctionExpression > should transform ExportDefaultDeclaration w/ FunctionExpression with valid Component name and params 5`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; var _tmpl$ = "
foo
", _tmpl$2 = "
bar
"; import { $$component as _$$component } from "solid-refresh"; @@ -248,7 +252,7 @@ if (import.meta.hot) { `; exports[`esm (server, non-hydratable) > ExportNamedDeclaration w/ FunctionExpression > should skip ExportNamedDeclaration w/ FunctionExpression with @refresh reload 1`] = ` -"import { ssr as _$ssr } from "solid-js/web"; +"import { ssr as _$ssr } from "@solidjs/web"; var _tmpl$ = "

Foo

"; import { $$decline as _$$decline } from "solid-refresh"; // @refresh reload @@ -261,7 +265,7 @@ if (import.meta.hot) { `; exports[`esm (server, non-hydratable) > ExportNamedDeclaration w/ FunctionExpression > should skip ExportNamedDeclaration w/ FunctionExpression with @refresh skip 1`] = ` -"import { ssr as _$ssr } from "solid-js/web"; +"import { ssr as _$ssr } from "@solidjs/web"; var _tmpl$ = "

Foo

"; // @refresh skip export function Foo() { @@ -270,8 +274,8 @@ export function Foo() { `; exports[`esm (server, non-hydratable) > ExportNamedDeclaration w/ FunctionExpression > should skip ExportNamedDeclaration w/ FunctionExpression with invalid Component name 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; var _tmpl$ = "

Foo

"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -294,8 +298,8 @@ if (import.meta.hot) { `; exports[`esm (server, non-hydratable) > ExportNamedDeclaration w/ FunctionExpression > should skip ExportNamedDeclaration w/ FunctionExpression with valid Component name and >1 params 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; var _tmpl$ = "

Foo

"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -314,8 +318,8 @@ if (import.meta.hot) { `; exports[`esm (server, non-hydratable) > ExportNamedDeclaration w/ FunctionExpression > should transform ExportNamedDeclaration w/ FunctionExpression with valid Component name and params 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; var _tmpl$ = "

Foo

"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -338,8 +342,8 @@ if (import.meta.hot) { `; exports[`esm (server, non-hydratable) > ExportNamedDeclaration w/ FunctionExpression > should transform ExportNamedDeclaration w/ FunctionExpression with valid Component name and params 2`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; var _tmpl$ = "

Foo

"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -362,15 +366,19 @@ if (import.meta.hot) { `; exports[`esm (server, non-hydratable) > ExportNamedDeclaration w/ FunctionExpression > should transform ExportNamedDeclaration w/ FunctionExpression with valid Component name and params 3`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; -import { escape as _$escape } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; +import { ssrRunInScope as _$ssrRunInScope } from "@solidjs/web"; +import { escape as _$escape } from "@solidjs/web"; var _tmpl$ = ["

", "

"]; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; const _REGISTRY = _$$registry(); -const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/_$ssr(_tmpl$, _$escape(_props.v0)), { +const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/(() => { + var _v$ = _$ssrRunInScope(() => _$escape(_props.v0)); + return _$ssr(_tmpl$, _v$); +})(), { location: "example.jsx:4:15", signature: "ae0f2a31" }); @@ -393,7 +401,7 @@ if (import.meta.hot) { `; exports[`esm (server, non-hydratable) > ExportNamedDeclaration w/ FunctionExpression > should transform ExportNamedDeclaration w/ FunctionExpression with valid Component name and params 4`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; @@ -425,8 +433,8 @@ if (import.meta.hot) { `; exports[`esm (server, non-hydratable) > ExportNamedDeclaration w/ FunctionExpression > should transform ExportNamedDeclaration w/ FunctionExpression with valid Component name and params 5`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; var _tmpl$ = "
foo
", _tmpl$2 = "
bar
"; import { $$component as _$$component } from "solid-refresh"; @@ -478,7 +486,7 @@ if (import.meta.hot) { `; exports[`esm (server, non-hydratable) > FunctionDeclaration > should skip FunctionDeclaration with @refresh reload 1`] = ` -"import { ssr as _$ssr } from "solid-js/web"; +"import { ssr as _$ssr } from "@solidjs/web"; var _tmpl$ = "

Foo

"; import { $$decline as _$$decline } from "solid-refresh"; // @refresh reload @@ -491,7 +499,7 @@ if (import.meta.hot) { `; exports[`esm (server, non-hydratable) > FunctionDeclaration > should skip FunctionDeclaration with @refresh skip 1`] = ` -"import { ssr as _$ssr } from "solid-js/web"; +"import { ssr as _$ssr } from "@solidjs/web"; var _tmpl$ = "

Foo

"; // @refresh skip function Foo() { @@ -500,8 +508,8 @@ function Foo() { `; exports[`esm (server, non-hydratable) > FunctionDeclaration > should skip FunctionDeclaration with invalid Component name 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; var _tmpl$ = "

Foo

"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -520,8 +528,8 @@ if (import.meta.hot) { `; exports[`esm (server, non-hydratable) > FunctionDeclaration > should skip FunctionDeclaration with valid Component name and >1 params 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; var _tmpl$ = "

Foo

"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -540,8 +548,8 @@ if (import.meta.hot) { `; exports[`esm (server, non-hydratable) > FunctionDeclaration > should transform FunctionDeclaration with valid Component name and params 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; var _tmpl$ = "

Foo

"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -563,8 +571,8 @@ if (import.meta.hot) { `; exports[`esm (server, non-hydratable) > FunctionDeclaration > should transform FunctionDeclaration with valid Component name and params 2`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; var _tmpl$ = "

Foo

"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -586,16 +594,20 @@ if (import.meta.hot) { `; exports[`esm (server, non-hydratable) > FunctionDeclaration > should transform FunctionDeclaration with valid Component name and params 3`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; -import { escape as _$escape } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; +import { ssrRunInScope as _$ssrRunInScope } from "@solidjs/web"; +import { escape as _$escape } from "@solidjs/web"; var _tmpl$ = ["

", "

"]; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; const example = 'Foo'; const _REGISTRY = _$$registry(); -const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/_$ssr(_tmpl$, _$escape(_props.v0)), { +const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/(() => { + var _v$ = _$ssrRunInScope(() => _$escape(_props.v0)); + return _$ssr(_tmpl$, _v$); +})(), { location: "example.jsx:4:15", signature: "ae0f2a31" }); @@ -616,7 +628,7 @@ if (import.meta.hot) { `; exports[`esm (server, non-hydratable) > FunctionDeclaration > should transform FunctionDeclaration with valid Component name and params 4`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; @@ -647,8 +659,8 @@ if (import.meta.hot) { `; exports[`esm (server, non-hydratable) > FunctionDeclaration > should transform FunctionDeclaration with valid Component name and params 5`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; var _tmpl$ = "
bar
", _tmpl$2 = "
foo
"; import { $$component as _$$component } from "solid-refresh"; @@ -689,7 +701,7 @@ if (import.meta.hot) { `; exports[`esm (server, non-hydratable) > VariableDeclarator > ArrowFunctionExpression > should skip VariableDeclarator w/ ArrowFunctionExpression with @refresh reload 1`] = ` -"import { ssr as _$ssr } from "solid-js/web"; +"import { ssr as _$ssr } from "@solidjs/web"; var _tmpl$ = "

Foo

"; import { $$decline as _$$decline } from "solid-refresh"; // @refresh reload @@ -702,7 +714,7 @@ if (import.meta.hot) { `; exports[`esm (server, non-hydratable) > VariableDeclarator > ArrowFunctionExpression > should skip VariableDeclarator w/ ArrowFunctionExpression with @refresh skip 1`] = ` -"import { ssr as _$ssr } from "solid-js/web"; +"import { ssr as _$ssr } from "@solidjs/web"; var _tmpl$ = "

Foo

"; // @refresh skip const Foo = () => { @@ -711,8 +723,8 @@ const Foo = () => { `; exports[`esm (server, non-hydratable) > VariableDeclarator > ArrowFunctionExpression > should skip VariableDeclarator w/ ArrowFunctionExpression with invalid Component name 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; var _tmpl$ = "

Foo

"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -731,8 +743,8 @@ if (import.meta.hot) { `; exports[`esm (server, non-hydratable) > VariableDeclarator > ArrowFunctionExpression > should skip VariableDeclarator w/ ArrowFunctionExpression with valid Component name and >1 params 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; var _tmpl$ = "

Foo

"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -751,8 +763,8 @@ if (import.meta.hot) { `; exports[`esm (server, non-hydratable) > VariableDeclarator > ArrowFunctionExpression > should transform VariableDeclarator w/ ArrowFunctionExpression with valid Component name and params 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; var _tmpl$ = "

Foo

"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -774,8 +786,8 @@ if (import.meta.hot) { `; exports[`esm (server, non-hydratable) > VariableDeclarator > ArrowFunctionExpression > should transform VariableDeclarator w/ ArrowFunctionExpression with valid Component name and params 2`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; var _tmpl$ = "

Foo

"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -797,16 +809,20 @@ if (import.meta.hot) { `; exports[`esm (server, non-hydratable) > VariableDeclarator > ArrowFunctionExpression > should transform VariableDeclarator w/ ArrowFunctionExpression with valid Component name and params 3`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; -import { escape as _$escape } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; +import { ssrRunInScope as _$ssrRunInScope } from "@solidjs/web"; +import { escape as _$escape } from "@solidjs/web"; var _tmpl$ = ["

", "

"]; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; const example = 'Foo'; const _REGISTRY = _$$registry(); -const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/_$ssr(_tmpl$, _$escape(_props.v0)), { +const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/(() => { + var _v$ = _$ssrRunInScope(() => _$escape(_props.v0)); + return _$ssr(_tmpl$, _v$); +})(), { location: "example.jsx:4:17", signature: "ae0f2a31" }); @@ -827,7 +843,7 @@ if (import.meta.hot) { `; exports[`esm (server, non-hydratable) > VariableDeclarator > ArrowFunctionExpression > should transform VariableDeclarator w/ ArrowFunctionExpression with valid Component name and params 4`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; @@ -858,8 +874,8 @@ if (import.meta.hot) { `; exports[`esm (server, non-hydratable) > VariableDeclarator > ArrowFunctionExpression > should transform VariableDeclarator w/ ArrowFunctionExpression with valid Component name and params 5`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; var _tmpl$ = "
bar
", _tmpl$2 = "
foo
"; import { $$component as _$$component } from "solid-refresh"; @@ -900,7 +916,7 @@ if (import.meta.hot) { `; exports[`esm (server, non-hydratable) > VariableDeclarator > FunctionExpression > should skip VariableDeclarator w/ FunctionExpression with @refresh reload 1`] = ` -"import { ssr as _$ssr } from "solid-js/web"; +"import { ssr as _$ssr } from "@solidjs/web"; var _tmpl$ = "

Foo

"; import { $$decline as _$$decline } from "solid-refresh"; // @refresh reload @@ -913,7 +929,7 @@ if (import.meta.hot) { `; exports[`esm (server, non-hydratable) > VariableDeclarator > FunctionExpression > should skip VariableDeclarator w/ FunctionExpression with @refresh skip 1`] = ` -"import { ssr as _$ssr } from "solid-js/web"; +"import { ssr as _$ssr } from "@solidjs/web"; var _tmpl$ = "

Foo

"; // @refresh skip const Foo = function () { @@ -922,8 +938,8 @@ const Foo = function () { `; exports[`esm (server, non-hydratable) > VariableDeclarator > FunctionExpression > should skip VariableDeclarator w/ FunctionExpression with invalid Component name 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; var _tmpl$ = "

Foo

"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -942,8 +958,8 @@ if (import.meta.hot) { `; exports[`esm (server, non-hydratable) > VariableDeclarator > FunctionExpression > should skip VariableDeclarator w/ FunctionExpression with valid Component name and >1 params 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; var _tmpl$ = "

Foo

"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -962,8 +978,8 @@ if (import.meta.hot) { `; exports[`esm (server, non-hydratable) > VariableDeclarator > FunctionExpression > should transform VariableDeclarator w/ FunctionExpression with valid Component name and params 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; var _tmpl$ = "

Foo

"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -985,8 +1001,8 @@ if (import.meta.hot) { `; exports[`esm (server, non-hydratable) > VariableDeclarator > FunctionExpression > should transform VariableDeclarator w/ FunctionExpression with valid Component name and params 2`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; var _tmpl$ = "

Foo

"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -1008,16 +1024,20 @@ if (import.meta.hot) { `; exports[`esm (server, non-hydratable) > VariableDeclarator > FunctionExpression > should transform VariableDeclarator w/ FunctionExpression with valid Component name and params 3`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; -import { escape as _$escape } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; +import { ssrRunInScope as _$ssrRunInScope } from "@solidjs/web"; +import { escape as _$escape } from "@solidjs/web"; var _tmpl$ = ["

", "

"]; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; const example = 'Foo'; const _REGISTRY = _$$registry(); -const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/_$ssr(_tmpl$, _$escape(_props.v0)), { +const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/(() => { + var _v$ = _$ssrRunInScope(() => _$escape(_props.v0)); + return _$ssr(_tmpl$, _v$); +})(), { location: "example.jsx:4:17", signature: "ae0f2a31" }); @@ -1038,7 +1058,7 @@ if (import.meta.hot) { `; exports[`esm (server, non-hydratable) > VariableDeclarator > FunctionExpression > should transform VariableDeclarator w/ FunctionExpression with valid Component name and params 4`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; @@ -1069,8 +1089,8 @@ if (import.meta.hot) { `; exports[`esm (server, non-hydratable) > VariableDeclarator > FunctionExpression > should transform VariableDeclarator w/ FunctionExpression with valid Component name and params 5`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; var _tmpl$ = "
bar
", _tmpl$2 = "
foo
"; import { $$component as _$$component } from "solid-refresh"; @@ -1111,14 +1131,17 @@ if (import.meta.hot) { `; exports[`esm (server, non-hydratable) > fix build > refs > should work with a function 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; var _tmpl$ = "
Comp
"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; const _REGISTRY = _$$registry(); -const Comp_1 = _$$component(_REGISTRY, "Comp_1", _props => /*@refresh jsx-skip*/_$ssr(_tmpl$), { +const Comp_1 = _$$component(_REGISTRY, "Comp_1", _props => /*@refresh jsx-skip*/(() => { + var _ref$ = _props.v0; + return _$ssr(_tmpl$); +})(), { location: "example.jsx:4:19", signature: "6f76290" }); @@ -1137,14 +1160,17 @@ if (import.meta.hot) { `; exports[`esm (server, non-hydratable) > fix build > refs > should work with a mutable variable 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; var _tmpl$ = "
Comp
"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; const _REGISTRY = _$$registry(); -const Comp_1 = _$$component(_REGISTRY, "Comp_1", _props => /*@refresh jsx-skip*/_$ssr(_tmpl$), { +const Comp_1 = _$$component(_REGISTRY, "Comp_1", _props => /*@refresh jsx-skip*/(() => { + var _ref$ = _props.v0; + return _$ssr(_tmpl$); +})(), { location: "example.jsx:4:19", signature: "6f76290" }); @@ -1169,15 +1195,18 @@ if (import.meta.hot) { `; exports[`esm (server, non-hydratable) > fix build > signals as refs > should work 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; var _tmpl$ = "
Comp
"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; import { createSignal } from 'solid-js'; const _REGISTRY = _$$registry(); -const Comp_1 = _$$component(_REGISTRY, "Comp_1", _props => /*@refresh jsx-skip*/_$ssr(_tmpl$), { +const Comp_1 = _$$component(_REGISTRY, "Comp_1", _props => /*@refresh jsx-skip*/(() => { + var _ref$ = _props.v0; + return _$ssr(_tmpl$); +})(), { location: "example.jsx:6:19", signature: "6f76290" }); @@ -1203,7 +1232,7 @@ if (import.meta.hot) { `; exports[`esm (server, non-hydratable) > fix render > @refresh reload > should work 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; import { $$decline as _$$decline } from "solid-refresh"; // @refresh reload import { render } from 'solid-js/web'; @@ -1217,7 +1246,7 @@ if (import.meta.hot) { `; exports[`esm (server, non-hydratable) > fix render > import specifiers > should work with ImportNamespaceSpecifier 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; @@ -1237,7 +1266,7 @@ if (import.meta.hot) { `; exports[`esm (server, non-hydratable) > fix render > import specifiers > should work with ImportSpecifier + Identifier 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; @@ -1257,7 +1286,7 @@ if (import.meta.hot) { `; exports[`esm (server, non-hydratable) > fix render > import specifiers > should work with ImportSpecifier + aliased Identifier 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; @@ -1277,7 +1306,7 @@ if (import.meta.hot) { `; exports[`esm (server, non-hydratable) > fix render > import specifiers > should work with ImportSpecifier + aliased Identifier from StringLiteral 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; @@ -1297,7 +1326,7 @@ if (import.meta.hot) { `; exports[`esm (server, non-hydratable) > fix render > top-level statements > should work with IfStatement 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; diff --git a/tests/server/__snapshots__/rspack-esm.test.ts.snap b/tests/server/__snapshots__/rspack-esm.test.ts.snap index cd6e6ba..a274f0d 100644 --- a/tests/server/__snapshots__/rspack-esm.test.ts.snap +++ b/tests/server/__snapshots__/rspack-esm.test.ts.snap @@ -8,31 +8,31 @@ if (someCond) { `; exports[`rspack-esm (server, non-hydratable) > Context API > should support ExportNamedDeclaration 1`] = ` -"import { $$context as _$$context } from "solid-refresh"; +"import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; import { createContext } from 'solid-js'; const _REGISTRY = _$$registry(); -export const Example = _$$context(_REGISTRY, "Example", createContext()); +export const Example = _$$component(_REGISTRY, "Example", createContext()); if (import.meta.webpackHot) { _$$refresh("rspack-esm", import.meta.webpackHot, _REGISTRY); }" `; exports[`rspack-esm (server, non-hydratable) > Context API > should support top-level VariableDeclaration 1`] = ` -"import { $$context as _$$context } from "solid-refresh"; +"import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; import { createContext } from 'solid-js'; const _REGISTRY = _$$registry(); -const Example = _$$context(_REGISTRY, "Example", createContext()); +const Example = _$$component(_REGISTRY, "Example", createContext()); if (import.meta.webpackHot) { _$$refresh("rspack-esm", import.meta.webpackHot, _REGISTRY); }" `; exports[`rspack-esm (server, non-hydratable) > ExportDefaultDeclaration w/ FunctionExpression > should skip ExportDefaultDeclaration w/ FunctionExpression with @refresh reload 1`] = ` -"import { ssr as _$ssr } from "solid-js/web"; +"import { ssr as _$ssr } from "@solidjs/web"; var _tmpl$ = "

Foo

"; import { $$decline as _$$decline } from "solid-refresh"; // @refresh reload @@ -45,7 +45,7 @@ if (import.meta.webpackHot) { `; exports[`rspack-esm (server, non-hydratable) > ExportDefaultDeclaration w/ FunctionExpression > should skip ExportDefaultDeclaration w/ FunctionExpression with @refresh skip 1`] = ` -"import { ssr as _$ssr } from "solid-js/web"; +"import { ssr as _$ssr } from "@solidjs/web"; var _tmpl$ = "

Foo

"; // @refresh skip export default function Foo() { @@ -54,8 +54,8 @@ export default function Foo() { `; exports[`rspack-esm (server, non-hydratable) > ExportDefaultDeclaration w/ FunctionExpression > should skip ExportDefaultDeclaration w/ FunctionExpression with invalid Component name 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; var _tmpl$ = "

Foo

"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -74,8 +74,8 @@ if (import.meta.webpackHot) { `; exports[`rspack-esm (server, non-hydratable) > ExportDefaultDeclaration w/ FunctionExpression > should skip ExportDefaultDeclaration w/ FunctionExpression with valid Component name and >1 params 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; var _tmpl$ = "

Foo

"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -94,8 +94,8 @@ if (import.meta.webpackHot) { `; exports[`rspack-esm (server, non-hydratable) > ExportDefaultDeclaration w/ FunctionExpression > should transform ExportDefaultDeclaration w/ FunctionExpression with valid Component name and params 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; var _tmpl$ = "

Foo

"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -118,8 +118,8 @@ if (import.meta.webpackHot) { `; exports[`rspack-esm (server, non-hydratable) > ExportDefaultDeclaration w/ FunctionExpression > should transform ExportDefaultDeclaration w/ FunctionExpression with valid Component name and params 2`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; var _tmpl$ = "

Foo

"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -142,15 +142,19 @@ if (import.meta.webpackHot) { `; exports[`rspack-esm (server, non-hydratable) > ExportDefaultDeclaration w/ FunctionExpression > should transform ExportDefaultDeclaration w/ FunctionExpression with valid Component name and params 3`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; -import { escape as _$escape } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; +import { ssrRunInScope as _$ssrRunInScope } from "@solidjs/web"; +import { escape as _$escape } from "@solidjs/web"; var _tmpl$ = ["

", "

"]; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; const _REGISTRY = _$$registry(); -const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/_$ssr(_tmpl$, _$escape(_props.v0)), { +const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/(() => { + var _v$ = _$ssrRunInScope(() => _$escape(_props.v0)); + return _$ssr(_tmpl$, _v$); +})(), { location: "example.jsx:4:15", signature: "ae0f2a31" }); @@ -173,7 +177,7 @@ if (import.meta.webpackHot) { `; exports[`rspack-esm (server, non-hydratable) > ExportDefaultDeclaration w/ FunctionExpression > should transform ExportDefaultDeclaration w/ FunctionExpression with valid Component name and params 4`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; @@ -205,8 +209,8 @@ if (import.meta.webpackHot) { `; exports[`rspack-esm (server, non-hydratable) > ExportDefaultDeclaration w/ FunctionExpression > should transform ExportDefaultDeclaration w/ FunctionExpression with valid Component name and params 5`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; var _tmpl$ = "
foo
", _tmpl$2 = "
bar
"; import { $$component as _$$component } from "solid-refresh"; @@ -248,7 +252,7 @@ if (import.meta.webpackHot) { `; exports[`rspack-esm (server, non-hydratable) > ExportNamedDeclaration w/ FunctionExpression > should skip ExportNamedDeclaration w/ FunctionExpression with @refresh reload 1`] = ` -"import { ssr as _$ssr } from "solid-js/web"; +"import { ssr as _$ssr } from "@solidjs/web"; var _tmpl$ = "

Foo

"; import { $$decline as _$$decline } from "solid-refresh"; // @refresh reload @@ -261,7 +265,7 @@ if (import.meta.webpackHot) { `; exports[`rspack-esm (server, non-hydratable) > ExportNamedDeclaration w/ FunctionExpression > should skip ExportNamedDeclaration w/ FunctionExpression with @refresh skip 1`] = ` -"import { ssr as _$ssr } from "solid-js/web"; +"import { ssr as _$ssr } from "@solidjs/web"; var _tmpl$ = "

Foo

"; // @refresh skip export function Foo() { @@ -270,8 +274,8 @@ export function Foo() { `; exports[`rspack-esm (server, non-hydratable) > ExportNamedDeclaration w/ FunctionExpression > should skip ExportNamedDeclaration w/ FunctionExpression with invalid Component name 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; var _tmpl$ = "

Foo

"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -294,8 +298,8 @@ if (import.meta.webpackHot) { `; exports[`rspack-esm (server, non-hydratable) > ExportNamedDeclaration w/ FunctionExpression > should skip ExportNamedDeclaration w/ FunctionExpression with valid Component name and >1 params 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; var _tmpl$ = "

Foo

"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -314,8 +318,8 @@ if (import.meta.webpackHot) { `; exports[`rspack-esm (server, non-hydratable) > ExportNamedDeclaration w/ FunctionExpression > should transform ExportNamedDeclaration w/ FunctionExpression with valid Component name and params 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; var _tmpl$ = "

Foo

"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -338,8 +342,8 @@ if (import.meta.webpackHot) { `; exports[`rspack-esm (server, non-hydratable) > ExportNamedDeclaration w/ FunctionExpression > should transform ExportNamedDeclaration w/ FunctionExpression with valid Component name and params 2`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; var _tmpl$ = "

Foo

"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -362,15 +366,19 @@ if (import.meta.webpackHot) { `; exports[`rspack-esm (server, non-hydratable) > ExportNamedDeclaration w/ FunctionExpression > should transform ExportNamedDeclaration w/ FunctionExpression with valid Component name and params 3`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; -import { escape as _$escape } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; +import { ssrRunInScope as _$ssrRunInScope } from "@solidjs/web"; +import { escape as _$escape } from "@solidjs/web"; var _tmpl$ = ["

", "

"]; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; const _REGISTRY = _$$registry(); -const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/_$ssr(_tmpl$, _$escape(_props.v0)), { +const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/(() => { + var _v$ = _$ssrRunInScope(() => _$escape(_props.v0)); + return _$ssr(_tmpl$, _v$); +})(), { location: "example.jsx:4:15", signature: "ae0f2a31" }); @@ -393,7 +401,7 @@ if (import.meta.webpackHot) { `; exports[`rspack-esm (server, non-hydratable) > ExportNamedDeclaration w/ FunctionExpression > should transform ExportNamedDeclaration w/ FunctionExpression with valid Component name and params 4`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; @@ -425,8 +433,8 @@ if (import.meta.webpackHot) { `; exports[`rspack-esm (server, non-hydratable) > ExportNamedDeclaration w/ FunctionExpression > should transform ExportNamedDeclaration w/ FunctionExpression with valid Component name and params 5`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; var _tmpl$ = "
foo
", _tmpl$2 = "
bar
"; import { $$component as _$$component } from "solid-refresh"; @@ -478,7 +486,7 @@ if (import.meta.webpackHot) { `; exports[`rspack-esm (server, non-hydratable) > FunctionDeclaration > should skip FunctionDeclaration with @refresh reload 1`] = ` -"import { ssr as _$ssr } from "solid-js/web"; +"import { ssr as _$ssr } from "@solidjs/web"; var _tmpl$ = "

Foo

"; import { $$decline as _$$decline } from "solid-refresh"; // @refresh reload @@ -491,7 +499,7 @@ if (import.meta.webpackHot) { `; exports[`rspack-esm (server, non-hydratable) > FunctionDeclaration > should skip FunctionDeclaration with @refresh skip 1`] = ` -"import { ssr as _$ssr } from "solid-js/web"; +"import { ssr as _$ssr } from "@solidjs/web"; var _tmpl$ = "

Foo

"; // @refresh skip function Foo() { @@ -500,8 +508,8 @@ function Foo() { `; exports[`rspack-esm (server, non-hydratable) > FunctionDeclaration > should skip FunctionDeclaration with invalid Component name 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; var _tmpl$ = "

Foo

"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -520,8 +528,8 @@ if (import.meta.webpackHot) { `; exports[`rspack-esm (server, non-hydratable) > FunctionDeclaration > should skip FunctionDeclaration with valid Component name and >1 params 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; var _tmpl$ = "

Foo

"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -540,8 +548,8 @@ if (import.meta.webpackHot) { `; exports[`rspack-esm (server, non-hydratable) > FunctionDeclaration > should transform FunctionDeclaration with valid Component name and params 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; var _tmpl$ = "

Foo

"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -563,8 +571,8 @@ if (import.meta.webpackHot) { `; exports[`rspack-esm (server, non-hydratable) > FunctionDeclaration > should transform FunctionDeclaration with valid Component name and params 2`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; var _tmpl$ = "

Foo

"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -586,16 +594,20 @@ if (import.meta.webpackHot) { `; exports[`rspack-esm (server, non-hydratable) > FunctionDeclaration > should transform FunctionDeclaration with valid Component name and params 3`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; -import { escape as _$escape } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; +import { ssrRunInScope as _$ssrRunInScope } from "@solidjs/web"; +import { escape as _$escape } from "@solidjs/web"; var _tmpl$ = ["

", "

"]; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; const example = 'Foo'; const _REGISTRY = _$$registry(); -const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/_$ssr(_tmpl$, _$escape(_props.v0)), { +const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/(() => { + var _v$ = _$ssrRunInScope(() => _$escape(_props.v0)); + return _$ssr(_tmpl$, _v$); +})(), { location: "example.jsx:4:15", signature: "ae0f2a31" }); @@ -616,7 +628,7 @@ if (import.meta.webpackHot) { `; exports[`rspack-esm (server, non-hydratable) > FunctionDeclaration > should transform FunctionDeclaration with valid Component name and params 4`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; @@ -647,8 +659,8 @@ if (import.meta.webpackHot) { `; exports[`rspack-esm (server, non-hydratable) > FunctionDeclaration > should transform FunctionDeclaration with valid Component name and params 5`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; var _tmpl$ = "
bar
", _tmpl$2 = "
foo
"; import { $$component as _$$component } from "solid-refresh"; @@ -689,7 +701,7 @@ if (import.meta.webpackHot) { `; exports[`rspack-esm (server, non-hydratable) > VariableDeclarator > ArrowFunctionExpression > should skip VariableDeclarator w/ ArrowFunctionExpression with @refresh reload 1`] = ` -"import { ssr as _$ssr } from "solid-js/web"; +"import { ssr as _$ssr } from "@solidjs/web"; var _tmpl$ = "

Foo

"; import { $$decline as _$$decline } from "solid-refresh"; // @refresh reload @@ -702,7 +714,7 @@ if (import.meta.webpackHot) { `; exports[`rspack-esm (server, non-hydratable) > VariableDeclarator > ArrowFunctionExpression > should skip VariableDeclarator w/ ArrowFunctionExpression with @refresh skip 1`] = ` -"import { ssr as _$ssr } from "solid-js/web"; +"import { ssr as _$ssr } from "@solidjs/web"; var _tmpl$ = "

Foo

"; // @refresh skip const Foo = () => { @@ -711,8 +723,8 @@ const Foo = () => { `; exports[`rspack-esm (server, non-hydratable) > VariableDeclarator > ArrowFunctionExpression > should skip VariableDeclarator w/ ArrowFunctionExpression with invalid Component name 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; var _tmpl$ = "

Foo

"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -731,8 +743,8 @@ if (import.meta.webpackHot) { `; exports[`rspack-esm (server, non-hydratable) > VariableDeclarator > ArrowFunctionExpression > should skip VariableDeclarator w/ ArrowFunctionExpression with valid Component name and >1 params 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; var _tmpl$ = "

Foo

"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -751,8 +763,8 @@ if (import.meta.webpackHot) { `; exports[`rspack-esm (server, non-hydratable) > VariableDeclarator > ArrowFunctionExpression > should transform VariableDeclarator w/ ArrowFunctionExpression with valid Component name and params 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; var _tmpl$ = "

Foo

"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -774,8 +786,8 @@ if (import.meta.webpackHot) { `; exports[`rspack-esm (server, non-hydratable) > VariableDeclarator > ArrowFunctionExpression > should transform VariableDeclarator w/ ArrowFunctionExpression with valid Component name and params 2`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; var _tmpl$ = "

Foo

"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -797,16 +809,20 @@ if (import.meta.webpackHot) { `; exports[`rspack-esm (server, non-hydratable) > VariableDeclarator > ArrowFunctionExpression > should transform VariableDeclarator w/ ArrowFunctionExpression with valid Component name and params 3`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; -import { escape as _$escape } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; +import { ssrRunInScope as _$ssrRunInScope } from "@solidjs/web"; +import { escape as _$escape } from "@solidjs/web"; var _tmpl$ = ["

", "

"]; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; const example = 'Foo'; const _REGISTRY = _$$registry(); -const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/_$ssr(_tmpl$, _$escape(_props.v0)), { +const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/(() => { + var _v$ = _$ssrRunInScope(() => _$escape(_props.v0)); + return _$ssr(_tmpl$, _v$); +})(), { location: "example.jsx:4:17", signature: "ae0f2a31" }); @@ -827,7 +843,7 @@ if (import.meta.webpackHot) { `; exports[`rspack-esm (server, non-hydratable) > VariableDeclarator > ArrowFunctionExpression > should transform VariableDeclarator w/ ArrowFunctionExpression with valid Component name and params 4`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; @@ -858,8 +874,8 @@ if (import.meta.webpackHot) { `; exports[`rspack-esm (server, non-hydratable) > VariableDeclarator > ArrowFunctionExpression > should transform VariableDeclarator w/ ArrowFunctionExpression with valid Component name and params 5`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; var _tmpl$ = "
bar
", _tmpl$2 = "
foo
"; import { $$component as _$$component } from "solid-refresh"; @@ -900,7 +916,7 @@ if (import.meta.webpackHot) { `; exports[`rspack-esm (server, non-hydratable) > VariableDeclarator > FunctionExpression > should skip VariableDeclarator w/ FunctionExpression with @refresh reload 1`] = ` -"import { ssr as _$ssr } from "solid-js/web"; +"import { ssr as _$ssr } from "@solidjs/web"; var _tmpl$ = "

Foo

"; import { $$decline as _$$decline } from "solid-refresh"; // @refresh reload @@ -913,7 +929,7 @@ if (import.meta.webpackHot) { `; exports[`rspack-esm (server, non-hydratable) > VariableDeclarator > FunctionExpression > should skip VariableDeclarator w/ FunctionExpression with @refresh skip 1`] = ` -"import { ssr as _$ssr } from "solid-js/web"; +"import { ssr as _$ssr } from "@solidjs/web"; var _tmpl$ = "

Foo

"; // @refresh skip const Foo = function () { @@ -922,8 +938,8 @@ const Foo = function () { `; exports[`rspack-esm (server, non-hydratable) > VariableDeclarator > FunctionExpression > should skip VariableDeclarator w/ FunctionExpression with invalid Component name 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; var _tmpl$ = "

Foo

"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -942,8 +958,8 @@ if (import.meta.webpackHot) { `; exports[`rspack-esm (server, non-hydratable) > VariableDeclarator > FunctionExpression > should skip VariableDeclarator w/ FunctionExpression with valid Component name and >1 params 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; var _tmpl$ = "

Foo

"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -962,8 +978,8 @@ if (import.meta.webpackHot) { `; exports[`rspack-esm (server, non-hydratable) > VariableDeclarator > FunctionExpression > should transform VariableDeclarator w/ FunctionExpression with valid Component name and params 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; var _tmpl$ = "

Foo

"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -985,8 +1001,8 @@ if (import.meta.webpackHot) { `; exports[`rspack-esm (server, non-hydratable) > VariableDeclarator > FunctionExpression > should transform VariableDeclarator w/ FunctionExpression with valid Component name and params 2`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; var _tmpl$ = "

Foo

"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -1008,16 +1024,20 @@ if (import.meta.webpackHot) { `; exports[`rspack-esm (server, non-hydratable) > VariableDeclarator > FunctionExpression > should transform VariableDeclarator w/ FunctionExpression with valid Component name and params 3`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; -import { escape as _$escape } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; +import { ssrRunInScope as _$ssrRunInScope } from "@solidjs/web"; +import { escape as _$escape } from "@solidjs/web"; var _tmpl$ = ["

", "

"]; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; const example = 'Foo'; const _REGISTRY = _$$registry(); -const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/_$ssr(_tmpl$, _$escape(_props.v0)), { +const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/(() => { + var _v$ = _$ssrRunInScope(() => _$escape(_props.v0)); + return _$ssr(_tmpl$, _v$); +})(), { location: "example.jsx:4:17", signature: "ae0f2a31" }); @@ -1038,7 +1058,7 @@ if (import.meta.webpackHot) { `; exports[`rspack-esm (server, non-hydratable) > VariableDeclarator > FunctionExpression > should transform VariableDeclarator w/ FunctionExpression with valid Component name and params 4`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; @@ -1069,8 +1089,8 @@ if (import.meta.webpackHot) { `; exports[`rspack-esm (server, non-hydratable) > VariableDeclarator > FunctionExpression > should transform VariableDeclarator w/ FunctionExpression with valid Component name and params 5`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; var _tmpl$ = "
bar
", _tmpl$2 = "
foo
"; import { $$component as _$$component } from "solid-refresh"; @@ -1111,14 +1131,17 @@ if (import.meta.webpackHot) { `; exports[`rspack-esm (server, non-hydratable) > fix build > refs > should work with a function 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; var _tmpl$ = "
Comp
"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; const _REGISTRY = _$$registry(); -const Comp_1 = _$$component(_REGISTRY, "Comp_1", _props => /*@refresh jsx-skip*/_$ssr(_tmpl$), { +const Comp_1 = _$$component(_REGISTRY, "Comp_1", _props => /*@refresh jsx-skip*/(() => { + var _ref$ = _props.v0; + return _$ssr(_tmpl$); +})(), { location: "example.jsx:4:19", signature: "6f76290" }); @@ -1137,14 +1160,17 @@ if (import.meta.webpackHot) { `; exports[`rspack-esm (server, non-hydratable) > fix build > refs > should work with a mutable variable 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; var _tmpl$ = "
Comp
"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; const _REGISTRY = _$$registry(); -const Comp_1 = _$$component(_REGISTRY, "Comp_1", _props => /*@refresh jsx-skip*/_$ssr(_tmpl$), { +const Comp_1 = _$$component(_REGISTRY, "Comp_1", _props => /*@refresh jsx-skip*/(() => { + var _ref$ = _props.v0; + return _$ssr(_tmpl$); +})(), { location: "example.jsx:4:19", signature: "6f76290" }); @@ -1169,15 +1195,18 @@ if (import.meta.webpackHot) { `; exports[`rspack-esm (server, non-hydratable) > fix build > signals as refs > should work 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; var _tmpl$ = "
Comp
"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; import { createSignal } from 'solid-js'; const _REGISTRY = _$$registry(); -const Comp_1 = _$$component(_REGISTRY, "Comp_1", _props => /*@refresh jsx-skip*/_$ssr(_tmpl$), { +const Comp_1 = _$$component(_REGISTRY, "Comp_1", _props => /*@refresh jsx-skip*/(() => { + var _ref$ = _props.v0; + return _$ssr(_tmpl$); +})(), { location: "example.jsx:6:19", signature: "6f76290" }); @@ -1203,7 +1232,7 @@ if (import.meta.webpackHot) { `; exports[`rspack-esm (server, non-hydratable) > fix render > @refresh reload > should work 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; import { $$decline as _$$decline } from "solid-refresh"; // @refresh reload import { render } from 'solid-js/web'; @@ -1217,7 +1246,7 @@ if (import.meta.webpackHot) { `; exports[`rspack-esm (server, non-hydratable) > fix render > import specifiers > should work with ImportNamespaceSpecifier 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; @@ -1237,7 +1266,7 @@ if (import.meta.webpackHot) { `; exports[`rspack-esm (server, non-hydratable) > fix render > import specifiers > should work with ImportSpecifier + Identifier 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; @@ -1257,7 +1286,7 @@ if (import.meta.webpackHot) { `; exports[`rspack-esm (server, non-hydratable) > fix render > import specifiers > should work with ImportSpecifier + aliased Identifier 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; @@ -1277,7 +1306,7 @@ if (import.meta.webpackHot) { `; exports[`rspack-esm (server, non-hydratable) > fix render > import specifiers > should work with ImportSpecifier + aliased Identifier from StringLiteral 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; @@ -1297,7 +1326,7 @@ if (import.meta.webpackHot) { `; exports[`rspack-esm (server, non-hydratable) > fix render > top-level statements > should work with IfStatement 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; diff --git a/tests/server/__snapshots__/standard.test.ts.snap b/tests/server/__snapshots__/standard.test.ts.snap index 7453f95..ac05ea5 100644 --- a/tests/server/__snapshots__/standard.test.ts.snap +++ b/tests/server/__snapshots__/standard.test.ts.snap @@ -8,31 +8,31 @@ if (someCond) { `; exports[`standard (server, non-hydratable) > Context API > should support ExportNamedDeclaration 1`] = ` -"import { $$context as _$$context } from "solid-refresh"; +"import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; import { createContext } from 'solid-js'; const _REGISTRY = _$$registry(); -export const Example = _$$context(_REGISTRY, "Example", createContext()); +export const Example = _$$component(_REGISTRY, "Example", createContext()); if (module.hot) { _$$refresh("standard", module.hot, _REGISTRY); }" `; exports[`standard (server, non-hydratable) > Context API > should support top-level VariableDeclaration 1`] = ` -"import { $$context as _$$context } from "solid-refresh"; +"import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; import { createContext } from 'solid-js'; const _REGISTRY = _$$registry(); -const Example = _$$context(_REGISTRY, "Example", createContext()); +const Example = _$$component(_REGISTRY, "Example", createContext()); if (module.hot) { _$$refresh("standard", module.hot, _REGISTRY); }" `; exports[`standard (server, non-hydratable) > ExportDefaultDeclaration w/ FunctionExpression > should skip ExportDefaultDeclaration w/ FunctionExpression with @refresh reload 1`] = ` -"import { ssr as _$ssr } from "solid-js/web"; +"import { ssr as _$ssr } from "@solidjs/web"; var _tmpl$ = "

Foo

"; import { $$decline as _$$decline } from "solid-refresh"; // @refresh reload @@ -45,7 +45,7 @@ if (module.hot) { `; exports[`standard (server, non-hydratable) > ExportDefaultDeclaration w/ FunctionExpression > should skip ExportDefaultDeclaration w/ FunctionExpression with @refresh skip 1`] = ` -"import { ssr as _$ssr } from "solid-js/web"; +"import { ssr as _$ssr } from "@solidjs/web"; var _tmpl$ = "

Foo

"; // @refresh skip export default function Foo() { @@ -54,8 +54,8 @@ export default function Foo() { `; exports[`standard (server, non-hydratable) > ExportDefaultDeclaration w/ FunctionExpression > should skip ExportDefaultDeclaration w/ FunctionExpression with invalid Component name 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; var _tmpl$ = "

Foo

"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -74,8 +74,8 @@ if (module.hot) { `; exports[`standard (server, non-hydratable) > ExportDefaultDeclaration w/ FunctionExpression > should skip ExportDefaultDeclaration w/ FunctionExpression with valid Component name and >1 params 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; var _tmpl$ = "

Foo

"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -94,8 +94,8 @@ if (module.hot) { `; exports[`standard (server, non-hydratable) > ExportDefaultDeclaration w/ FunctionExpression > should transform ExportDefaultDeclaration w/ FunctionExpression with valid Component name and params 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; var _tmpl$ = "

Foo

"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -118,8 +118,8 @@ if (module.hot) { `; exports[`standard (server, non-hydratable) > ExportDefaultDeclaration w/ FunctionExpression > should transform ExportDefaultDeclaration w/ FunctionExpression with valid Component name and params 2`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; var _tmpl$ = "

Foo

"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -142,15 +142,19 @@ if (module.hot) { `; exports[`standard (server, non-hydratable) > ExportDefaultDeclaration w/ FunctionExpression > should transform ExportDefaultDeclaration w/ FunctionExpression with valid Component name and params 3`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; -import { escape as _$escape } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; +import { ssrRunInScope as _$ssrRunInScope } from "@solidjs/web"; +import { escape as _$escape } from "@solidjs/web"; var _tmpl$ = ["

", "

"]; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; const _REGISTRY = _$$registry(); -const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/_$ssr(_tmpl$, _$escape(_props.v0)), { +const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/(() => { + var _v$ = _$ssrRunInScope(() => _$escape(_props.v0)); + return _$ssr(_tmpl$, _v$); +})(), { location: "example.jsx:4:15", signature: "ae0f2a31" }); @@ -173,7 +177,7 @@ if (module.hot) { `; exports[`standard (server, non-hydratable) > ExportDefaultDeclaration w/ FunctionExpression > should transform ExportDefaultDeclaration w/ FunctionExpression with valid Component name and params 4`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; @@ -205,8 +209,8 @@ if (module.hot) { `; exports[`standard (server, non-hydratable) > ExportDefaultDeclaration w/ FunctionExpression > should transform ExportDefaultDeclaration w/ FunctionExpression with valid Component name and params 5`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; var _tmpl$ = "
foo
", _tmpl$2 = "
bar
"; import { $$component as _$$component } from "solid-refresh"; @@ -248,7 +252,7 @@ if (module.hot) { `; exports[`standard (server, non-hydratable) > ExportNamedDeclaration w/ FunctionExpression > should skip ExportNamedDeclaration w/ FunctionExpression with @refresh reload 1`] = ` -"import { ssr as _$ssr } from "solid-js/web"; +"import { ssr as _$ssr } from "@solidjs/web"; var _tmpl$ = "

Foo

"; import { $$decline as _$$decline } from "solid-refresh"; // @refresh reload @@ -261,7 +265,7 @@ if (module.hot) { `; exports[`standard (server, non-hydratable) > ExportNamedDeclaration w/ FunctionExpression > should skip ExportNamedDeclaration w/ FunctionExpression with @refresh skip 1`] = ` -"import { ssr as _$ssr } from "solid-js/web"; +"import { ssr as _$ssr } from "@solidjs/web"; var _tmpl$ = "

Foo

"; // @refresh skip export function Foo() { @@ -270,8 +274,8 @@ export function Foo() { `; exports[`standard (server, non-hydratable) > ExportNamedDeclaration w/ FunctionExpression > should skip ExportNamedDeclaration w/ FunctionExpression with invalid Component name 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; var _tmpl$ = "

Foo

"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -294,8 +298,8 @@ if (module.hot) { `; exports[`standard (server, non-hydratable) > ExportNamedDeclaration w/ FunctionExpression > should skip ExportNamedDeclaration w/ FunctionExpression with valid Component name and >1 params 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; var _tmpl$ = "

Foo

"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -314,8 +318,8 @@ if (module.hot) { `; exports[`standard (server, non-hydratable) > ExportNamedDeclaration w/ FunctionExpression > should transform ExportNamedDeclaration w/ FunctionExpression with valid Component name and params 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; var _tmpl$ = "

Foo

"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -338,8 +342,8 @@ if (module.hot) { `; exports[`standard (server, non-hydratable) > ExportNamedDeclaration w/ FunctionExpression > should transform ExportNamedDeclaration w/ FunctionExpression with valid Component name and params 2`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; var _tmpl$ = "

Foo

"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -362,15 +366,19 @@ if (module.hot) { `; exports[`standard (server, non-hydratable) > ExportNamedDeclaration w/ FunctionExpression > should transform ExportNamedDeclaration w/ FunctionExpression with valid Component name and params 3`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; -import { escape as _$escape } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; +import { ssrRunInScope as _$ssrRunInScope } from "@solidjs/web"; +import { escape as _$escape } from "@solidjs/web"; var _tmpl$ = ["

", "

"]; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; const _REGISTRY = _$$registry(); -const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/_$ssr(_tmpl$, _$escape(_props.v0)), { +const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/(() => { + var _v$ = _$ssrRunInScope(() => _$escape(_props.v0)); + return _$ssr(_tmpl$, _v$); +})(), { location: "example.jsx:4:15", signature: "ae0f2a31" }); @@ -393,7 +401,7 @@ if (module.hot) { `; exports[`standard (server, non-hydratable) > ExportNamedDeclaration w/ FunctionExpression > should transform ExportNamedDeclaration w/ FunctionExpression with valid Component name and params 4`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; @@ -425,8 +433,8 @@ if (module.hot) { `; exports[`standard (server, non-hydratable) > ExportNamedDeclaration w/ FunctionExpression > should transform ExportNamedDeclaration w/ FunctionExpression with valid Component name and params 5`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; var _tmpl$ = "
foo
", _tmpl$2 = "
bar
"; import { $$component as _$$component } from "solid-refresh"; @@ -478,7 +486,7 @@ if (module.hot) { `; exports[`standard (server, non-hydratable) > FunctionDeclaration > should skip FunctionDeclaration with @refresh reload 1`] = ` -"import { ssr as _$ssr } from "solid-js/web"; +"import { ssr as _$ssr } from "@solidjs/web"; var _tmpl$ = "

Foo

"; import { $$decline as _$$decline } from "solid-refresh"; // @refresh reload @@ -491,7 +499,7 @@ if (module.hot) { `; exports[`standard (server, non-hydratable) > FunctionDeclaration > should skip FunctionDeclaration with @refresh skip 1`] = ` -"import { ssr as _$ssr } from "solid-js/web"; +"import { ssr as _$ssr } from "@solidjs/web"; var _tmpl$ = "

Foo

"; // @refresh skip function Foo() { @@ -500,8 +508,8 @@ function Foo() { `; exports[`standard (server, non-hydratable) > FunctionDeclaration > should skip FunctionDeclaration with invalid Component name 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; var _tmpl$ = "

Foo

"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -520,8 +528,8 @@ if (module.hot) { `; exports[`standard (server, non-hydratable) > FunctionDeclaration > should skip FunctionDeclaration with valid Component name and >1 params 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; var _tmpl$ = "

Foo

"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -540,8 +548,8 @@ if (module.hot) { `; exports[`standard (server, non-hydratable) > FunctionDeclaration > should transform FunctionDeclaration with valid Component name and params 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; var _tmpl$ = "

Foo

"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -563,8 +571,8 @@ if (module.hot) { `; exports[`standard (server, non-hydratable) > FunctionDeclaration > should transform FunctionDeclaration with valid Component name and params 2`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; var _tmpl$ = "

Foo

"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -586,16 +594,20 @@ if (module.hot) { `; exports[`standard (server, non-hydratable) > FunctionDeclaration > should transform FunctionDeclaration with valid Component name and params 3`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; -import { escape as _$escape } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; +import { ssrRunInScope as _$ssrRunInScope } from "@solidjs/web"; +import { escape as _$escape } from "@solidjs/web"; var _tmpl$ = ["

", "

"]; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; const example = 'Foo'; const _REGISTRY = _$$registry(); -const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/_$ssr(_tmpl$, _$escape(_props.v0)), { +const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/(() => { + var _v$ = _$ssrRunInScope(() => _$escape(_props.v0)); + return _$ssr(_tmpl$, _v$); +})(), { location: "example.jsx:4:15", signature: "ae0f2a31" }); @@ -616,7 +628,7 @@ if (module.hot) { `; exports[`standard (server, non-hydratable) > FunctionDeclaration > should transform FunctionDeclaration with valid Component name and params 4`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; @@ -647,8 +659,8 @@ if (module.hot) { `; exports[`standard (server, non-hydratable) > FunctionDeclaration > should transform FunctionDeclaration with valid Component name and params 5`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; var _tmpl$ = "
bar
", _tmpl$2 = "
foo
"; import { $$component as _$$component } from "solid-refresh"; @@ -689,7 +701,7 @@ if (module.hot) { `; exports[`standard (server, non-hydratable) > VariableDeclarator > ArrowFunctionExpression > should skip VariableDeclarator w/ ArrowFunctionExpression with @refresh reload 1`] = ` -"import { ssr as _$ssr } from "solid-js/web"; +"import { ssr as _$ssr } from "@solidjs/web"; var _tmpl$ = "

Foo

"; import { $$decline as _$$decline } from "solid-refresh"; // @refresh reload @@ -702,7 +714,7 @@ if (module.hot) { `; exports[`standard (server, non-hydratable) > VariableDeclarator > ArrowFunctionExpression > should skip VariableDeclarator w/ ArrowFunctionExpression with @refresh skip 1`] = ` -"import { ssr as _$ssr } from "solid-js/web"; +"import { ssr as _$ssr } from "@solidjs/web"; var _tmpl$ = "

Foo

"; // @refresh skip const Foo = () => { @@ -711,8 +723,8 @@ const Foo = () => { `; exports[`standard (server, non-hydratable) > VariableDeclarator > ArrowFunctionExpression > should skip VariableDeclarator w/ ArrowFunctionExpression with invalid Component name 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; var _tmpl$ = "

Foo

"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -731,8 +743,8 @@ if (module.hot) { `; exports[`standard (server, non-hydratable) > VariableDeclarator > ArrowFunctionExpression > should skip VariableDeclarator w/ ArrowFunctionExpression with valid Component name and >1 params 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; var _tmpl$ = "

Foo

"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -751,8 +763,8 @@ if (module.hot) { `; exports[`standard (server, non-hydratable) > VariableDeclarator > ArrowFunctionExpression > should transform VariableDeclarator w/ ArrowFunctionExpression with valid Component name and params 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; var _tmpl$ = "

Foo

"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -774,8 +786,8 @@ if (module.hot) { `; exports[`standard (server, non-hydratable) > VariableDeclarator > ArrowFunctionExpression > should transform VariableDeclarator w/ ArrowFunctionExpression with valid Component name and params 2`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; var _tmpl$ = "

Foo

"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -797,16 +809,20 @@ if (module.hot) { `; exports[`standard (server, non-hydratable) > VariableDeclarator > ArrowFunctionExpression > should transform VariableDeclarator w/ ArrowFunctionExpression with valid Component name and params 3`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; -import { escape as _$escape } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; +import { ssrRunInScope as _$ssrRunInScope } from "@solidjs/web"; +import { escape as _$escape } from "@solidjs/web"; var _tmpl$ = ["

", "

"]; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; const example = 'Foo'; const _REGISTRY = _$$registry(); -const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/_$ssr(_tmpl$, _$escape(_props.v0)), { +const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/(() => { + var _v$ = _$ssrRunInScope(() => _$escape(_props.v0)); + return _$ssr(_tmpl$, _v$); +})(), { location: "example.jsx:4:17", signature: "ae0f2a31" }); @@ -827,7 +843,7 @@ if (module.hot) { `; exports[`standard (server, non-hydratable) > VariableDeclarator > ArrowFunctionExpression > should transform VariableDeclarator w/ ArrowFunctionExpression with valid Component name and params 4`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; @@ -858,8 +874,8 @@ if (module.hot) { `; exports[`standard (server, non-hydratable) > VariableDeclarator > ArrowFunctionExpression > should transform VariableDeclarator w/ ArrowFunctionExpression with valid Component name and params 5`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; var _tmpl$ = "
bar
", _tmpl$2 = "
foo
"; import { $$component as _$$component } from "solid-refresh"; @@ -900,7 +916,7 @@ if (module.hot) { `; exports[`standard (server, non-hydratable) > VariableDeclarator > FunctionExpression > should skip VariableDeclarator w/ FunctionExpression with @refresh reload 1`] = ` -"import { ssr as _$ssr } from "solid-js/web"; +"import { ssr as _$ssr } from "@solidjs/web"; var _tmpl$ = "

Foo

"; import { $$decline as _$$decline } from "solid-refresh"; // @refresh reload @@ -913,7 +929,7 @@ if (module.hot) { `; exports[`standard (server, non-hydratable) > VariableDeclarator > FunctionExpression > should skip VariableDeclarator w/ FunctionExpression with @refresh skip 1`] = ` -"import { ssr as _$ssr } from "solid-js/web"; +"import { ssr as _$ssr } from "@solidjs/web"; var _tmpl$ = "

Foo

"; // @refresh skip const Foo = function () { @@ -922,8 +938,8 @@ const Foo = function () { `; exports[`standard (server, non-hydratable) > VariableDeclarator > FunctionExpression > should skip VariableDeclarator w/ FunctionExpression with invalid Component name 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; var _tmpl$ = "

Foo

"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -942,8 +958,8 @@ if (module.hot) { `; exports[`standard (server, non-hydratable) > VariableDeclarator > FunctionExpression > should skip VariableDeclarator w/ FunctionExpression with valid Component name and >1 params 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; var _tmpl$ = "

Foo

"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -962,8 +978,8 @@ if (module.hot) { `; exports[`standard (server, non-hydratable) > VariableDeclarator > FunctionExpression > should transform VariableDeclarator w/ FunctionExpression with valid Component name and params 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; var _tmpl$ = "

Foo

"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -985,8 +1001,8 @@ if (module.hot) { `; exports[`standard (server, non-hydratable) > VariableDeclarator > FunctionExpression > should transform VariableDeclarator w/ FunctionExpression with valid Component name and params 2`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; var _tmpl$ = "

Foo

"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -1008,16 +1024,20 @@ if (module.hot) { `; exports[`standard (server, non-hydratable) > VariableDeclarator > FunctionExpression > should transform VariableDeclarator w/ FunctionExpression with valid Component name and params 3`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; -import { escape as _$escape } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; +import { ssrRunInScope as _$ssrRunInScope } from "@solidjs/web"; +import { escape as _$escape } from "@solidjs/web"; var _tmpl$ = ["

", "

"]; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; const example = 'Foo'; const _REGISTRY = _$$registry(); -const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/_$ssr(_tmpl$, _$escape(_props.v0)), { +const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/(() => { + var _v$ = _$ssrRunInScope(() => _$escape(_props.v0)); + return _$ssr(_tmpl$, _v$); +})(), { location: "example.jsx:4:17", signature: "ae0f2a31" }); @@ -1038,7 +1058,7 @@ if (module.hot) { `; exports[`standard (server, non-hydratable) > VariableDeclarator > FunctionExpression > should transform VariableDeclarator w/ FunctionExpression with valid Component name and params 4`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; @@ -1069,8 +1089,8 @@ if (module.hot) { `; exports[`standard (server, non-hydratable) > VariableDeclarator > FunctionExpression > should transform VariableDeclarator w/ FunctionExpression with valid Component name and params 5`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; var _tmpl$ = "
bar
", _tmpl$2 = "
foo
"; import { $$component as _$$component } from "solid-refresh"; @@ -1111,14 +1131,17 @@ if (module.hot) { `; exports[`standard (server, non-hydratable) > fix build > refs > should work with a function 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; var _tmpl$ = "
Comp
"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; const _REGISTRY = _$$registry(); -const Comp_1 = _$$component(_REGISTRY, "Comp_1", _props => /*@refresh jsx-skip*/_$ssr(_tmpl$), { +const Comp_1 = _$$component(_REGISTRY, "Comp_1", _props => /*@refresh jsx-skip*/(() => { + var _ref$ = _props.v0; + return _$ssr(_tmpl$); +})(), { location: "example.jsx:4:19", signature: "6f76290" }); @@ -1137,14 +1160,17 @@ if (module.hot) { `; exports[`standard (server, non-hydratable) > fix build > refs > should work with a mutable variable 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; var _tmpl$ = "
Comp
"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; const _REGISTRY = _$$registry(); -const Comp_1 = _$$component(_REGISTRY, "Comp_1", _props => /*@refresh jsx-skip*/_$ssr(_tmpl$), { +const Comp_1 = _$$component(_REGISTRY, "Comp_1", _props => /*@refresh jsx-skip*/(() => { + var _ref$ = _props.v0; + return _$ssr(_tmpl$); +})(), { location: "example.jsx:4:19", signature: "6f76290" }); @@ -1169,15 +1195,18 @@ if (module.hot) { `; exports[`standard (server, non-hydratable) > fix build > signals as refs > should work 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; var _tmpl$ = "
Comp
"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; import { createSignal } from 'solid-js'; const _REGISTRY = _$$registry(); -const Comp_1 = _$$component(_REGISTRY, "Comp_1", _props => /*@refresh jsx-skip*/_$ssr(_tmpl$), { +const Comp_1 = _$$component(_REGISTRY, "Comp_1", _props => /*@refresh jsx-skip*/(() => { + var _ref$ = _props.v0; + return _$ssr(_tmpl$); +})(), { location: "example.jsx:6:19", signature: "6f76290" }); @@ -1203,7 +1232,7 @@ if (module.hot) { `; exports[`standard (server, non-hydratable) > fix render > @refresh reload > should work 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; import { $$decline as _$$decline } from "solid-refresh"; // @refresh reload import { render } from 'solid-js/web'; @@ -1217,7 +1246,7 @@ if (module.hot) { `; exports[`standard (server, non-hydratable) > fix render > import specifiers > should work with ImportNamespaceSpecifier 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; @@ -1237,7 +1266,7 @@ if (module.hot) { `; exports[`standard (server, non-hydratable) > fix render > import specifiers > should work with ImportSpecifier + Identifier 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; @@ -1257,7 +1286,7 @@ if (module.hot) { `; exports[`standard (server, non-hydratable) > fix render > import specifiers > should work with ImportSpecifier + aliased Identifier 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; @@ -1277,7 +1306,7 @@ if (module.hot) { `; exports[`standard (server, non-hydratable) > fix render > import specifiers > should work with ImportSpecifier + aliased Identifier from StringLiteral 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; @@ -1297,7 +1326,7 @@ if (module.hot) { `; exports[`standard (server, non-hydratable) > fix render > top-level statements > should work with IfStatement 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; diff --git a/tests/server/__snapshots__/vite.test.ts.snap b/tests/server/__snapshots__/vite.test.ts.snap index d900976..cb132ef 100644 --- a/tests/server/__snapshots__/vite.test.ts.snap +++ b/tests/server/__snapshots__/vite.test.ts.snap @@ -8,31 +8,31 @@ if (someCond) { `; exports[`vite (server, non-hydratable) > Context API > should support ExportNamedDeclaration 1`] = ` -"import { $$context as _$$context } from "solid-refresh"; +"import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; import { createContext } from 'solid-js'; const _REGISTRY = _$$registry(); -export const Example = _$$context(_REGISTRY, "Example", createContext()); +export const Example = _$$component(_REGISTRY, "Example", createContext()); if (import.meta.hot) { _$$refresh("vite", import.meta.hot, _REGISTRY); }" `; exports[`vite (server, non-hydratable) > Context API > should support top-level VariableDeclaration 1`] = ` -"import { $$context as _$$context } from "solid-refresh"; +"import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; import { createContext } from 'solid-js'; const _REGISTRY = _$$registry(); -const Example = _$$context(_REGISTRY, "Example", createContext()); +const Example = _$$component(_REGISTRY, "Example", createContext()); if (import.meta.hot) { _$$refresh("vite", import.meta.hot, _REGISTRY); }" `; exports[`vite (server, non-hydratable) > ExportDefaultDeclaration w/ FunctionExpression > should skip ExportDefaultDeclaration w/ FunctionExpression with @refresh reload 1`] = ` -"import { ssr as _$ssr } from "solid-js/web"; +"import { ssr as _$ssr } from "@solidjs/web"; var _tmpl$ = "

Foo

"; // @refresh reload export default function Foo() { @@ -44,7 +44,7 @@ if (import.meta.hot) { `; exports[`vite (server, non-hydratable) > ExportDefaultDeclaration w/ FunctionExpression > should skip ExportDefaultDeclaration w/ FunctionExpression with @refresh skip 1`] = ` -"import { ssr as _$ssr } from "solid-js/web"; +"import { ssr as _$ssr } from "@solidjs/web"; var _tmpl$ = "

Foo

"; // @refresh skip export default function Foo() { @@ -53,8 +53,8 @@ export default function Foo() { `; exports[`vite (server, non-hydratable) > ExportDefaultDeclaration w/ FunctionExpression > should skip ExportDefaultDeclaration w/ FunctionExpression with invalid Component name 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; var _tmpl$ = "

Foo

"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -73,8 +73,8 @@ if (import.meta.hot) { `; exports[`vite (server, non-hydratable) > ExportDefaultDeclaration w/ FunctionExpression > should skip ExportDefaultDeclaration w/ FunctionExpression with valid Component name and >1 params 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; var _tmpl$ = "

Foo

"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -93,8 +93,8 @@ if (import.meta.hot) { `; exports[`vite (server, non-hydratable) > ExportDefaultDeclaration w/ FunctionExpression > should transform ExportDefaultDeclaration w/ FunctionExpression with valid Component name and params 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; var _tmpl$ = "

Foo

"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -117,8 +117,8 @@ if (import.meta.hot) { `; exports[`vite (server, non-hydratable) > ExportDefaultDeclaration w/ FunctionExpression > should transform ExportDefaultDeclaration w/ FunctionExpression with valid Component name and params 2`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; var _tmpl$ = "

Foo

"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -141,15 +141,19 @@ if (import.meta.hot) { `; exports[`vite (server, non-hydratable) > ExportDefaultDeclaration w/ FunctionExpression > should transform ExportDefaultDeclaration w/ FunctionExpression with valid Component name and params 3`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; -import { escape as _$escape } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; +import { ssrRunInScope as _$ssrRunInScope } from "@solidjs/web"; +import { escape as _$escape } from "@solidjs/web"; var _tmpl$ = ["

", "

"]; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; const _REGISTRY = _$$registry(); -const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/_$ssr(_tmpl$, _$escape(_props.v0)), { +const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/(() => { + var _v$ = _$ssrRunInScope(() => _$escape(_props.v0)); + return _$ssr(_tmpl$, _v$); +})(), { location: "example.jsx:4:15", signature: "ae0f2a31" }); @@ -172,7 +176,7 @@ if (import.meta.hot) { `; exports[`vite (server, non-hydratable) > ExportDefaultDeclaration w/ FunctionExpression > should transform ExportDefaultDeclaration w/ FunctionExpression with valid Component name and params 4`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; @@ -204,8 +208,8 @@ if (import.meta.hot) { `; exports[`vite (server, non-hydratable) > ExportDefaultDeclaration w/ FunctionExpression > should transform ExportDefaultDeclaration w/ FunctionExpression with valid Component name and params 5`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; var _tmpl$ = "
foo
", _tmpl$2 = "
bar
"; import { $$component as _$$component } from "solid-refresh"; @@ -247,7 +251,7 @@ if (import.meta.hot) { `; exports[`vite (server, non-hydratable) > ExportNamedDeclaration w/ FunctionExpression > should skip ExportNamedDeclaration w/ FunctionExpression with @refresh reload 1`] = ` -"import { ssr as _$ssr } from "solid-js/web"; +"import { ssr as _$ssr } from "@solidjs/web"; var _tmpl$ = "

Foo

"; // @refresh reload export function Foo() { @@ -259,7 +263,7 @@ if (import.meta.hot) { `; exports[`vite (server, non-hydratable) > ExportNamedDeclaration w/ FunctionExpression > should skip ExportNamedDeclaration w/ FunctionExpression with @refresh skip 1`] = ` -"import { ssr as _$ssr } from "solid-js/web"; +"import { ssr as _$ssr } from "@solidjs/web"; var _tmpl$ = "

Foo

"; // @refresh skip export function Foo() { @@ -268,8 +272,8 @@ export function Foo() { `; exports[`vite (server, non-hydratable) > ExportNamedDeclaration w/ FunctionExpression > should skip ExportNamedDeclaration w/ FunctionExpression with invalid Component name 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; var _tmpl$ = "

Foo

"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -292,8 +296,8 @@ if (import.meta.hot) { `; exports[`vite (server, non-hydratable) > ExportNamedDeclaration w/ FunctionExpression > should skip ExportNamedDeclaration w/ FunctionExpression with valid Component name and >1 params 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; var _tmpl$ = "

Foo

"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -312,8 +316,8 @@ if (import.meta.hot) { `; exports[`vite (server, non-hydratable) > ExportNamedDeclaration w/ FunctionExpression > should transform ExportNamedDeclaration w/ FunctionExpression with valid Component name and params 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; var _tmpl$ = "

Foo

"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -336,8 +340,8 @@ if (import.meta.hot) { `; exports[`vite (server, non-hydratable) > ExportNamedDeclaration w/ FunctionExpression > should transform ExportNamedDeclaration w/ FunctionExpression with valid Component name and params 2`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; var _tmpl$ = "

Foo

"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -360,15 +364,19 @@ if (import.meta.hot) { `; exports[`vite (server, non-hydratable) > ExportNamedDeclaration w/ FunctionExpression > should transform ExportNamedDeclaration w/ FunctionExpression with valid Component name and params 3`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; -import { escape as _$escape } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; +import { ssrRunInScope as _$ssrRunInScope } from "@solidjs/web"; +import { escape as _$escape } from "@solidjs/web"; var _tmpl$ = ["

", "

"]; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; const _REGISTRY = _$$registry(); -const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/_$ssr(_tmpl$, _$escape(_props.v0)), { +const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/(() => { + var _v$ = _$ssrRunInScope(() => _$escape(_props.v0)); + return _$ssr(_tmpl$, _v$); +})(), { location: "example.jsx:4:15", signature: "ae0f2a31" }); @@ -391,7 +399,7 @@ if (import.meta.hot) { `; exports[`vite (server, non-hydratable) > ExportNamedDeclaration w/ FunctionExpression > should transform ExportNamedDeclaration w/ FunctionExpression with valid Component name and params 4`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; @@ -423,8 +431,8 @@ if (import.meta.hot) { `; exports[`vite (server, non-hydratable) > ExportNamedDeclaration w/ FunctionExpression > should transform ExportNamedDeclaration w/ FunctionExpression with valid Component name and params 5`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; var _tmpl$ = "
foo
", _tmpl$2 = "
bar
"; import { $$component as _$$component } from "solid-refresh"; @@ -476,7 +484,7 @@ if (import.meta.hot) { `; exports[`vite (server, non-hydratable) > FunctionDeclaration > should skip FunctionDeclaration with @refresh reload 1`] = ` -"import { ssr as _$ssr } from "solid-js/web"; +"import { ssr as _$ssr } from "@solidjs/web"; var _tmpl$ = "

Foo

"; // @refresh reload function Foo() { @@ -488,7 +496,7 @@ if (import.meta.hot) { `; exports[`vite (server, non-hydratable) > FunctionDeclaration > should skip FunctionDeclaration with @refresh skip 1`] = ` -"import { ssr as _$ssr } from "solid-js/web"; +"import { ssr as _$ssr } from "@solidjs/web"; var _tmpl$ = "

Foo

"; // @refresh skip function Foo() { @@ -497,8 +505,8 @@ function Foo() { `; exports[`vite (server, non-hydratable) > FunctionDeclaration > should skip FunctionDeclaration with invalid Component name 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; var _tmpl$ = "

Foo

"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -517,8 +525,8 @@ if (import.meta.hot) { `; exports[`vite (server, non-hydratable) > FunctionDeclaration > should skip FunctionDeclaration with valid Component name and >1 params 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; var _tmpl$ = "

Foo

"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -537,8 +545,8 @@ if (import.meta.hot) { `; exports[`vite (server, non-hydratable) > FunctionDeclaration > should transform FunctionDeclaration with valid Component name and params 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; var _tmpl$ = "

Foo

"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -560,8 +568,8 @@ if (import.meta.hot) { `; exports[`vite (server, non-hydratable) > FunctionDeclaration > should transform FunctionDeclaration with valid Component name and params 2`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; var _tmpl$ = "

Foo

"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -583,16 +591,20 @@ if (import.meta.hot) { `; exports[`vite (server, non-hydratable) > FunctionDeclaration > should transform FunctionDeclaration with valid Component name and params 3`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; -import { escape as _$escape } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; +import { ssrRunInScope as _$ssrRunInScope } from "@solidjs/web"; +import { escape as _$escape } from "@solidjs/web"; var _tmpl$ = ["

", "

"]; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; const example = 'Foo'; const _REGISTRY = _$$registry(); -const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/_$ssr(_tmpl$, _$escape(_props.v0)), { +const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/(() => { + var _v$ = _$ssrRunInScope(() => _$escape(_props.v0)); + return _$ssr(_tmpl$, _v$); +})(), { location: "example.jsx:4:15", signature: "ae0f2a31" }); @@ -613,7 +625,7 @@ if (import.meta.hot) { `; exports[`vite (server, non-hydratable) > FunctionDeclaration > should transform FunctionDeclaration with valid Component name and params 4`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; @@ -644,8 +656,8 @@ if (import.meta.hot) { `; exports[`vite (server, non-hydratable) > FunctionDeclaration > should transform FunctionDeclaration with valid Component name and params 5`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; var _tmpl$ = "
bar
", _tmpl$2 = "
foo
"; import { $$component as _$$component } from "solid-refresh"; @@ -686,7 +698,7 @@ if (import.meta.hot) { `; exports[`vite (server, non-hydratable) > VariableDeclarator > ArrowFunctionExpression > should skip VariableDeclarator w/ ArrowFunctionExpression with @refresh reload 1`] = ` -"import { ssr as _$ssr } from "solid-js/web"; +"import { ssr as _$ssr } from "@solidjs/web"; var _tmpl$ = "

Foo

"; // @refresh reload const Foo = () => { @@ -698,7 +710,7 @@ if (import.meta.hot) { `; exports[`vite (server, non-hydratable) > VariableDeclarator > ArrowFunctionExpression > should skip VariableDeclarator w/ ArrowFunctionExpression with @refresh skip 1`] = ` -"import { ssr as _$ssr } from "solid-js/web"; +"import { ssr as _$ssr } from "@solidjs/web"; var _tmpl$ = "

Foo

"; // @refresh skip const Foo = () => { @@ -707,8 +719,8 @@ const Foo = () => { `; exports[`vite (server, non-hydratable) > VariableDeclarator > ArrowFunctionExpression > should skip VariableDeclarator w/ ArrowFunctionExpression with invalid Component name 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; var _tmpl$ = "

Foo

"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -727,8 +739,8 @@ if (import.meta.hot) { `; exports[`vite (server, non-hydratable) > VariableDeclarator > ArrowFunctionExpression > should skip VariableDeclarator w/ ArrowFunctionExpression with valid Component name and >1 params 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; var _tmpl$ = "

Foo

"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -747,8 +759,8 @@ if (import.meta.hot) { `; exports[`vite (server, non-hydratable) > VariableDeclarator > ArrowFunctionExpression > should transform VariableDeclarator w/ ArrowFunctionExpression with valid Component name and params 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; var _tmpl$ = "

Foo

"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -770,8 +782,8 @@ if (import.meta.hot) { `; exports[`vite (server, non-hydratable) > VariableDeclarator > ArrowFunctionExpression > should transform VariableDeclarator w/ ArrowFunctionExpression with valid Component name and params 2`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; var _tmpl$ = "

Foo

"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -793,16 +805,20 @@ if (import.meta.hot) { `; exports[`vite (server, non-hydratable) > VariableDeclarator > ArrowFunctionExpression > should transform VariableDeclarator w/ ArrowFunctionExpression with valid Component name and params 3`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; -import { escape as _$escape } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; +import { ssrRunInScope as _$ssrRunInScope } from "@solidjs/web"; +import { escape as _$escape } from "@solidjs/web"; var _tmpl$ = ["

", "

"]; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; const example = 'Foo'; const _REGISTRY = _$$registry(); -const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/_$ssr(_tmpl$, _$escape(_props.v0)), { +const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/(() => { + var _v$ = _$ssrRunInScope(() => _$escape(_props.v0)); + return _$ssr(_tmpl$, _v$); +})(), { location: "example.jsx:4:17", signature: "ae0f2a31" }); @@ -823,7 +839,7 @@ if (import.meta.hot) { `; exports[`vite (server, non-hydratable) > VariableDeclarator > ArrowFunctionExpression > should transform VariableDeclarator w/ ArrowFunctionExpression with valid Component name and params 4`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; @@ -854,8 +870,8 @@ if (import.meta.hot) { `; exports[`vite (server, non-hydratable) > VariableDeclarator > ArrowFunctionExpression > should transform VariableDeclarator w/ ArrowFunctionExpression with valid Component name and params 5`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; var _tmpl$ = "
bar
", _tmpl$2 = "
foo
"; import { $$component as _$$component } from "solid-refresh"; @@ -896,7 +912,7 @@ if (import.meta.hot) { `; exports[`vite (server, non-hydratable) > VariableDeclarator > FunctionExpression > should skip VariableDeclarator w/ FunctionExpression with @refresh reload 1`] = ` -"import { ssr as _$ssr } from "solid-js/web"; +"import { ssr as _$ssr } from "@solidjs/web"; var _tmpl$ = "

Foo

"; // @refresh reload const Foo = function () { @@ -908,7 +924,7 @@ if (import.meta.hot) { `; exports[`vite (server, non-hydratable) > VariableDeclarator > FunctionExpression > should skip VariableDeclarator w/ FunctionExpression with @refresh skip 1`] = ` -"import { ssr as _$ssr } from "solid-js/web"; +"import { ssr as _$ssr } from "@solidjs/web"; var _tmpl$ = "

Foo

"; // @refresh skip const Foo = function () { @@ -917,8 +933,8 @@ const Foo = function () { `; exports[`vite (server, non-hydratable) > VariableDeclarator > FunctionExpression > should skip VariableDeclarator w/ FunctionExpression with invalid Component name 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; var _tmpl$ = "

Foo

"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -937,8 +953,8 @@ if (import.meta.hot) { `; exports[`vite (server, non-hydratable) > VariableDeclarator > FunctionExpression > should skip VariableDeclarator w/ FunctionExpression with valid Component name and >1 params 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; var _tmpl$ = "

Foo

"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -957,8 +973,8 @@ if (import.meta.hot) { `; exports[`vite (server, non-hydratable) > VariableDeclarator > FunctionExpression > should transform VariableDeclarator w/ FunctionExpression with valid Component name and params 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; var _tmpl$ = "

Foo

"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -980,8 +996,8 @@ if (import.meta.hot) { `; exports[`vite (server, non-hydratable) > VariableDeclarator > FunctionExpression > should transform VariableDeclarator w/ FunctionExpression with valid Component name and params 2`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; var _tmpl$ = "

Foo

"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -1003,16 +1019,20 @@ if (import.meta.hot) { `; exports[`vite (server, non-hydratable) > VariableDeclarator > FunctionExpression > should transform VariableDeclarator w/ FunctionExpression with valid Component name and params 3`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; -import { escape as _$escape } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; +import { ssrRunInScope as _$ssrRunInScope } from "@solidjs/web"; +import { escape as _$escape } from "@solidjs/web"; var _tmpl$ = ["

", "

"]; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; const example = 'Foo'; const _REGISTRY = _$$registry(); -const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/_$ssr(_tmpl$, _$escape(_props.v0)), { +const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/(() => { + var _v$ = _$ssrRunInScope(() => _$escape(_props.v0)); + return _$ssr(_tmpl$, _v$); +})(), { location: "example.jsx:4:17", signature: "ae0f2a31" }); @@ -1033,7 +1053,7 @@ if (import.meta.hot) { `; exports[`vite (server, non-hydratable) > VariableDeclarator > FunctionExpression > should transform VariableDeclarator w/ FunctionExpression with valid Component name and params 4`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; @@ -1064,8 +1084,8 @@ if (import.meta.hot) { `; exports[`vite (server, non-hydratable) > VariableDeclarator > FunctionExpression > should transform VariableDeclarator w/ FunctionExpression with valid Component name and params 5`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; var _tmpl$ = "
bar
", _tmpl$2 = "
foo
"; import { $$component as _$$component } from "solid-refresh"; @@ -1106,14 +1126,17 @@ if (import.meta.hot) { `; exports[`vite (server, non-hydratable) > fix build > refs > should work with a function 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; var _tmpl$ = "
Comp
"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; const _REGISTRY = _$$registry(); -const Comp_1 = _$$component(_REGISTRY, "Comp_1", _props => /*@refresh jsx-skip*/_$ssr(_tmpl$), { +const Comp_1 = _$$component(_REGISTRY, "Comp_1", _props => /*@refresh jsx-skip*/(() => { + var _ref$ = _props.v0; + return _$ssr(_tmpl$); +})(), { location: "example.jsx:4:19", signature: "6f76290" }); @@ -1132,14 +1155,17 @@ if (import.meta.hot) { `; exports[`vite (server, non-hydratable) > fix build > refs > should work with a mutable variable 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; var _tmpl$ = "
Comp
"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; const _REGISTRY = _$$registry(); -const Comp_1 = _$$component(_REGISTRY, "Comp_1", _props => /*@refresh jsx-skip*/_$ssr(_tmpl$), { +const Comp_1 = _$$component(_REGISTRY, "Comp_1", _props => /*@refresh jsx-skip*/(() => { + var _ref$ = _props.v0; + return _$ssr(_tmpl$); +})(), { location: "example.jsx:4:19", signature: "6f76290" }); @@ -1164,15 +1190,18 @@ if (import.meta.hot) { `; exports[`vite (server, non-hydratable) > fix build > signals as refs > should work 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; var _tmpl$ = "
Comp
"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; import { createSignal } from 'solid-js'; const _REGISTRY = _$$registry(); -const Comp_1 = _$$component(_REGISTRY, "Comp_1", _props => /*@refresh jsx-skip*/_$ssr(_tmpl$), { +const Comp_1 = _$$component(_REGISTRY, "Comp_1", _props => /*@refresh jsx-skip*/(() => { + var _ref$ = _props.v0; + return _$ssr(_tmpl$); +})(), { location: "example.jsx:6:19", signature: "6f76290" }); @@ -1198,7 +1227,7 @@ if (import.meta.hot) { `; exports[`vite (server, non-hydratable) > fix render > @refresh reload > should work 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; // @refresh reload import { render } from 'solid-js/web'; if (root) { @@ -1211,7 +1240,7 @@ if (import.meta.hot) { `; exports[`vite (server, non-hydratable) > fix render > import specifiers > should work with ImportNamespaceSpecifier 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; @@ -1231,7 +1260,7 @@ if (import.meta.hot) { `; exports[`vite (server, non-hydratable) > fix render > import specifiers > should work with ImportSpecifier + Identifier 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; @@ -1251,7 +1280,7 @@ if (import.meta.hot) { `; exports[`vite (server, non-hydratable) > fix render > import specifiers > should work with ImportSpecifier + aliased Identifier 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; @@ -1271,7 +1300,7 @@ if (import.meta.hot) { `; exports[`vite (server, non-hydratable) > fix render > import specifiers > should work with ImportSpecifier + aliased Identifier from StringLiteral 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; @@ -1291,7 +1320,7 @@ if (import.meta.hot) { `; exports[`vite (server, non-hydratable) > fix render > top-level statements > should work with IfStatement 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; diff --git a/tests/server/__snapshots__/webpack5.test.ts.snap b/tests/server/__snapshots__/webpack5.test.ts.snap index 42cef93..61200d7 100644 --- a/tests/server/__snapshots__/webpack5.test.ts.snap +++ b/tests/server/__snapshots__/webpack5.test.ts.snap @@ -8,31 +8,31 @@ if (someCond) { `; exports[`webpack5 (server, non-hydratable) > Context API > should support ExportNamedDeclaration 1`] = ` -"import { $$context as _$$context } from "solid-refresh"; +"import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; import { createContext } from 'solid-js'; const _REGISTRY = _$$registry(); -export const Example = _$$context(_REGISTRY, "Example", createContext()); +export const Example = _$$component(_REGISTRY, "Example", createContext()); if (import.meta.webpackHot) { _$$refresh("webpack5", import.meta.webpackHot, _REGISTRY); }" `; exports[`webpack5 (server, non-hydratable) > Context API > should support top-level VariableDeclaration 1`] = ` -"import { $$context as _$$context } from "solid-refresh"; +"import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; import { createContext } from 'solid-js'; const _REGISTRY = _$$registry(); -const Example = _$$context(_REGISTRY, "Example", createContext()); +const Example = _$$component(_REGISTRY, "Example", createContext()); if (import.meta.webpackHot) { _$$refresh("webpack5", import.meta.webpackHot, _REGISTRY); }" `; exports[`webpack5 (server, non-hydratable) > ExportDefaultDeclaration w/ FunctionExpression > should skip ExportDefaultDeclaration w/ FunctionExpression with @refresh reload 1`] = ` -"import { ssr as _$ssr } from "solid-js/web"; +"import { ssr as _$ssr } from "@solidjs/web"; var _tmpl$ = "

Foo

"; import { $$decline as _$$decline } from "solid-refresh"; // @refresh reload @@ -45,7 +45,7 @@ if (import.meta.webpackHot) { `; exports[`webpack5 (server, non-hydratable) > ExportDefaultDeclaration w/ FunctionExpression > should skip ExportDefaultDeclaration w/ FunctionExpression with @refresh skip 1`] = ` -"import { ssr as _$ssr } from "solid-js/web"; +"import { ssr as _$ssr } from "@solidjs/web"; var _tmpl$ = "

Foo

"; // @refresh skip export default function Foo() { @@ -54,8 +54,8 @@ export default function Foo() { `; exports[`webpack5 (server, non-hydratable) > ExportDefaultDeclaration w/ FunctionExpression > should skip ExportDefaultDeclaration w/ FunctionExpression with invalid Component name 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; var _tmpl$ = "

Foo

"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -74,8 +74,8 @@ if (import.meta.webpackHot) { `; exports[`webpack5 (server, non-hydratable) > ExportDefaultDeclaration w/ FunctionExpression > should skip ExportDefaultDeclaration w/ FunctionExpression with valid Component name and >1 params 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; var _tmpl$ = "

Foo

"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -94,8 +94,8 @@ if (import.meta.webpackHot) { `; exports[`webpack5 (server, non-hydratable) > ExportDefaultDeclaration w/ FunctionExpression > should transform ExportDefaultDeclaration w/ FunctionExpression with valid Component name and params 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; var _tmpl$ = "

Foo

"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -118,8 +118,8 @@ if (import.meta.webpackHot) { `; exports[`webpack5 (server, non-hydratable) > ExportDefaultDeclaration w/ FunctionExpression > should transform ExportDefaultDeclaration w/ FunctionExpression with valid Component name and params 2`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; var _tmpl$ = "

Foo

"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -142,15 +142,19 @@ if (import.meta.webpackHot) { `; exports[`webpack5 (server, non-hydratable) > ExportDefaultDeclaration w/ FunctionExpression > should transform ExportDefaultDeclaration w/ FunctionExpression with valid Component name and params 3`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; -import { escape as _$escape } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; +import { ssrRunInScope as _$ssrRunInScope } from "@solidjs/web"; +import { escape as _$escape } from "@solidjs/web"; var _tmpl$ = ["

", "

"]; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; const _REGISTRY = _$$registry(); -const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/_$ssr(_tmpl$, _$escape(_props.v0)), { +const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/(() => { + var _v$ = _$ssrRunInScope(() => _$escape(_props.v0)); + return _$ssr(_tmpl$, _v$); +})(), { location: "example.jsx:4:15", signature: "ae0f2a31" }); @@ -173,7 +177,7 @@ if (import.meta.webpackHot) { `; exports[`webpack5 (server, non-hydratable) > ExportDefaultDeclaration w/ FunctionExpression > should transform ExportDefaultDeclaration w/ FunctionExpression with valid Component name and params 4`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; @@ -205,8 +209,8 @@ if (import.meta.webpackHot) { `; exports[`webpack5 (server, non-hydratable) > ExportDefaultDeclaration w/ FunctionExpression > should transform ExportDefaultDeclaration w/ FunctionExpression with valid Component name and params 5`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; var _tmpl$ = "
foo
", _tmpl$2 = "
bar
"; import { $$component as _$$component } from "solid-refresh"; @@ -248,7 +252,7 @@ if (import.meta.webpackHot) { `; exports[`webpack5 (server, non-hydratable) > ExportNamedDeclaration w/ FunctionExpression > should skip ExportNamedDeclaration w/ FunctionExpression with @refresh reload 1`] = ` -"import { ssr as _$ssr } from "solid-js/web"; +"import { ssr as _$ssr } from "@solidjs/web"; var _tmpl$ = "

Foo

"; import { $$decline as _$$decline } from "solid-refresh"; // @refresh reload @@ -261,7 +265,7 @@ if (import.meta.webpackHot) { `; exports[`webpack5 (server, non-hydratable) > ExportNamedDeclaration w/ FunctionExpression > should skip ExportNamedDeclaration w/ FunctionExpression with @refresh skip 1`] = ` -"import { ssr as _$ssr } from "solid-js/web"; +"import { ssr as _$ssr } from "@solidjs/web"; var _tmpl$ = "

Foo

"; // @refresh skip export function Foo() { @@ -270,8 +274,8 @@ export function Foo() { `; exports[`webpack5 (server, non-hydratable) > ExportNamedDeclaration w/ FunctionExpression > should skip ExportNamedDeclaration w/ FunctionExpression with invalid Component name 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; var _tmpl$ = "

Foo

"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -294,8 +298,8 @@ if (import.meta.webpackHot) { `; exports[`webpack5 (server, non-hydratable) > ExportNamedDeclaration w/ FunctionExpression > should skip ExportNamedDeclaration w/ FunctionExpression with valid Component name and >1 params 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; var _tmpl$ = "

Foo

"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -314,8 +318,8 @@ if (import.meta.webpackHot) { `; exports[`webpack5 (server, non-hydratable) > ExportNamedDeclaration w/ FunctionExpression > should transform ExportNamedDeclaration w/ FunctionExpression with valid Component name and params 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; var _tmpl$ = "

Foo

"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -338,8 +342,8 @@ if (import.meta.webpackHot) { `; exports[`webpack5 (server, non-hydratable) > ExportNamedDeclaration w/ FunctionExpression > should transform ExportNamedDeclaration w/ FunctionExpression with valid Component name and params 2`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; var _tmpl$ = "

Foo

"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -362,15 +366,19 @@ if (import.meta.webpackHot) { `; exports[`webpack5 (server, non-hydratable) > ExportNamedDeclaration w/ FunctionExpression > should transform ExportNamedDeclaration w/ FunctionExpression with valid Component name and params 3`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; -import { escape as _$escape } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; +import { ssrRunInScope as _$ssrRunInScope } from "@solidjs/web"; +import { escape as _$escape } from "@solidjs/web"; var _tmpl$ = ["

", "

"]; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; const _REGISTRY = _$$registry(); -const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/_$ssr(_tmpl$, _$escape(_props.v0)), { +const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/(() => { + var _v$ = _$ssrRunInScope(() => _$escape(_props.v0)); + return _$ssr(_tmpl$, _v$); +})(), { location: "example.jsx:4:15", signature: "ae0f2a31" }); @@ -393,7 +401,7 @@ if (import.meta.webpackHot) { `; exports[`webpack5 (server, non-hydratable) > ExportNamedDeclaration w/ FunctionExpression > should transform ExportNamedDeclaration w/ FunctionExpression with valid Component name and params 4`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; @@ -425,8 +433,8 @@ if (import.meta.webpackHot) { `; exports[`webpack5 (server, non-hydratable) > ExportNamedDeclaration w/ FunctionExpression > should transform ExportNamedDeclaration w/ FunctionExpression with valid Component name and params 5`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; var _tmpl$ = "
foo
", _tmpl$2 = "
bar
"; import { $$component as _$$component } from "solid-refresh"; @@ -478,7 +486,7 @@ if (import.meta.webpackHot) { `; exports[`webpack5 (server, non-hydratable) > FunctionDeclaration > should skip FunctionDeclaration with @refresh reload 1`] = ` -"import { ssr as _$ssr } from "solid-js/web"; +"import { ssr as _$ssr } from "@solidjs/web"; var _tmpl$ = "

Foo

"; import { $$decline as _$$decline } from "solid-refresh"; // @refresh reload @@ -491,7 +499,7 @@ if (import.meta.webpackHot) { `; exports[`webpack5 (server, non-hydratable) > FunctionDeclaration > should skip FunctionDeclaration with @refresh skip 1`] = ` -"import { ssr as _$ssr } from "solid-js/web"; +"import { ssr as _$ssr } from "@solidjs/web"; var _tmpl$ = "

Foo

"; // @refresh skip function Foo() { @@ -500,8 +508,8 @@ function Foo() { `; exports[`webpack5 (server, non-hydratable) > FunctionDeclaration > should skip FunctionDeclaration with invalid Component name 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; var _tmpl$ = "

Foo

"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -520,8 +528,8 @@ if (import.meta.webpackHot) { `; exports[`webpack5 (server, non-hydratable) > FunctionDeclaration > should skip FunctionDeclaration with valid Component name and >1 params 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; var _tmpl$ = "

Foo

"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -540,8 +548,8 @@ if (import.meta.webpackHot) { `; exports[`webpack5 (server, non-hydratable) > FunctionDeclaration > should transform FunctionDeclaration with valid Component name and params 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; var _tmpl$ = "

Foo

"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -563,8 +571,8 @@ if (import.meta.webpackHot) { `; exports[`webpack5 (server, non-hydratable) > FunctionDeclaration > should transform FunctionDeclaration with valid Component name and params 2`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; var _tmpl$ = "

Foo

"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -586,16 +594,20 @@ if (import.meta.webpackHot) { `; exports[`webpack5 (server, non-hydratable) > FunctionDeclaration > should transform FunctionDeclaration with valid Component name and params 3`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; -import { escape as _$escape } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; +import { ssrRunInScope as _$ssrRunInScope } from "@solidjs/web"; +import { escape as _$escape } from "@solidjs/web"; var _tmpl$ = ["

", "

"]; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; const example = 'Foo'; const _REGISTRY = _$$registry(); -const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/_$ssr(_tmpl$, _$escape(_props.v0)), { +const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/(() => { + var _v$ = _$ssrRunInScope(() => _$escape(_props.v0)); + return _$ssr(_tmpl$, _v$); +})(), { location: "example.jsx:4:15", signature: "ae0f2a31" }); @@ -616,7 +628,7 @@ if (import.meta.webpackHot) { `; exports[`webpack5 (server, non-hydratable) > FunctionDeclaration > should transform FunctionDeclaration with valid Component name and params 4`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; @@ -647,8 +659,8 @@ if (import.meta.webpackHot) { `; exports[`webpack5 (server, non-hydratable) > FunctionDeclaration > should transform FunctionDeclaration with valid Component name and params 5`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; var _tmpl$ = "
bar
", _tmpl$2 = "
foo
"; import { $$component as _$$component } from "solid-refresh"; @@ -689,7 +701,7 @@ if (import.meta.webpackHot) { `; exports[`webpack5 (server, non-hydratable) > VariableDeclarator > ArrowFunctionExpression > should skip VariableDeclarator w/ ArrowFunctionExpression with @refresh reload 1`] = ` -"import { ssr as _$ssr } from "solid-js/web"; +"import { ssr as _$ssr } from "@solidjs/web"; var _tmpl$ = "

Foo

"; import { $$decline as _$$decline } from "solid-refresh"; // @refresh reload @@ -702,7 +714,7 @@ if (import.meta.webpackHot) { `; exports[`webpack5 (server, non-hydratable) > VariableDeclarator > ArrowFunctionExpression > should skip VariableDeclarator w/ ArrowFunctionExpression with @refresh skip 1`] = ` -"import { ssr as _$ssr } from "solid-js/web"; +"import { ssr as _$ssr } from "@solidjs/web"; var _tmpl$ = "

Foo

"; // @refresh skip const Foo = () => { @@ -711,8 +723,8 @@ const Foo = () => { `; exports[`webpack5 (server, non-hydratable) > VariableDeclarator > ArrowFunctionExpression > should skip VariableDeclarator w/ ArrowFunctionExpression with invalid Component name 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; var _tmpl$ = "

Foo

"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -731,8 +743,8 @@ if (import.meta.webpackHot) { `; exports[`webpack5 (server, non-hydratable) > VariableDeclarator > ArrowFunctionExpression > should skip VariableDeclarator w/ ArrowFunctionExpression with valid Component name and >1 params 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; var _tmpl$ = "

Foo

"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -751,8 +763,8 @@ if (import.meta.webpackHot) { `; exports[`webpack5 (server, non-hydratable) > VariableDeclarator > ArrowFunctionExpression > should transform VariableDeclarator w/ ArrowFunctionExpression with valid Component name and params 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; var _tmpl$ = "

Foo

"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -774,8 +786,8 @@ if (import.meta.webpackHot) { `; exports[`webpack5 (server, non-hydratable) > VariableDeclarator > ArrowFunctionExpression > should transform VariableDeclarator w/ ArrowFunctionExpression with valid Component name and params 2`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; var _tmpl$ = "

Foo

"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -797,16 +809,20 @@ if (import.meta.webpackHot) { `; exports[`webpack5 (server, non-hydratable) > VariableDeclarator > ArrowFunctionExpression > should transform VariableDeclarator w/ ArrowFunctionExpression with valid Component name and params 3`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; -import { escape as _$escape } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; +import { ssrRunInScope as _$ssrRunInScope } from "@solidjs/web"; +import { escape as _$escape } from "@solidjs/web"; var _tmpl$ = ["

", "

"]; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; const example = 'Foo'; const _REGISTRY = _$$registry(); -const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/_$ssr(_tmpl$, _$escape(_props.v0)), { +const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/(() => { + var _v$ = _$ssrRunInScope(() => _$escape(_props.v0)); + return _$ssr(_tmpl$, _v$); +})(), { location: "example.jsx:4:17", signature: "ae0f2a31" }); @@ -827,7 +843,7 @@ if (import.meta.webpackHot) { `; exports[`webpack5 (server, non-hydratable) > VariableDeclarator > ArrowFunctionExpression > should transform VariableDeclarator w/ ArrowFunctionExpression with valid Component name and params 4`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; @@ -858,8 +874,8 @@ if (import.meta.webpackHot) { `; exports[`webpack5 (server, non-hydratable) > VariableDeclarator > ArrowFunctionExpression > should transform VariableDeclarator w/ ArrowFunctionExpression with valid Component name and params 5`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; var _tmpl$ = "
bar
", _tmpl$2 = "
foo
"; import { $$component as _$$component } from "solid-refresh"; @@ -900,7 +916,7 @@ if (import.meta.webpackHot) { `; exports[`webpack5 (server, non-hydratable) > VariableDeclarator > FunctionExpression > should skip VariableDeclarator w/ FunctionExpression with @refresh reload 1`] = ` -"import { ssr as _$ssr } from "solid-js/web"; +"import { ssr as _$ssr } from "@solidjs/web"; var _tmpl$ = "

Foo

"; import { $$decline as _$$decline } from "solid-refresh"; // @refresh reload @@ -913,7 +929,7 @@ if (import.meta.webpackHot) { `; exports[`webpack5 (server, non-hydratable) > VariableDeclarator > FunctionExpression > should skip VariableDeclarator w/ FunctionExpression with @refresh skip 1`] = ` -"import { ssr as _$ssr } from "solid-js/web"; +"import { ssr as _$ssr } from "@solidjs/web"; var _tmpl$ = "

Foo

"; // @refresh skip const Foo = function () { @@ -922,8 +938,8 @@ const Foo = function () { `; exports[`webpack5 (server, non-hydratable) > VariableDeclarator > FunctionExpression > should skip VariableDeclarator w/ FunctionExpression with invalid Component name 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; var _tmpl$ = "

Foo

"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -942,8 +958,8 @@ if (import.meta.webpackHot) { `; exports[`webpack5 (server, non-hydratable) > VariableDeclarator > FunctionExpression > should skip VariableDeclarator w/ FunctionExpression with valid Component name and >1 params 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; var _tmpl$ = "

Foo

"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -962,8 +978,8 @@ if (import.meta.webpackHot) { `; exports[`webpack5 (server, non-hydratable) > VariableDeclarator > FunctionExpression > should transform VariableDeclarator w/ FunctionExpression with valid Component name and params 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; var _tmpl$ = "

Foo

"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -985,8 +1001,8 @@ if (import.meta.webpackHot) { `; exports[`webpack5 (server, non-hydratable) > VariableDeclarator > FunctionExpression > should transform VariableDeclarator w/ FunctionExpression with valid Component name and params 2`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; var _tmpl$ = "

Foo

"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -1008,16 +1024,20 @@ if (import.meta.webpackHot) { `; exports[`webpack5 (server, non-hydratable) > VariableDeclarator > FunctionExpression > should transform VariableDeclarator w/ FunctionExpression with valid Component name and params 3`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; -import { escape as _$escape } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; +import { ssrRunInScope as _$ssrRunInScope } from "@solidjs/web"; +import { escape as _$escape } from "@solidjs/web"; var _tmpl$ = ["

", "

"]; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; const example = 'Foo'; const _REGISTRY = _$$registry(); -const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/_$ssr(_tmpl$, _$escape(_props.v0)), { +const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/(() => { + var _v$ = _$ssrRunInScope(() => _$escape(_props.v0)); + return _$ssr(_tmpl$, _v$); +})(), { location: "example.jsx:4:17", signature: "ae0f2a31" }); @@ -1038,7 +1058,7 @@ if (import.meta.webpackHot) { `; exports[`webpack5 (server, non-hydratable) > VariableDeclarator > FunctionExpression > should transform VariableDeclarator w/ FunctionExpression with valid Component name and params 4`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; @@ -1069,8 +1089,8 @@ if (import.meta.webpackHot) { `; exports[`webpack5 (server, non-hydratable) > VariableDeclarator > FunctionExpression > should transform VariableDeclarator w/ FunctionExpression with valid Component name and params 5`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; var _tmpl$ = "
bar
", _tmpl$2 = "
foo
"; import { $$component as _$$component } from "solid-refresh"; @@ -1111,14 +1131,17 @@ if (import.meta.webpackHot) { `; exports[`webpack5 (server, non-hydratable) > fix build > refs > should work with a function 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; var _tmpl$ = "
Comp
"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; const _REGISTRY = _$$registry(); -const Comp_1 = _$$component(_REGISTRY, "Comp_1", _props => /*@refresh jsx-skip*/_$ssr(_tmpl$), { +const Comp_1 = _$$component(_REGISTRY, "Comp_1", _props => /*@refresh jsx-skip*/(() => { + var _ref$ = _props.v0; + return _$ssr(_tmpl$); +})(), { location: "example.jsx:4:19", signature: "6f76290" }); @@ -1137,14 +1160,17 @@ if (import.meta.webpackHot) { `; exports[`webpack5 (server, non-hydratable) > fix build > refs > should work with a mutable variable 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; var _tmpl$ = "
Comp
"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; const _REGISTRY = _$$registry(); -const Comp_1 = _$$component(_REGISTRY, "Comp_1", _props => /*@refresh jsx-skip*/_$ssr(_tmpl$), { +const Comp_1 = _$$component(_REGISTRY, "Comp_1", _props => /*@refresh jsx-skip*/(() => { + var _ref$ = _props.v0; + return _$ssr(_tmpl$); +})(), { location: "example.jsx:4:19", signature: "6f76290" }); @@ -1169,15 +1195,18 @@ if (import.meta.webpackHot) { `; exports[`webpack5 (server, non-hydratable) > fix build > signals as refs > should work 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; var _tmpl$ = "
Comp
"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; import { createSignal } from 'solid-js'; const _REGISTRY = _$$registry(); -const Comp_1 = _$$component(_REGISTRY, "Comp_1", _props => /*@refresh jsx-skip*/_$ssr(_tmpl$), { +const Comp_1 = _$$component(_REGISTRY, "Comp_1", _props => /*@refresh jsx-skip*/(() => { + var _ref$ = _props.v0; + return _$ssr(_tmpl$); +})(), { location: "example.jsx:6:19", signature: "6f76290" }); @@ -1203,7 +1232,7 @@ if (import.meta.webpackHot) { `; exports[`webpack5 (server, non-hydratable) > fix render > @refresh reload > should work 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; import { $$decline as _$$decline } from "solid-refresh"; // @refresh reload import { render } from 'solid-js/web'; @@ -1217,7 +1246,7 @@ if (import.meta.webpackHot) { `; exports[`webpack5 (server, non-hydratable) > fix render > import specifiers > should work with ImportNamespaceSpecifier 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; @@ -1237,7 +1266,7 @@ if (import.meta.webpackHot) { `; exports[`webpack5 (server, non-hydratable) > fix render > import specifiers > should work with ImportSpecifier + Identifier 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; @@ -1257,7 +1286,7 @@ if (import.meta.webpackHot) { `; exports[`webpack5 (server, non-hydratable) > fix render > import specifiers > should work with ImportSpecifier + aliased Identifier 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; @@ -1277,7 +1306,7 @@ if (import.meta.webpackHot) { `; exports[`webpack5 (server, non-hydratable) > fix render > import specifiers > should work with ImportSpecifier + aliased Identifier from StringLiteral 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; @@ -1297,7 +1326,7 @@ if (import.meta.webpackHot) { `; exports[`webpack5 (server, non-hydratable) > fix render > top-level statements > should work with IfStatement 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; From 74e98880c4412ed3118896d471e302837f1d308e Mon Sep 17 00:00:00 2001 From: Ryan Carniato Date: Tue, 3 Mar 2026 11:07:01 -0800 Subject: [PATCH 02/16] fix: Solid 2.0 compatibility for HMR runtime - Use createSignal(fn) for synchronous component initialization (batched writes) - Wrap source() guard in untrack() to avoid reactive tracking warning - Update devDependencies and peerDependencies to Solid 2.0 experimental - Bump to 0.8.0-next.1 Made-with: Cursor --- package.json | 8 ++++---- src/runtime/create-proxy.ts | 2 +- src/runtime/index.ts | 7 +++---- 3 files changed, 8 insertions(+), 9 deletions(-) diff --git a/package.json b/package.json index d78f79f..afa43ed 100644 --- a/package.json +++ b/package.json @@ -4,7 +4,7 @@ "description": "Universal HMR for SolidJS", "author": "Ryan Carniato", "license": "MIT", - "version": "0.8.0-next.0", + "version": "0.8.0-next.1", "homepage": "https://github.com/solidjs/solid-refresh#readme", "repository": { "type": "git", @@ -58,15 +58,15 @@ "@types/babel__core": "^7.20.5", "@types/babel__generator": "^7.27.0", "@types/node": "^25.3.0", - "babel-preset-solid": "^1.9.10", + "babel-preset-solid": "^2.0.0-experimental.16", "rollup": "^4.59.0", - "solid-js": "^1.9.11", + "solid-js": "^2.0.0-experimental.16", "tslib": "^2.6.2", "typescript": "^5.9.3", "vitest": "^4.0.18" }, "peerDependencies": { - "solid-js": "^1.3" + "solid-js": "^2.0.0-experimental" }, "dependencies": { "@babel/generator": "^7.29.1", diff --git a/src/runtime/create-proxy.ts b/src/runtime/create-proxy.ts index c78e746..298fce7 100644 --- a/src/runtime/create-proxy.ts +++ b/src/runtime/create-proxy.ts @@ -33,7 +33,7 @@ export default function createProxy, P>( ): (props: P) => JSX.Element { const refreshName = `[solid-refresh]${name}`; function HMRComp(props: P): JSX.Element { - const s = source(); + const s = untrack(source); if (!s || $DEVCOMP in s) { return createMemo( () => { diff --git a/src/runtime/index.ts b/src/runtime/index.ts index 49ed369..0e88509 100644 --- a/src/runtime/index.ts +++ b/src/runtime/index.ts @@ -1,4 +1,4 @@ -import type { Accessor, JSX } from 'solid-js'; +import type { JSX } from 'solid-js'; import { createSignal, DEV } from 'solid-js'; import type { ESMRuntimeType, StandardRuntimeType } from '../shared/types'; import createProxy from './create-proxy'; @@ -42,10 +42,9 @@ export function $$component

( component: (props: P) => JSX.Element, options: ComponentOptions = {}, ): (props: P) => JSX.Element { - const [comp, setComp] = createSignal<(props: P) => JSX.Element>(); - setComp(() => component); + const [comp, setComp] = createSignal(() => component); const proxy = createProxy<(props: P) => JSX.Element, P>( - comp as Accessor<(props: P) => JSX.Element>, + comp, id, options.location, ); From 7d7b3577269cd484bc11a5c535572d7018ea8b6f Mon Sep 17 00:00:00 2001 From: Ryan Carniato Date: Tue, 3 Mar 2026 13:25:09 -0800 Subject: [PATCH 03/16] fix: prevent stale closure in writable memo when computed goes LAZY createSignal(() => component) creates a computed node that captures the original component in its closure. When all subscribers are disposed (e.g. component unmounted by Show), the computed goes LAZY. On next read, re-evaluation runs the closure and returns the stale original value, discarding the setter's update. Fix: use a mutable `current` variable in the closure so re-evaluation always returns the latest component set via patchComponent. Made-with: Cursor --- src/runtime/index.ts | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/runtime/index.ts b/src/runtime/index.ts index 0e88509..ecdce49 100644 --- a/src/runtime/index.ts +++ b/src/runtime/index.ts @@ -42,7 +42,12 @@ export function $$component

( component: (props: P) => JSX.Element, options: ComponentOptions = {}, ): (props: P) => JSX.Element { - const [comp, setComp] = createSignal(() => component); + let current = component; + const [comp, setComp] = createSignal(() => current); + const update = (fn: () => (props: P) => JSX.Element) => { + current = fn(); + setComp(() => current); + }; const proxy = createProxy<(props: P) => JSX.Element, P>( comp, id, @@ -52,7 +57,7 @@ export function $$component

( id, component, proxy, - update: setComp, + update, ...options, }); return proxy; From 12a63aef05c8b7cce1beeb56f1e5915d3822f745 Mon Sep 17 00:00:00 2001 From: Ryan Carniato Date: Tue, 3 Mar 2026 14:37:01 -0800 Subject: [PATCH 04/16] update solid-js and babel-preset-solid to beta release Made-with: Cursor --- package.json | 6 +++--- pnpm-lock.yaml | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index afa43ed..548f2ed 100644 --- a/package.json +++ b/package.json @@ -58,15 +58,15 @@ "@types/babel__core": "^7.20.5", "@types/babel__generator": "^7.27.0", "@types/node": "^25.3.0", - "babel-preset-solid": "^2.0.0-experimental.16", + "babel-preset-solid": "^2.0.0-beta", "rollup": "^4.59.0", - "solid-js": "^2.0.0-experimental.16", + "solid-js": "^2.0.0-beta", "tslib": "^2.6.2", "typescript": "^5.9.3", "vitest": "^4.0.18" }, "peerDependencies": { - "solid-js": "^2.0.0-experimental" + "solid-js": "^2.0.0-beta" }, "dependencies": { "@babel/generator": "^7.29.1", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 7bebd84..9f381bb 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -37,13 +37,13 @@ importers: specifier: ^25.3.0 version: 25.3.0 babel-preset-solid: - specifier: ^2.0.0-experimental.16 + specifier: ^2.0.0-beta version: 2.0.0-experimental.16(@babel/core@7.29.0)(solid-js@2.0.0-experimental.16) rollup: specifier: ^4.59.0 version: 4.59.0 solid-js: - specifier: ^2.0.0-experimental.16 + specifier: ^2.0.0-beta version: 2.0.0-experimental.16 tslib: specifier: ^2.6.2 From c34adeb31b36981cd921e30c51d48f0a48397ff2 Mon Sep 17 00:00:00 2001 From: Ryan Carniato Date: Wed, 4 Mar 2026 10:44:55 -0800 Subject: [PATCH 05/16] update solid deps to beta and restrict peer dep to prereleases Made-with: Cursor --- package.json | 6 +- pnpm-lock.yaml | 24 +- .../__snapshots__/esm.test.ts.snap | 282 +++++----- .../__snapshots__/rspack-esm.test.ts.snap | 282 +++++----- .../__snapshots__/standard.test.ts.snap | 282 +++++----- .../__snapshots__/vite.test.ts.snap | 282 +++++----- .../__snapshots__/webpack5.test.ts.snap | 282 +++++----- tests/client/__snapshots__/esm.test.ts.snap | 196 +++---- .../__snapshots__/rspack-esm.test.ts.snap | 196 +++---- .../__snapshots__/standard.test.ts.snap | 196 +++---- tests/client/__snapshots__/vite.test.ts.snap | 196 +++---- .../__snapshots__/webpack5.test.ts.snap | 196 +++---- .../__snapshots__/esm.test.ts.snap | 523 ++++++++++++------ .../__snapshots__/rspack-esm.test.ts.snap | 523 ++++++++++++------ .../__snapshots__/standard.test.ts.snap | 523 ++++++++++++------ .../__snapshots__/vite.test.ts.snap | 523 ++++++++++++------ .../__snapshots__/webpack5.test.ts.snap | 523 ++++++++++++------ tests/server/__snapshots__/esm.test.ts.snap | 229 ++++---- .../__snapshots__/rspack-esm.test.ts.snap | 229 ++++---- .../__snapshots__/standard.test.ts.snap | 229 ++++---- tests/server/__snapshots__/vite.test.ts.snap | 229 ++++---- .../__snapshots__/webpack5.test.ts.snap | 229 ++++---- 22 files changed, 3555 insertions(+), 2625 deletions(-) diff --git a/package.json b/package.json index 548f2ed..5b9b028 100644 --- a/package.json +++ b/package.json @@ -58,15 +58,15 @@ "@types/babel__core": "^7.20.5", "@types/babel__generator": "^7.27.0", "@types/node": "^25.3.0", - "babel-preset-solid": "^2.0.0-beta", + "babel-preset-solid": "^2.0.0-beta.0", "rollup": "^4.59.0", - "solid-js": "^2.0.0-beta", + "solid-js": "^2.0.0-beta.0", "tslib": "^2.6.2", "typescript": "^5.9.3", "vitest": "^4.0.18" }, "peerDependencies": { - "solid-js": "^2.0.0-beta" + "solid-js": ">=2.0.0-beta.0 <2.0.0" }, "dependencies": { "@babel/generator": "^7.29.1", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 9f381bb..6661d23 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -37,14 +37,14 @@ importers: specifier: ^25.3.0 version: 25.3.0 babel-preset-solid: - specifier: ^2.0.0-beta - version: 2.0.0-experimental.16(@babel/core@7.29.0)(solid-js@2.0.0-experimental.16) + specifier: ^2.0.0-beta.0 + version: 2.0.0-beta.0(@babel/core@7.29.0)(solid-js@2.0.0-beta.0) rollup: specifier: ^4.59.0 version: 4.59.0 solid-js: - specifier: ^2.0.0-beta - version: 2.0.0-experimental.16 + specifier: ^2.0.0-beta.0 + version: 2.0.0-beta.0 tslib: specifier: ^2.6.2 version: 2.8.1 @@ -1133,11 +1133,11 @@ packages: peerDependencies: '@babel/core': ^7.20.12 - babel-preset-solid@2.0.0-experimental.16: - resolution: {integrity: sha512-I8UfX7Er2i3XaqC8pr7klEHl/AWUUFmpgWDvzipQofthcBwrlWUk8pVbQZ6PuBOnr4XRBVF3ijzOicfzmj4uBA==} + babel-preset-solid@2.0.0-beta.0: + resolution: {integrity: sha512-bPA3YnISn4cUyMjIPlC3QxbX5tqCKYBLK6zhChhiJ6wKmKt6yv8pB4FmwyxGf3tcb0eARhcIYnXpxZ+z58Bmww==} peerDependencies: '@babel/core': ^7.0.0 - solid-js: 2.0.0-experimental.16 + solid-js: ^2.0.0-beta.0 peerDependenciesMeta: solid-js: optional: true @@ -1509,8 +1509,8 @@ packages: siginfo@2.0.0: resolution: {integrity: sha512-ybx0WO1/8bSBLEWXZvEd7gMW3Sn3JFlW3TvX1nREbDLRNQNaeNN8WK0meBwPdAaOI7TtRRRJn/Es1zhrrCHu7g==} - solid-js@2.0.0-experimental.16: - resolution: {integrity: sha512-zZ1dU7cR0EnvLnrYiRLQbCFiDw5blLdlqmofgLzKUYE1TCMWDcisBlSwz0Ez8l4yXB4adbdhtaYCuynH4xSq9A==} + solid-js@2.0.0-beta.0: + resolution: {integrity: sha512-SnOAA8QBC+TJ3dwN9xPRDYybCZJ6BSW6gPKnDRtJ0n0r96pg/KcbvSt/T/O6qaWI1pf+CMpYmdOxZfTQr2AhQg==} source-map-js@1.2.1: resolution: {integrity: sha512-UXWMKhLOwVKb728IUtQPXxfYU+usdybtUrK/8uGE8CQMvrhOpwvzDBwj0QhSL7MQc7vIsISBG8VQ8+IDQxpfQA==} @@ -2857,12 +2857,12 @@ snapshots: parse5: 7.3.0 validate-html-nesting: 1.2.4 - babel-preset-solid@2.0.0-experimental.16(@babel/core@7.29.0)(solid-js@2.0.0-experimental.16): + babel-preset-solid@2.0.0-beta.0(@babel/core@7.29.0)(solid-js@2.0.0-beta.0): dependencies: '@babel/core': 7.29.0 babel-plugin-jsx-dom-expressions: 0.41.0-next.9(@babel/core@7.29.0) optionalDependencies: - solid-js: 2.0.0-experimental.16 + solid-js: 2.0.0-beta.0 base-x@3.0.11: dependencies: @@ -3216,7 +3216,7 @@ snapshots: siginfo@2.0.0: {} - solid-js@2.0.0-experimental.16: + solid-js@2.0.0-beta.0: dependencies: '@solidjs/signals': 0.11.1 csstype: 3.2.3 diff --git a/tests/client-hydratable/__snapshots__/esm.test.ts.snap b/tests/client-hydratable/__snapshots__/esm.test.ts.snap index c1e63b3..4dded8c 100644 --- a/tests/client-hydratable/__snapshots__/esm.test.ts.snap +++ b/tests/client-hydratable/__snapshots__/esm.test.ts.snap @@ -32,8 +32,8 @@ if (import.meta.hot) { `; exports[`esm (client, hydratable) > ExportDefaultDeclaration w/ FunctionExpression > should skip ExportDefaultDeclaration w/ FunctionExpression with @refresh reload 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { getNextElement as _$getNextElement } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { getNextElement as _$getNextElement } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$decline as _$$decline } from "solid-refresh"; // @refresh reload @@ -46,8 +46,8 @@ if (import.meta.hot) { `; exports[`esm (client, hydratable) > ExportDefaultDeclaration w/ FunctionExpression > should skip ExportDefaultDeclaration w/ FunctionExpression with @refresh skip 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { getNextElement as _$getNextElement } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { getNextElement as _$getNextElement } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); // @refresh skip export default function Foo() { @@ -56,9 +56,9 @@ export default function Foo() { `; exports[`esm (client, hydratable) > ExportDefaultDeclaration w/ FunctionExpression > should skip ExportDefaultDeclaration w/ FunctionExpression with invalid Component name 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; -import { getNextElement as _$getNextElement } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; +import { getNextElement as _$getNextElement } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -77,9 +77,9 @@ if (import.meta.hot) { `; exports[`esm (client, hydratable) > ExportDefaultDeclaration w/ FunctionExpression > should skip ExportDefaultDeclaration w/ FunctionExpression with valid Component name and >1 params 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; -import { getNextElement as _$getNextElement } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; +import { getNextElement as _$getNextElement } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -98,9 +98,9 @@ if (import.meta.hot) { `; exports[`esm (client, hydratable) > ExportDefaultDeclaration w/ FunctionExpression > should transform ExportDefaultDeclaration w/ FunctionExpression with valid Component name and params 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; -import { getNextElement as _$getNextElement } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; +import { getNextElement as _$getNextElement } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -123,9 +123,9 @@ if (import.meta.hot) { `; exports[`esm (client, hydratable) > ExportDefaultDeclaration w/ FunctionExpression > should transform ExportDefaultDeclaration w/ FunctionExpression with valid Component name and params 2`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; -import { getNextElement as _$getNextElement } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; +import { getNextElement as _$getNextElement } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -148,10 +148,10 @@ if (import.meta.hot) { `; exports[`esm (client, hydratable) > ExportDefaultDeclaration w/ FunctionExpression > should transform ExportDefaultDeclaration w/ FunctionExpression with valid Component name and params 3`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; -import { getNextElement as _$getNextElement } from "solid-js/web"; -import { insert as _$insert } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; +import { getNextElement as _$getNextElement } from "@solidjs/web"; +import { insert as _$insert } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -184,7 +184,7 @@ if (import.meta.hot) { `; exports[`esm (client, hydratable) > ExportDefaultDeclaration w/ FunctionExpression > should transform ExportDefaultDeclaration w/ FunctionExpression with valid Component name and params 4`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; @@ -216,9 +216,9 @@ if (import.meta.hot) { `; exports[`esm (client, hydratable) > ExportDefaultDeclaration w/ FunctionExpression > should transform ExportDefaultDeclaration w/ FunctionExpression with valid Component name and params 5`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; -import { getNextElement as _$getNextElement } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; +import { getNextElement as _$getNextElement } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`
foo\`), _tmpl$2 = /*#__PURE__*/_$template(\`
bar\`); import { $$component as _$$component } from "solid-refresh"; @@ -260,8 +260,8 @@ if (import.meta.hot) { `; exports[`esm (client, hydratable) > ExportNamedDeclaration w/ FunctionExpression > should skip ExportNamedDeclaration w/ FunctionExpression with @refresh reload 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { getNextElement as _$getNextElement } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { getNextElement as _$getNextElement } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$decline as _$$decline } from "solid-refresh"; // @refresh reload @@ -274,8 +274,8 @@ if (import.meta.hot) { `; exports[`esm (client, hydratable) > ExportNamedDeclaration w/ FunctionExpression > should skip ExportNamedDeclaration w/ FunctionExpression with @refresh skip 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { getNextElement as _$getNextElement } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { getNextElement as _$getNextElement } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); // @refresh skip export function Foo() { @@ -284,9 +284,9 @@ export function Foo() { `; exports[`esm (client, hydratable) > ExportNamedDeclaration w/ FunctionExpression > should skip ExportNamedDeclaration w/ FunctionExpression with invalid Component name 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; -import { getNextElement as _$getNextElement } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; +import { getNextElement as _$getNextElement } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -309,9 +309,9 @@ if (import.meta.hot) { `; exports[`esm (client, hydratable) > ExportNamedDeclaration w/ FunctionExpression > should skip ExportNamedDeclaration w/ FunctionExpression with valid Component name and >1 params 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; -import { getNextElement as _$getNextElement } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; +import { getNextElement as _$getNextElement } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -330,9 +330,9 @@ if (import.meta.hot) { `; exports[`esm (client, hydratable) > ExportNamedDeclaration w/ FunctionExpression > should transform ExportNamedDeclaration w/ FunctionExpression with valid Component name and params 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; -import { getNextElement as _$getNextElement } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; +import { getNextElement as _$getNextElement } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -355,9 +355,9 @@ if (import.meta.hot) { `; exports[`esm (client, hydratable) > ExportNamedDeclaration w/ FunctionExpression > should transform ExportNamedDeclaration w/ FunctionExpression with valid Component name and params 2`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; -import { getNextElement as _$getNextElement } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; +import { getNextElement as _$getNextElement } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -380,10 +380,10 @@ if (import.meta.hot) { `; exports[`esm (client, hydratable) > ExportNamedDeclaration w/ FunctionExpression > should transform ExportNamedDeclaration w/ FunctionExpression with valid Component name and params 3`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; -import { getNextElement as _$getNextElement } from "solid-js/web"; -import { insert as _$insert } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; +import { getNextElement as _$getNextElement } from "@solidjs/web"; +import { insert as _$insert } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -416,7 +416,7 @@ if (import.meta.hot) { `; exports[`esm (client, hydratable) > ExportNamedDeclaration w/ FunctionExpression > should transform ExportNamedDeclaration w/ FunctionExpression with valid Component name and params 4`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; @@ -448,9 +448,9 @@ if (import.meta.hot) { `; exports[`esm (client, hydratable) > ExportNamedDeclaration w/ FunctionExpression > should transform ExportNamedDeclaration w/ FunctionExpression with valid Component name and params 5`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; -import { getNextElement as _$getNextElement } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; +import { getNextElement as _$getNextElement } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`
bar\`), _tmpl$2 = /*#__PURE__*/_$template(\`
foo\`); import { $$component as _$$component } from "solid-refresh"; @@ -493,8 +493,8 @@ if (import.meta.hot) { `; exports[`esm (client, hydratable) > FunctionDeclaration > should skip FunctionDeclaration with @refresh reload 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { getNextElement as _$getNextElement } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { getNextElement as _$getNextElement } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$decline as _$$decline } from "solid-refresh"; // @refresh reload @@ -507,8 +507,8 @@ if (import.meta.hot) { `; exports[`esm (client, hydratable) > FunctionDeclaration > should skip FunctionDeclaration with @refresh skip 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { getNextElement as _$getNextElement } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { getNextElement as _$getNextElement } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); // @refresh skip function Foo() { @@ -517,9 +517,9 @@ function Foo() { `; exports[`esm (client, hydratable) > FunctionDeclaration > should skip FunctionDeclaration with invalid Component name 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; -import { getNextElement as _$getNextElement } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; +import { getNextElement as _$getNextElement } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -538,9 +538,9 @@ if (import.meta.hot) { `; exports[`esm (client, hydratable) > FunctionDeclaration > should skip FunctionDeclaration with valid Component name and >1 params 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; -import { getNextElement as _$getNextElement } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; +import { getNextElement as _$getNextElement } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -559,9 +559,9 @@ if (import.meta.hot) { `; exports[`esm (client, hydratable) > FunctionDeclaration > should transform FunctionDeclaration with valid Component name and params 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; -import { getNextElement as _$getNextElement } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; +import { getNextElement as _$getNextElement } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -583,9 +583,9 @@ if (import.meta.hot) { `; exports[`esm (client, hydratable) > FunctionDeclaration > should transform FunctionDeclaration with valid Component name and params 2`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; -import { getNextElement as _$getNextElement } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; +import { getNextElement as _$getNextElement } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -607,10 +607,10 @@ if (import.meta.hot) { `; exports[`esm (client, hydratable) > FunctionDeclaration > should transform FunctionDeclaration with valid Component name and params 3`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; -import { getNextElement as _$getNextElement } from "solid-js/web"; -import { insert as _$insert } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; +import { getNextElement as _$getNextElement } from "@solidjs/web"; +import { insert as _$insert } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -642,7 +642,7 @@ if (import.meta.hot) { `; exports[`esm (client, hydratable) > FunctionDeclaration > should transform FunctionDeclaration with valid Component name and params 4`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; @@ -673,9 +673,9 @@ if (import.meta.hot) { `; exports[`esm (client, hydratable) > FunctionDeclaration > should transform FunctionDeclaration with valid Component name and params 5`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; -import { getNextElement as _$getNextElement } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; +import { getNextElement as _$getNextElement } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`
foo\`), _tmpl$2 = /*#__PURE__*/_$template(\`
bar\`); import { $$component as _$$component } from "solid-refresh"; @@ -716,8 +716,8 @@ if (import.meta.hot) { `; exports[`esm (client, hydratable) > VariableDeclarator > ArrowFunctionExpression > should skip VariableDeclarator w/ ArrowFunctionExpression with @refresh reload 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { getNextElement as _$getNextElement } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { getNextElement as _$getNextElement } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$decline as _$$decline } from "solid-refresh"; // @refresh reload @@ -730,8 +730,8 @@ if (import.meta.hot) { `; exports[`esm (client, hydratable) > VariableDeclarator > ArrowFunctionExpression > should skip VariableDeclarator w/ ArrowFunctionExpression with @refresh skip 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { getNextElement as _$getNextElement } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { getNextElement as _$getNextElement } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); // @refresh skip const Foo = () => { @@ -740,9 +740,9 @@ const Foo = () => { `; exports[`esm (client, hydratable) > VariableDeclarator > ArrowFunctionExpression > should skip VariableDeclarator w/ ArrowFunctionExpression with invalid Component name 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; -import { getNextElement as _$getNextElement } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; +import { getNextElement as _$getNextElement } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -761,9 +761,9 @@ if (import.meta.hot) { `; exports[`esm (client, hydratable) > VariableDeclarator > ArrowFunctionExpression > should skip VariableDeclarator w/ ArrowFunctionExpression with valid Component name and >1 params 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; -import { getNextElement as _$getNextElement } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; +import { getNextElement as _$getNextElement } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -782,9 +782,9 @@ if (import.meta.hot) { `; exports[`esm (client, hydratable) > VariableDeclarator > ArrowFunctionExpression > should transform VariableDeclarator w/ ArrowFunctionExpression with valid Component name and params 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; -import { getNextElement as _$getNextElement } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; +import { getNextElement as _$getNextElement } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -806,9 +806,9 @@ if (import.meta.hot) { `; exports[`esm (client, hydratable) > VariableDeclarator > ArrowFunctionExpression > should transform VariableDeclarator w/ ArrowFunctionExpression with valid Component name and params 2`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; -import { getNextElement as _$getNextElement } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; +import { getNextElement as _$getNextElement } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -830,10 +830,10 @@ if (import.meta.hot) { `; exports[`esm (client, hydratable) > VariableDeclarator > ArrowFunctionExpression > should transform VariableDeclarator w/ ArrowFunctionExpression with valid Component name and params 3`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; -import { getNextElement as _$getNextElement } from "solid-js/web"; -import { insert as _$insert } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; +import { getNextElement as _$getNextElement } from "@solidjs/web"; +import { insert as _$insert } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -865,7 +865,7 @@ if (import.meta.hot) { `; exports[`esm (client, hydratable) > VariableDeclarator > ArrowFunctionExpression > should transform VariableDeclarator w/ ArrowFunctionExpression with valid Component name and params 4`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; @@ -896,9 +896,9 @@ if (import.meta.hot) { `; exports[`esm (client, hydratable) > VariableDeclarator > ArrowFunctionExpression > should transform VariableDeclarator w/ ArrowFunctionExpression with valid Component name and params 5`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; -import { getNextElement as _$getNextElement } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; +import { getNextElement as _$getNextElement } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`
bar\`), _tmpl$2 = /*#__PURE__*/_$template(\`
foo\`); import { $$component as _$$component } from "solid-refresh"; @@ -939,8 +939,8 @@ if (import.meta.hot) { `; exports[`esm (client, hydratable) > VariableDeclarator > FunctionExpression > should skip VariableDeclarator w/ FunctionExpression with @refresh reload 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { getNextElement as _$getNextElement } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { getNextElement as _$getNextElement } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$decline as _$$decline } from "solid-refresh"; // @refresh reload @@ -953,8 +953,8 @@ if (import.meta.hot) { `; exports[`esm (client, hydratable) > VariableDeclarator > FunctionExpression > should skip VariableDeclarator w/ FunctionExpression with @refresh skip 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { getNextElement as _$getNextElement } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { getNextElement as _$getNextElement } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); // @refresh skip const Foo = function () { @@ -963,9 +963,9 @@ const Foo = function () { `; exports[`esm (client, hydratable) > VariableDeclarator > FunctionExpression > should skip VariableDeclarator w/ FunctionExpression with invalid Component name 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; -import { getNextElement as _$getNextElement } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; +import { getNextElement as _$getNextElement } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -984,9 +984,9 @@ if (import.meta.hot) { `; exports[`esm (client, hydratable) > VariableDeclarator > FunctionExpression > should skip VariableDeclarator w/ FunctionExpression with valid Component name and >1 params 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; -import { getNextElement as _$getNextElement } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; +import { getNextElement as _$getNextElement } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -1005,9 +1005,9 @@ if (import.meta.hot) { `; exports[`esm (client, hydratable) > VariableDeclarator > FunctionExpression > should transform VariableDeclarator w/ FunctionExpression with valid Component name and params 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; -import { getNextElement as _$getNextElement } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; +import { getNextElement as _$getNextElement } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -1029,9 +1029,9 @@ if (import.meta.hot) { `; exports[`esm (client, hydratable) > VariableDeclarator > FunctionExpression > should transform VariableDeclarator w/ FunctionExpression with valid Component name and params 2`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; -import { getNextElement as _$getNextElement } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; +import { getNextElement as _$getNextElement } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -1053,10 +1053,10 @@ if (import.meta.hot) { `; exports[`esm (client, hydratable) > VariableDeclarator > FunctionExpression > should transform VariableDeclarator w/ FunctionExpression with valid Component name and params 3`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; -import { getNextElement as _$getNextElement } from "solid-js/web"; -import { insert as _$insert } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; +import { getNextElement as _$getNextElement } from "@solidjs/web"; +import { insert as _$insert } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -1088,7 +1088,7 @@ if (import.meta.hot) { `; exports[`esm (client, hydratable) > VariableDeclarator > FunctionExpression > should transform VariableDeclarator w/ FunctionExpression with valid Component name and params 4`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; @@ -1119,9 +1119,9 @@ if (import.meta.hot) { `; exports[`esm (client, hydratable) > VariableDeclarator > FunctionExpression > should transform VariableDeclarator w/ FunctionExpression with valid Component name and params 5`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; -import { getNextElement as _$getNextElement } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; +import { getNextElement as _$getNextElement } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`
bar\`), _tmpl$2 = /*#__PURE__*/_$template(\`
foo\`); import { $$component as _$$component } from "solid-refresh"; @@ -1162,10 +1162,10 @@ if (import.meta.hot) { `; exports[`esm (client, hydratable) > fix build > refs > should work with a function 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; -import { getNextElement as _$getNextElement } from "solid-js/web"; -import { use as _$use } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; +import { getNextElement as _$getNextElement } from "@solidjs/web"; +import { ref as _$ref } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`
Comp\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -1174,7 +1174,7 @@ const _REGISTRY = _$$registry(); const Comp_1 = _$$component(_REGISTRY, "Comp_1", _props => /*@refresh jsx-skip*/(() => { var _el$ = _$getNextElement(_tmpl$); var _ref$ = _props.v0; - typeof _ref$ === "function" ? _$use(_ref$, _el$) : _props.v0 = _el$; + typeof _ref$ === "function" || Array.isArray(_ref$) ? _$ref(() => _ref$, _el$) : _props.v0 = _el$; return _el$; })(), { location: "example.jsx:4:19", @@ -1195,10 +1195,10 @@ if (import.meta.hot) { `; exports[`esm (client, hydratable) > fix build > refs > should work with a mutable variable 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; -import { getNextElement as _$getNextElement } from "solid-js/web"; -import { use as _$use } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; +import { getNextElement as _$getNextElement } from "@solidjs/web"; +import { ref as _$ref } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`
Comp\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -1207,7 +1207,7 @@ const _REGISTRY = _$$registry(); const Comp_1 = _$$component(_REGISTRY, "Comp_1", _props => /*@refresh jsx-skip*/(() => { var _el$ = _$getNextElement(_tmpl$); var _ref$ = _props.v0; - typeof _ref$ === "function" ? _$use(_ref$, _el$) : _props.v0 = _el$; + typeof _ref$ === "function" || Array.isArray(_ref$) ? _$ref(() => _ref$, _el$) : _props.v0 = _el$; return _el$; })(), { location: "example.jsx:4:19", @@ -1234,10 +1234,10 @@ if (import.meta.hot) { `; exports[`esm (client, hydratable) > fix build > signals as refs > should work 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; -import { getNextElement as _$getNextElement } from "solid-js/web"; -import { use as _$use } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; +import { getNextElement as _$getNextElement } from "@solidjs/web"; +import { ref as _$ref } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`
Comp\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -1247,7 +1247,7 @@ const _REGISTRY = _$$registry(); const Comp_1 = _$$component(_REGISTRY, "Comp_1", _props => /*@refresh jsx-skip*/(() => { var _el$ = _$getNextElement(_tmpl$); var _ref$ = _props.v0; - typeof _ref$ === "function" ? _$use(_ref$, _el$) : _props.v0 = _el$; + typeof _ref$ === "function" || Array.isArray(_ref$) ? _$ref(() => _ref$, _el$) : _props.v0 = _el$; return _el$; })(), { location: "example.jsx:6:19", @@ -1275,7 +1275,7 @@ if (import.meta.hot) { `; exports[`esm (client, hydratable) > fix render > @refresh reload > should work 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; import { $$decline as _$$decline } from "solid-refresh"; // @refresh reload import { render } from 'solid-js/web'; @@ -1289,7 +1289,7 @@ if (import.meta.hot) { `; exports[`esm (client, hydratable) > fix render > import specifiers > should work with ImportNamespaceSpecifier 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; @@ -1309,7 +1309,7 @@ if (import.meta.hot) { `; exports[`esm (client, hydratable) > fix render > import specifiers > should work with ImportSpecifier + Identifier 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; @@ -1329,7 +1329,7 @@ if (import.meta.hot) { `; exports[`esm (client, hydratable) > fix render > import specifiers > should work with ImportSpecifier + aliased Identifier 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; @@ -1349,7 +1349,7 @@ if (import.meta.hot) { `; exports[`esm (client, hydratable) > fix render > import specifiers > should work with ImportSpecifier + aliased Identifier from StringLiteral 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; @@ -1369,7 +1369,7 @@ if (import.meta.hot) { `; exports[`esm (client, hydratable) > fix render > top-level statements > should work with IfStatement 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; diff --git a/tests/client-hydratable/__snapshots__/rspack-esm.test.ts.snap b/tests/client-hydratable/__snapshots__/rspack-esm.test.ts.snap index f7c6698..55c5041 100644 --- a/tests/client-hydratable/__snapshots__/rspack-esm.test.ts.snap +++ b/tests/client-hydratable/__snapshots__/rspack-esm.test.ts.snap @@ -32,8 +32,8 @@ if (import.meta.webpackHot) { `; exports[`rspack-esm (client, hydratable) > ExportDefaultDeclaration w/ FunctionExpression > should skip ExportDefaultDeclaration w/ FunctionExpression with @refresh reload 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { getNextElement as _$getNextElement } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { getNextElement as _$getNextElement } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$decline as _$$decline } from "solid-refresh"; // @refresh reload @@ -46,8 +46,8 @@ if (import.meta.webpackHot) { `; exports[`rspack-esm (client, hydratable) > ExportDefaultDeclaration w/ FunctionExpression > should skip ExportDefaultDeclaration w/ FunctionExpression with @refresh skip 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { getNextElement as _$getNextElement } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { getNextElement as _$getNextElement } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); // @refresh skip export default function Foo() { @@ -56,9 +56,9 @@ export default function Foo() { `; exports[`rspack-esm (client, hydratable) > ExportDefaultDeclaration w/ FunctionExpression > should skip ExportDefaultDeclaration w/ FunctionExpression with invalid Component name 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; -import { getNextElement as _$getNextElement } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; +import { getNextElement as _$getNextElement } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -77,9 +77,9 @@ if (import.meta.webpackHot) { `; exports[`rspack-esm (client, hydratable) > ExportDefaultDeclaration w/ FunctionExpression > should skip ExportDefaultDeclaration w/ FunctionExpression with valid Component name and >1 params 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; -import { getNextElement as _$getNextElement } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; +import { getNextElement as _$getNextElement } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -98,9 +98,9 @@ if (import.meta.webpackHot) { `; exports[`rspack-esm (client, hydratable) > ExportDefaultDeclaration w/ FunctionExpression > should transform ExportDefaultDeclaration w/ FunctionExpression with valid Component name and params 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; -import { getNextElement as _$getNextElement } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; +import { getNextElement as _$getNextElement } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -123,9 +123,9 @@ if (import.meta.webpackHot) { `; exports[`rspack-esm (client, hydratable) > ExportDefaultDeclaration w/ FunctionExpression > should transform ExportDefaultDeclaration w/ FunctionExpression with valid Component name and params 2`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; -import { getNextElement as _$getNextElement } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; +import { getNextElement as _$getNextElement } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -148,10 +148,10 @@ if (import.meta.webpackHot) { `; exports[`rspack-esm (client, hydratable) > ExportDefaultDeclaration w/ FunctionExpression > should transform ExportDefaultDeclaration w/ FunctionExpression with valid Component name and params 3`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; -import { getNextElement as _$getNextElement } from "solid-js/web"; -import { insert as _$insert } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; +import { getNextElement as _$getNextElement } from "@solidjs/web"; +import { insert as _$insert } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -184,7 +184,7 @@ if (import.meta.webpackHot) { `; exports[`rspack-esm (client, hydratable) > ExportDefaultDeclaration w/ FunctionExpression > should transform ExportDefaultDeclaration w/ FunctionExpression with valid Component name and params 4`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; @@ -216,9 +216,9 @@ if (import.meta.webpackHot) { `; exports[`rspack-esm (client, hydratable) > ExportDefaultDeclaration w/ FunctionExpression > should transform ExportDefaultDeclaration w/ FunctionExpression with valid Component name and params 5`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; -import { getNextElement as _$getNextElement } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; +import { getNextElement as _$getNextElement } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`
foo\`), _tmpl$2 = /*#__PURE__*/_$template(\`
bar\`); import { $$component as _$$component } from "solid-refresh"; @@ -260,8 +260,8 @@ if (import.meta.webpackHot) { `; exports[`rspack-esm (client, hydratable) > ExportNamedDeclaration w/ FunctionExpression > should skip ExportNamedDeclaration w/ FunctionExpression with @refresh reload 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { getNextElement as _$getNextElement } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { getNextElement as _$getNextElement } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$decline as _$$decline } from "solid-refresh"; // @refresh reload @@ -274,8 +274,8 @@ if (import.meta.webpackHot) { `; exports[`rspack-esm (client, hydratable) > ExportNamedDeclaration w/ FunctionExpression > should skip ExportNamedDeclaration w/ FunctionExpression with @refresh skip 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { getNextElement as _$getNextElement } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { getNextElement as _$getNextElement } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); // @refresh skip export function Foo() { @@ -284,9 +284,9 @@ export function Foo() { `; exports[`rspack-esm (client, hydratable) > ExportNamedDeclaration w/ FunctionExpression > should skip ExportNamedDeclaration w/ FunctionExpression with invalid Component name 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; -import { getNextElement as _$getNextElement } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; +import { getNextElement as _$getNextElement } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -309,9 +309,9 @@ if (import.meta.webpackHot) { `; exports[`rspack-esm (client, hydratable) > ExportNamedDeclaration w/ FunctionExpression > should skip ExportNamedDeclaration w/ FunctionExpression with valid Component name and >1 params 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; -import { getNextElement as _$getNextElement } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; +import { getNextElement as _$getNextElement } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -330,9 +330,9 @@ if (import.meta.webpackHot) { `; exports[`rspack-esm (client, hydratable) > ExportNamedDeclaration w/ FunctionExpression > should transform ExportNamedDeclaration w/ FunctionExpression with valid Component name and params 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; -import { getNextElement as _$getNextElement } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; +import { getNextElement as _$getNextElement } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -355,9 +355,9 @@ if (import.meta.webpackHot) { `; exports[`rspack-esm (client, hydratable) > ExportNamedDeclaration w/ FunctionExpression > should transform ExportNamedDeclaration w/ FunctionExpression with valid Component name and params 2`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; -import { getNextElement as _$getNextElement } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; +import { getNextElement as _$getNextElement } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -380,10 +380,10 @@ if (import.meta.webpackHot) { `; exports[`rspack-esm (client, hydratable) > ExportNamedDeclaration w/ FunctionExpression > should transform ExportNamedDeclaration w/ FunctionExpression with valid Component name and params 3`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; -import { getNextElement as _$getNextElement } from "solid-js/web"; -import { insert as _$insert } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; +import { getNextElement as _$getNextElement } from "@solidjs/web"; +import { insert as _$insert } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -416,7 +416,7 @@ if (import.meta.webpackHot) { `; exports[`rspack-esm (client, hydratable) > ExportNamedDeclaration w/ FunctionExpression > should transform ExportNamedDeclaration w/ FunctionExpression with valid Component name and params 4`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; @@ -448,9 +448,9 @@ if (import.meta.webpackHot) { `; exports[`rspack-esm (client, hydratable) > ExportNamedDeclaration w/ FunctionExpression > should transform ExportNamedDeclaration w/ FunctionExpression with valid Component name and params 5`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; -import { getNextElement as _$getNextElement } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; +import { getNextElement as _$getNextElement } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`
bar\`), _tmpl$2 = /*#__PURE__*/_$template(\`
foo\`); import { $$component as _$$component } from "solid-refresh"; @@ -493,8 +493,8 @@ if (import.meta.webpackHot) { `; exports[`rspack-esm (client, hydratable) > FunctionDeclaration > should skip FunctionDeclaration with @refresh reload 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { getNextElement as _$getNextElement } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { getNextElement as _$getNextElement } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$decline as _$$decline } from "solid-refresh"; // @refresh reload @@ -507,8 +507,8 @@ if (import.meta.webpackHot) { `; exports[`rspack-esm (client, hydratable) > FunctionDeclaration > should skip FunctionDeclaration with @refresh skip 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { getNextElement as _$getNextElement } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { getNextElement as _$getNextElement } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); // @refresh skip function Foo() { @@ -517,9 +517,9 @@ function Foo() { `; exports[`rspack-esm (client, hydratable) > FunctionDeclaration > should skip FunctionDeclaration with invalid Component name 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; -import { getNextElement as _$getNextElement } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; +import { getNextElement as _$getNextElement } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -538,9 +538,9 @@ if (import.meta.webpackHot) { `; exports[`rspack-esm (client, hydratable) > FunctionDeclaration > should skip FunctionDeclaration with valid Component name and >1 params 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; -import { getNextElement as _$getNextElement } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; +import { getNextElement as _$getNextElement } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -559,9 +559,9 @@ if (import.meta.webpackHot) { `; exports[`rspack-esm (client, hydratable) > FunctionDeclaration > should transform FunctionDeclaration with valid Component name and params 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; -import { getNextElement as _$getNextElement } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; +import { getNextElement as _$getNextElement } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -583,9 +583,9 @@ if (import.meta.webpackHot) { `; exports[`rspack-esm (client, hydratable) > FunctionDeclaration > should transform FunctionDeclaration with valid Component name and params 2`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; -import { getNextElement as _$getNextElement } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; +import { getNextElement as _$getNextElement } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -607,10 +607,10 @@ if (import.meta.webpackHot) { `; exports[`rspack-esm (client, hydratable) > FunctionDeclaration > should transform FunctionDeclaration with valid Component name and params 3`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; -import { getNextElement as _$getNextElement } from "solid-js/web"; -import { insert as _$insert } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; +import { getNextElement as _$getNextElement } from "@solidjs/web"; +import { insert as _$insert } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -642,7 +642,7 @@ if (import.meta.webpackHot) { `; exports[`rspack-esm (client, hydratable) > FunctionDeclaration > should transform FunctionDeclaration with valid Component name and params 4`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; @@ -673,9 +673,9 @@ if (import.meta.webpackHot) { `; exports[`rspack-esm (client, hydratable) > FunctionDeclaration > should transform FunctionDeclaration with valid Component name and params 5`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; -import { getNextElement as _$getNextElement } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; +import { getNextElement as _$getNextElement } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`
foo\`), _tmpl$2 = /*#__PURE__*/_$template(\`
bar\`); import { $$component as _$$component } from "solid-refresh"; @@ -716,8 +716,8 @@ if (import.meta.webpackHot) { `; exports[`rspack-esm (client, hydratable) > VariableDeclarator > ArrowFunctionExpression > should skip VariableDeclarator w/ ArrowFunctionExpression with @refresh reload 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { getNextElement as _$getNextElement } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { getNextElement as _$getNextElement } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$decline as _$$decline } from "solid-refresh"; // @refresh reload @@ -730,8 +730,8 @@ if (import.meta.webpackHot) { `; exports[`rspack-esm (client, hydratable) > VariableDeclarator > ArrowFunctionExpression > should skip VariableDeclarator w/ ArrowFunctionExpression with @refresh skip 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { getNextElement as _$getNextElement } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { getNextElement as _$getNextElement } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); // @refresh skip const Foo = () => { @@ -740,9 +740,9 @@ const Foo = () => { `; exports[`rspack-esm (client, hydratable) > VariableDeclarator > ArrowFunctionExpression > should skip VariableDeclarator w/ ArrowFunctionExpression with invalid Component name 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; -import { getNextElement as _$getNextElement } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; +import { getNextElement as _$getNextElement } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -761,9 +761,9 @@ if (import.meta.webpackHot) { `; exports[`rspack-esm (client, hydratable) > VariableDeclarator > ArrowFunctionExpression > should skip VariableDeclarator w/ ArrowFunctionExpression with valid Component name and >1 params 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; -import { getNextElement as _$getNextElement } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; +import { getNextElement as _$getNextElement } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -782,9 +782,9 @@ if (import.meta.webpackHot) { `; exports[`rspack-esm (client, hydratable) > VariableDeclarator > ArrowFunctionExpression > should transform VariableDeclarator w/ ArrowFunctionExpression with valid Component name and params 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; -import { getNextElement as _$getNextElement } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; +import { getNextElement as _$getNextElement } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -806,9 +806,9 @@ if (import.meta.webpackHot) { `; exports[`rspack-esm (client, hydratable) > VariableDeclarator > ArrowFunctionExpression > should transform VariableDeclarator w/ ArrowFunctionExpression with valid Component name and params 2`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; -import { getNextElement as _$getNextElement } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; +import { getNextElement as _$getNextElement } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -830,10 +830,10 @@ if (import.meta.webpackHot) { `; exports[`rspack-esm (client, hydratable) > VariableDeclarator > ArrowFunctionExpression > should transform VariableDeclarator w/ ArrowFunctionExpression with valid Component name and params 3`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; -import { getNextElement as _$getNextElement } from "solid-js/web"; -import { insert as _$insert } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; +import { getNextElement as _$getNextElement } from "@solidjs/web"; +import { insert as _$insert } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -865,7 +865,7 @@ if (import.meta.webpackHot) { `; exports[`rspack-esm (client, hydratable) > VariableDeclarator > ArrowFunctionExpression > should transform VariableDeclarator w/ ArrowFunctionExpression with valid Component name and params 4`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; @@ -896,9 +896,9 @@ if (import.meta.webpackHot) { `; exports[`rspack-esm (client, hydratable) > VariableDeclarator > ArrowFunctionExpression > should transform VariableDeclarator w/ ArrowFunctionExpression with valid Component name and params 5`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; -import { getNextElement as _$getNextElement } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; +import { getNextElement as _$getNextElement } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`
bar\`), _tmpl$2 = /*#__PURE__*/_$template(\`
foo\`); import { $$component as _$$component } from "solid-refresh"; @@ -939,8 +939,8 @@ if (import.meta.webpackHot) { `; exports[`rspack-esm (client, hydratable) > VariableDeclarator > FunctionExpression > should skip VariableDeclarator w/ FunctionExpression with @refresh reload 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { getNextElement as _$getNextElement } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { getNextElement as _$getNextElement } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$decline as _$$decline } from "solid-refresh"; // @refresh reload @@ -953,8 +953,8 @@ if (import.meta.webpackHot) { `; exports[`rspack-esm (client, hydratable) > VariableDeclarator > FunctionExpression > should skip VariableDeclarator w/ FunctionExpression with @refresh skip 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { getNextElement as _$getNextElement } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { getNextElement as _$getNextElement } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); // @refresh skip const Foo = function () { @@ -963,9 +963,9 @@ const Foo = function () { `; exports[`rspack-esm (client, hydratable) > VariableDeclarator > FunctionExpression > should skip VariableDeclarator w/ FunctionExpression with invalid Component name 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; -import { getNextElement as _$getNextElement } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; +import { getNextElement as _$getNextElement } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -984,9 +984,9 @@ if (import.meta.webpackHot) { `; exports[`rspack-esm (client, hydratable) > VariableDeclarator > FunctionExpression > should skip VariableDeclarator w/ FunctionExpression with valid Component name and >1 params 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; -import { getNextElement as _$getNextElement } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; +import { getNextElement as _$getNextElement } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -1005,9 +1005,9 @@ if (import.meta.webpackHot) { `; exports[`rspack-esm (client, hydratable) > VariableDeclarator > FunctionExpression > should transform VariableDeclarator w/ FunctionExpression with valid Component name and params 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; -import { getNextElement as _$getNextElement } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; +import { getNextElement as _$getNextElement } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -1029,9 +1029,9 @@ if (import.meta.webpackHot) { `; exports[`rspack-esm (client, hydratable) > VariableDeclarator > FunctionExpression > should transform VariableDeclarator w/ FunctionExpression with valid Component name and params 2`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; -import { getNextElement as _$getNextElement } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; +import { getNextElement as _$getNextElement } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -1053,10 +1053,10 @@ if (import.meta.webpackHot) { `; exports[`rspack-esm (client, hydratable) > VariableDeclarator > FunctionExpression > should transform VariableDeclarator w/ FunctionExpression with valid Component name and params 3`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; -import { getNextElement as _$getNextElement } from "solid-js/web"; -import { insert as _$insert } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; +import { getNextElement as _$getNextElement } from "@solidjs/web"; +import { insert as _$insert } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -1088,7 +1088,7 @@ if (import.meta.webpackHot) { `; exports[`rspack-esm (client, hydratable) > VariableDeclarator > FunctionExpression > should transform VariableDeclarator w/ FunctionExpression with valid Component name and params 4`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; @@ -1119,9 +1119,9 @@ if (import.meta.webpackHot) { `; exports[`rspack-esm (client, hydratable) > VariableDeclarator > FunctionExpression > should transform VariableDeclarator w/ FunctionExpression with valid Component name and params 5`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; -import { getNextElement as _$getNextElement } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; +import { getNextElement as _$getNextElement } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`
bar\`), _tmpl$2 = /*#__PURE__*/_$template(\`
foo\`); import { $$component as _$$component } from "solid-refresh"; @@ -1162,10 +1162,10 @@ if (import.meta.webpackHot) { `; exports[`rspack-esm (client, hydratable) > fix build > refs > should work with a function 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; -import { getNextElement as _$getNextElement } from "solid-js/web"; -import { use as _$use } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; +import { getNextElement as _$getNextElement } from "@solidjs/web"; +import { ref as _$ref } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`
Comp\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -1174,7 +1174,7 @@ const _REGISTRY = _$$registry(); const Comp_1 = _$$component(_REGISTRY, "Comp_1", _props => /*@refresh jsx-skip*/(() => { var _el$ = _$getNextElement(_tmpl$); var _ref$ = _props.v0; - typeof _ref$ === "function" ? _$use(_ref$, _el$) : _props.v0 = _el$; + typeof _ref$ === "function" || Array.isArray(_ref$) ? _$ref(() => _ref$, _el$) : _props.v0 = _el$; return _el$; })(), { location: "example.jsx:4:19", @@ -1195,10 +1195,10 @@ if (import.meta.webpackHot) { `; exports[`rspack-esm (client, hydratable) > fix build > refs > should work with a mutable variable 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; -import { getNextElement as _$getNextElement } from "solid-js/web"; -import { use as _$use } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; +import { getNextElement as _$getNextElement } from "@solidjs/web"; +import { ref as _$ref } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`
Comp\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -1207,7 +1207,7 @@ const _REGISTRY = _$$registry(); const Comp_1 = _$$component(_REGISTRY, "Comp_1", _props => /*@refresh jsx-skip*/(() => { var _el$ = _$getNextElement(_tmpl$); var _ref$ = _props.v0; - typeof _ref$ === "function" ? _$use(_ref$, _el$) : _props.v0 = _el$; + typeof _ref$ === "function" || Array.isArray(_ref$) ? _$ref(() => _ref$, _el$) : _props.v0 = _el$; return _el$; })(), { location: "example.jsx:4:19", @@ -1234,10 +1234,10 @@ if (import.meta.webpackHot) { `; exports[`rspack-esm (client, hydratable) > fix build > signals as refs > should work 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; -import { getNextElement as _$getNextElement } from "solid-js/web"; -import { use as _$use } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; +import { getNextElement as _$getNextElement } from "@solidjs/web"; +import { ref as _$ref } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`
Comp\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -1247,7 +1247,7 @@ const _REGISTRY = _$$registry(); const Comp_1 = _$$component(_REGISTRY, "Comp_1", _props => /*@refresh jsx-skip*/(() => { var _el$ = _$getNextElement(_tmpl$); var _ref$ = _props.v0; - typeof _ref$ === "function" ? _$use(_ref$, _el$) : _props.v0 = _el$; + typeof _ref$ === "function" || Array.isArray(_ref$) ? _$ref(() => _ref$, _el$) : _props.v0 = _el$; return _el$; })(), { location: "example.jsx:6:19", @@ -1275,7 +1275,7 @@ if (import.meta.webpackHot) { `; exports[`rspack-esm (client, hydratable) > fix render > @refresh reload > should work 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; import { $$decline as _$$decline } from "solid-refresh"; // @refresh reload import { render } from 'solid-js/web'; @@ -1289,7 +1289,7 @@ if (import.meta.webpackHot) { `; exports[`rspack-esm (client, hydratable) > fix render > import specifiers > should work with ImportNamespaceSpecifier 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; @@ -1309,7 +1309,7 @@ if (import.meta.webpackHot) { `; exports[`rspack-esm (client, hydratable) > fix render > import specifiers > should work with ImportSpecifier + Identifier 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; @@ -1329,7 +1329,7 @@ if (import.meta.webpackHot) { `; exports[`rspack-esm (client, hydratable) > fix render > import specifiers > should work with ImportSpecifier + aliased Identifier 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; @@ -1349,7 +1349,7 @@ if (import.meta.webpackHot) { `; exports[`rspack-esm (client, hydratable) > fix render > import specifiers > should work with ImportSpecifier + aliased Identifier from StringLiteral 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; @@ -1369,7 +1369,7 @@ if (import.meta.webpackHot) { `; exports[`rspack-esm (client, hydratable) > fix render > top-level statements > should work with IfStatement 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; diff --git a/tests/client-hydratable/__snapshots__/standard.test.ts.snap b/tests/client-hydratable/__snapshots__/standard.test.ts.snap index d2d4860..50266ad 100644 --- a/tests/client-hydratable/__snapshots__/standard.test.ts.snap +++ b/tests/client-hydratable/__snapshots__/standard.test.ts.snap @@ -32,8 +32,8 @@ if (module.hot) { `; exports[`standard (client, hydratable) > ExportDefaultDeclaration w/ FunctionExpression > should skip ExportDefaultDeclaration w/ FunctionExpression with @refresh reload 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { getNextElement as _$getNextElement } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { getNextElement as _$getNextElement } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$decline as _$$decline } from "solid-refresh"; // @refresh reload @@ -46,8 +46,8 @@ if (module.hot) { `; exports[`standard (client, hydratable) > ExportDefaultDeclaration w/ FunctionExpression > should skip ExportDefaultDeclaration w/ FunctionExpression with @refresh skip 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { getNextElement as _$getNextElement } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { getNextElement as _$getNextElement } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); // @refresh skip export default function Foo() { @@ -56,9 +56,9 @@ export default function Foo() { `; exports[`standard (client, hydratable) > ExportDefaultDeclaration w/ FunctionExpression > should skip ExportDefaultDeclaration w/ FunctionExpression with invalid Component name 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; -import { getNextElement as _$getNextElement } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; +import { getNextElement as _$getNextElement } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -77,9 +77,9 @@ if (module.hot) { `; exports[`standard (client, hydratable) > ExportDefaultDeclaration w/ FunctionExpression > should skip ExportDefaultDeclaration w/ FunctionExpression with valid Component name and >1 params 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; -import { getNextElement as _$getNextElement } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; +import { getNextElement as _$getNextElement } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -98,9 +98,9 @@ if (module.hot) { `; exports[`standard (client, hydratable) > ExportDefaultDeclaration w/ FunctionExpression > should transform ExportDefaultDeclaration w/ FunctionExpression with valid Component name and params 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; -import { getNextElement as _$getNextElement } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; +import { getNextElement as _$getNextElement } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -123,9 +123,9 @@ if (module.hot) { `; exports[`standard (client, hydratable) > ExportDefaultDeclaration w/ FunctionExpression > should transform ExportDefaultDeclaration w/ FunctionExpression with valid Component name and params 2`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; -import { getNextElement as _$getNextElement } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; +import { getNextElement as _$getNextElement } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -148,10 +148,10 @@ if (module.hot) { `; exports[`standard (client, hydratable) > ExportDefaultDeclaration w/ FunctionExpression > should transform ExportDefaultDeclaration w/ FunctionExpression with valid Component name and params 3`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; -import { getNextElement as _$getNextElement } from "solid-js/web"; -import { insert as _$insert } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; +import { getNextElement as _$getNextElement } from "@solidjs/web"; +import { insert as _$insert } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -184,7 +184,7 @@ if (module.hot) { `; exports[`standard (client, hydratable) > ExportDefaultDeclaration w/ FunctionExpression > should transform ExportDefaultDeclaration w/ FunctionExpression with valid Component name and params 4`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; @@ -216,9 +216,9 @@ if (module.hot) { `; exports[`standard (client, hydratable) > ExportDefaultDeclaration w/ FunctionExpression > should transform ExportDefaultDeclaration w/ FunctionExpression with valid Component name and params 5`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; -import { getNextElement as _$getNextElement } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; +import { getNextElement as _$getNextElement } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`
foo\`), _tmpl$2 = /*#__PURE__*/_$template(\`
bar\`); import { $$component as _$$component } from "solid-refresh"; @@ -260,8 +260,8 @@ if (module.hot) { `; exports[`standard (client, hydratable) > ExportNamedDeclaration w/ FunctionExpression > should skip ExportNamedDeclaration w/ FunctionExpression with @refresh reload 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { getNextElement as _$getNextElement } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { getNextElement as _$getNextElement } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$decline as _$$decline } from "solid-refresh"; // @refresh reload @@ -274,8 +274,8 @@ if (module.hot) { `; exports[`standard (client, hydratable) > ExportNamedDeclaration w/ FunctionExpression > should skip ExportNamedDeclaration w/ FunctionExpression with @refresh skip 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { getNextElement as _$getNextElement } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { getNextElement as _$getNextElement } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); // @refresh skip export function Foo() { @@ -284,9 +284,9 @@ export function Foo() { `; exports[`standard (client, hydratable) > ExportNamedDeclaration w/ FunctionExpression > should skip ExportNamedDeclaration w/ FunctionExpression with invalid Component name 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; -import { getNextElement as _$getNextElement } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; +import { getNextElement as _$getNextElement } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -309,9 +309,9 @@ if (module.hot) { `; exports[`standard (client, hydratable) > ExportNamedDeclaration w/ FunctionExpression > should skip ExportNamedDeclaration w/ FunctionExpression with valid Component name and >1 params 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; -import { getNextElement as _$getNextElement } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; +import { getNextElement as _$getNextElement } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -330,9 +330,9 @@ if (module.hot) { `; exports[`standard (client, hydratable) > ExportNamedDeclaration w/ FunctionExpression > should transform ExportNamedDeclaration w/ FunctionExpression with valid Component name and params 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; -import { getNextElement as _$getNextElement } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; +import { getNextElement as _$getNextElement } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -355,9 +355,9 @@ if (module.hot) { `; exports[`standard (client, hydratable) > ExportNamedDeclaration w/ FunctionExpression > should transform ExportNamedDeclaration w/ FunctionExpression with valid Component name and params 2`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; -import { getNextElement as _$getNextElement } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; +import { getNextElement as _$getNextElement } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -380,10 +380,10 @@ if (module.hot) { `; exports[`standard (client, hydratable) > ExportNamedDeclaration w/ FunctionExpression > should transform ExportNamedDeclaration w/ FunctionExpression with valid Component name and params 3`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; -import { getNextElement as _$getNextElement } from "solid-js/web"; -import { insert as _$insert } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; +import { getNextElement as _$getNextElement } from "@solidjs/web"; +import { insert as _$insert } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -416,7 +416,7 @@ if (module.hot) { `; exports[`standard (client, hydratable) > ExportNamedDeclaration w/ FunctionExpression > should transform ExportNamedDeclaration w/ FunctionExpression with valid Component name and params 4`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; @@ -448,9 +448,9 @@ if (module.hot) { `; exports[`standard (client, hydratable) > ExportNamedDeclaration w/ FunctionExpression > should transform ExportNamedDeclaration w/ FunctionExpression with valid Component name and params 5`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; -import { getNextElement as _$getNextElement } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; +import { getNextElement as _$getNextElement } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`
bar\`), _tmpl$2 = /*#__PURE__*/_$template(\`
foo\`); import { $$component as _$$component } from "solid-refresh"; @@ -493,8 +493,8 @@ if (module.hot) { `; exports[`standard (client, hydratable) > FunctionDeclaration > should skip FunctionDeclaration with @refresh reload 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { getNextElement as _$getNextElement } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { getNextElement as _$getNextElement } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$decline as _$$decline } from "solid-refresh"; // @refresh reload @@ -507,8 +507,8 @@ if (module.hot) { `; exports[`standard (client, hydratable) > FunctionDeclaration > should skip FunctionDeclaration with @refresh skip 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { getNextElement as _$getNextElement } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { getNextElement as _$getNextElement } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); // @refresh skip function Foo() { @@ -517,9 +517,9 @@ function Foo() { `; exports[`standard (client, hydratable) > FunctionDeclaration > should skip FunctionDeclaration with invalid Component name 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; -import { getNextElement as _$getNextElement } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; +import { getNextElement as _$getNextElement } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -538,9 +538,9 @@ if (module.hot) { `; exports[`standard (client, hydratable) > FunctionDeclaration > should skip FunctionDeclaration with valid Component name and >1 params 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; -import { getNextElement as _$getNextElement } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; +import { getNextElement as _$getNextElement } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -559,9 +559,9 @@ if (module.hot) { `; exports[`standard (client, hydratable) > FunctionDeclaration > should transform FunctionDeclaration with valid Component name and params 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; -import { getNextElement as _$getNextElement } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; +import { getNextElement as _$getNextElement } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -583,9 +583,9 @@ if (module.hot) { `; exports[`standard (client, hydratable) > FunctionDeclaration > should transform FunctionDeclaration with valid Component name and params 2`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; -import { getNextElement as _$getNextElement } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; +import { getNextElement as _$getNextElement } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -607,10 +607,10 @@ if (module.hot) { `; exports[`standard (client, hydratable) > FunctionDeclaration > should transform FunctionDeclaration with valid Component name and params 3`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; -import { getNextElement as _$getNextElement } from "solid-js/web"; -import { insert as _$insert } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; +import { getNextElement as _$getNextElement } from "@solidjs/web"; +import { insert as _$insert } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -642,7 +642,7 @@ if (module.hot) { `; exports[`standard (client, hydratable) > FunctionDeclaration > should transform FunctionDeclaration with valid Component name and params 4`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; @@ -673,9 +673,9 @@ if (module.hot) { `; exports[`standard (client, hydratable) > FunctionDeclaration > should transform FunctionDeclaration with valid Component name and params 5`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; -import { getNextElement as _$getNextElement } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; +import { getNextElement as _$getNextElement } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`
foo\`), _tmpl$2 = /*#__PURE__*/_$template(\`
bar\`); import { $$component as _$$component } from "solid-refresh"; @@ -716,8 +716,8 @@ if (module.hot) { `; exports[`standard (client, hydratable) > VariableDeclarator > ArrowFunctionExpression > should skip VariableDeclarator w/ ArrowFunctionExpression with @refresh reload 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { getNextElement as _$getNextElement } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { getNextElement as _$getNextElement } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$decline as _$$decline } from "solid-refresh"; // @refresh reload @@ -730,8 +730,8 @@ if (module.hot) { `; exports[`standard (client, hydratable) > VariableDeclarator > ArrowFunctionExpression > should skip VariableDeclarator w/ ArrowFunctionExpression with @refresh skip 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { getNextElement as _$getNextElement } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { getNextElement as _$getNextElement } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); // @refresh skip const Foo = () => { @@ -740,9 +740,9 @@ const Foo = () => { `; exports[`standard (client, hydratable) > VariableDeclarator > ArrowFunctionExpression > should skip VariableDeclarator w/ ArrowFunctionExpression with invalid Component name 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; -import { getNextElement as _$getNextElement } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; +import { getNextElement as _$getNextElement } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -761,9 +761,9 @@ if (module.hot) { `; exports[`standard (client, hydratable) > VariableDeclarator > ArrowFunctionExpression > should skip VariableDeclarator w/ ArrowFunctionExpression with valid Component name and >1 params 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; -import { getNextElement as _$getNextElement } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; +import { getNextElement as _$getNextElement } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -782,9 +782,9 @@ if (module.hot) { `; exports[`standard (client, hydratable) > VariableDeclarator > ArrowFunctionExpression > should transform VariableDeclarator w/ ArrowFunctionExpression with valid Component name and params 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; -import { getNextElement as _$getNextElement } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; +import { getNextElement as _$getNextElement } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -806,9 +806,9 @@ if (module.hot) { `; exports[`standard (client, hydratable) > VariableDeclarator > ArrowFunctionExpression > should transform VariableDeclarator w/ ArrowFunctionExpression with valid Component name and params 2`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; -import { getNextElement as _$getNextElement } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; +import { getNextElement as _$getNextElement } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -830,10 +830,10 @@ if (module.hot) { `; exports[`standard (client, hydratable) > VariableDeclarator > ArrowFunctionExpression > should transform VariableDeclarator w/ ArrowFunctionExpression with valid Component name and params 3`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; -import { getNextElement as _$getNextElement } from "solid-js/web"; -import { insert as _$insert } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; +import { getNextElement as _$getNextElement } from "@solidjs/web"; +import { insert as _$insert } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -865,7 +865,7 @@ if (module.hot) { `; exports[`standard (client, hydratable) > VariableDeclarator > ArrowFunctionExpression > should transform VariableDeclarator w/ ArrowFunctionExpression with valid Component name and params 4`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; @@ -896,9 +896,9 @@ if (module.hot) { `; exports[`standard (client, hydratable) > VariableDeclarator > ArrowFunctionExpression > should transform VariableDeclarator w/ ArrowFunctionExpression with valid Component name and params 5`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; -import { getNextElement as _$getNextElement } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; +import { getNextElement as _$getNextElement } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`
bar\`), _tmpl$2 = /*#__PURE__*/_$template(\`
foo\`); import { $$component as _$$component } from "solid-refresh"; @@ -939,8 +939,8 @@ if (module.hot) { `; exports[`standard (client, hydratable) > VariableDeclarator > FunctionExpression > should skip VariableDeclarator w/ FunctionExpression with @refresh reload 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { getNextElement as _$getNextElement } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { getNextElement as _$getNextElement } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$decline as _$$decline } from "solid-refresh"; // @refresh reload @@ -953,8 +953,8 @@ if (module.hot) { `; exports[`standard (client, hydratable) > VariableDeclarator > FunctionExpression > should skip VariableDeclarator w/ FunctionExpression with @refresh skip 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { getNextElement as _$getNextElement } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { getNextElement as _$getNextElement } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); // @refresh skip const Foo = function () { @@ -963,9 +963,9 @@ const Foo = function () { `; exports[`standard (client, hydratable) > VariableDeclarator > FunctionExpression > should skip VariableDeclarator w/ FunctionExpression with invalid Component name 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; -import { getNextElement as _$getNextElement } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; +import { getNextElement as _$getNextElement } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -984,9 +984,9 @@ if (module.hot) { `; exports[`standard (client, hydratable) > VariableDeclarator > FunctionExpression > should skip VariableDeclarator w/ FunctionExpression with valid Component name and >1 params 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; -import { getNextElement as _$getNextElement } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; +import { getNextElement as _$getNextElement } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -1005,9 +1005,9 @@ if (module.hot) { `; exports[`standard (client, hydratable) > VariableDeclarator > FunctionExpression > should transform VariableDeclarator w/ FunctionExpression with valid Component name and params 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; -import { getNextElement as _$getNextElement } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; +import { getNextElement as _$getNextElement } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -1029,9 +1029,9 @@ if (module.hot) { `; exports[`standard (client, hydratable) > VariableDeclarator > FunctionExpression > should transform VariableDeclarator w/ FunctionExpression with valid Component name and params 2`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; -import { getNextElement as _$getNextElement } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; +import { getNextElement as _$getNextElement } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -1053,10 +1053,10 @@ if (module.hot) { `; exports[`standard (client, hydratable) > VariableDeclarator > FunctionExpression > should transform VariableDeclarator w/ FunctionExpression with valid Component name and params 3`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; -import { getNextElement as _$getNextElement } from "solid-js/web"; -import { insert as _$insert } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; +import { getNextElement as _$getNextElement } from "@solidjs/web"; +import { insert as _$insert } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -1088,7 +1088,7 @@ if (module.hot) { `; exports[`standard (client, hydratable) > VariableDeclarator > FunctionExpression > should transform VariableDeclarator w/ FunctionExpression with valid Component name and params 4`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; @@ -1119,9 +1119,9 @@ if (module.hot) { `; exports[`standard (client, hydratable) > VariableDeclarator > FunctionExpression > should transform VariableDeclarator w/ FunctionExpression with valid Component name and params 5`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; -import { getNextElement as _$getNextElement } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; +import { getNextElement as _$getNextElement } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`
bar\`), _tmpl$2 = /*#__PURE__*/_$template(\`
foo\`); import { $$component as _$$component } from "solid-refresh"; @@ -1162,10 +1162,10 @@ if (module.hot) { `; exports[`standard (client, hydratable) > fix build > refs > should work with a function 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; -import { getNextElement as _$getNextElement } from "solid-js/web"; -import { use as _$use } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; +import { getNextElement as _$getNextElement } from "@solidjs/web"; +import { ref as _$ref } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`
Comp\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -1174,7 +1174,7 @@ const _REGISTRY = _$$registry(); const Comp_1 = _$$component(_REGISTRY, "Comp_1", _props => /*@refresh jsx-skip*/(() => { var _el$ = _$getNextElement(_tmpl$); var _ref$ = _props.v0; - typeof _ref$ === "function" ? _$use(_ref$, _el$) : _props.v0 = _el$; + typeof _ref$ === "function" || Array.isArray(_ref$) ? _$ref(() => _ref$, _el$) : _props.v0 = _el$; return _el$; })(), { location: "example.jsx:4:19", @@ -1195,10 +1195,10 @@ if (module.hot) { `; exports[`standard (client, hydratable) > fix build > refs > should work with a mutable variable 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; -import { getNextElement as _$getNextElement } from "solid-js/web"; -import { use as _$use } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; +import { getNextElement as _$getNextElement } from "@solidjs/web"; +import { ref as _$ref } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`
Comp\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -1207,7 +1207,7 @@ const _REGISTRY = _$$registry(); const Comp_1 = _$$component(_REGISTRY, "Comp_1", _props => /*@refresh jsx-skip*/(() => { var _el$ = _$getNextElement(_tmpl$); var _ref$ = _props.v0; - typeof _ref$ === "function" ? _$use(_ref$, _el$) : _props.v0 = _el$; + typeof _ref$ === "function" || Array.isArray(_ref$) ? _$ref(() => _ref$, _el$) : _props.v0 = _el$; return _el$; })(), { location: "example.jsx:4:19", @@ -1234,10 +1234,10 @@ if (module.hot) { `; exports[`standard (client, hydratable) > fix build > signals as refs > should work 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; -import { getNextElement as _$getNextElement } from "solid-js/web"; -import { use as _$use } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; +import { getNextElement as _$getNextElement } from "@solidjs/web"; +import { ref as _$ref } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`
Comp\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -1247,7 +1247,7 @@ const _REGISTRY = _$$registry(); const Comp_1 = _$$component(_REGISTRY, "Comp_1", _props => /*@refresh jsx-skip*/(() => { var _el$ = _$getNextElement(_tmpl$); var _ref$ = _props.v0; - typeof _ref$ === "function" ? _$use(_ref$, _el$) : _props.v0 = _el$; + typeof _ref$ === "function" || Array.isArray(_ref$) ? _$ref(() => _ref$, _el$) : _props.v0 = _el$; return _el$; })(), { location: "example.jsx:6:19", @@ -1275,7 +1275,7 @@ if (module.hot) { `; exports[`standard (client, hydratable) > fix render > @refresh reload > should work 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; import { $$decline as _$$decline } from "solid-refresh"; // @refresh reload import { render } from 'solid-js/web'; @@ -1289,7 +1289,7 @@ if (module.hot) { `; exports[`standard (client, hydratable) > fix render > import specifiers > should work with ImportNamespaceSpecifier 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; @@ -1309,7 +1309,7 @@ if (module.hot) { `; exports[`standard (client, hydratable) > fix render > import specifiers > should work with ImportSpecifier + Identifier 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; @@ -1329,7 +1329,7 @@ if (module.hot) { `; exports[`standard (client, hydratable) > fix render > import specifiers > should work with ImportSpecifier + aliased Identifier 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; @@ -1349,7 +1349,7 @@ if (module.hot) { `; exports[`standard (client, hydratable) > fix render > import specifiers > should work with ImportSpecifier + aliased Identifier from StringLiteral 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; @@ -1369,7 +1369,7 @@ if (module.hot) { `; exports[`standard (client, hydratable) > fix render > top-level statements > should work with IfStatement 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; diff --git a/tests/client-hydratable/__snapshots__/vite.test.ts.snap b/tests/client-hydratable/__snapshots__/vite.test.ts.snap index f359e0d..6e1df11 100644 --- a/tests/client-hydratable/__snapshots__/vite.test.ts.snap +++ b/tests/client-hydratable/__snapshots__/vite.test.ts.snap @@ -34,8 +34,8 @@ if (import.meta.hot) { `; exports[`vite (client, hydratable) > ExportDefaultDeclaration w/ FunctionExpression > should skip ExportDefaultDeclaration w/ FunctionExpression with @refresh reload 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { getNextElement as _$getNextElement } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { getNextElement as _$getNextElement } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); // @refresh reload export default function Foo() { @@ -47,8 +47,8 @@ if (import.meta.hot) { `; exports[`vite (client, hydratable) > ExportDefaultDeclaration w/ FunctionExpression > should skip ExportDefaultDeclaration w/ FunctionExpression with @refresh skip 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { getNextElement as _$getNextElement } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { getNextElement as _$getNextElement } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); // @refresh skip export default function Foo() { @@ -57,9 +57,9 @@ export default function Foo() { `; exports[`vite (client, hydratable) > ExportDefaultDeclaration w/ FunctionExpression > should skip ExportDefaultDeclaration w/ FunctionExpression with invalid Component name 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; -import { getNextElement as _$getNextElement } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; +import { getNextElement as _$getNextElement } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -79,9 +79,9 @@ if (import.meta.hot) { `; exports[`vite (client, hydratable) > ExportDefaultDeclaration w/ FunctionExpression > should skip ExportDefaultDeclaration w/ FunctionExpression with valid Component name and >1 params 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; -import { getNextElement as _$getNextElement } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; +import { getNextElement as _$getNextElement } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -101,9 +101,9 @@ if (import.meta.hot) { `; exports[`vite (client, hydratable) > ExportDefaultDeclaration w/ FunctionExpression > should transform ExportDefaultDeclaration w/ FunctionExpression with valid Component name and params 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; -import { getNextElement as _$getNextElement } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; +import { getNextElement as _$getNextElement } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -127,9 +127,9 @@ if (import.meta.hot) { `; exports[`vite (client, hydratable) > ExportDefaultDeclaration w/ FunctionExpression > should transform ExportDefaultDeclaration w/ FunctionExpression with valid Component name and params 2`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; -import { getNextElement as _$getNextElement } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; +import { getNextElement as _$getNextElement } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -153,10 +153,10 @@ if (import.meta.hot) { `; exports[`vite (client, hydratable) > ExportDefaultDeclaration w/ FunctionExpression > should transform ExportDefaultDeclaration w/ FunctionExpression with valid Component name and params 3`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; -import { getNextElement as _$getNextElement } from "solid-js/web"; -import { insert as _$insert } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; +import { getNextElement as _$getNextElement } from "@solidjs/web"; +import { insert as _$insert } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -190,7 +190,7 @@ if (import.meta.hot) { `; exports[`vite (client, hydratable) > ExportDefaultDeclaration w/ FunctionExpression > should transform ExportDefaultDeclaration w/ FunctionExpression with valid Component name and params 4`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; @@ -223,9 +223,9 @@ if (import.meta.hot) { `; exports[`vite (client, hydratable) > ExportDefaultDeclaration w/ FunctionExpression > should transform ExportDefaultDeclaration w/ FunctionExpression with valid Component name and params 5`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; -import { getNextElement as _$getNextElement } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; +import { getNextElement as _$getNextElement } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`
foo\`), _tmpl$2 = /*#__PURE__*/_$template(\`
bar\`); import { $$component as _$$component } from "solid-refresh"; @@ -268,8 +268,8 @@ if (import.meta.hot) { `; exports[`vite (client, hydratable) > ExportNamedDeclaration w/ FunctionExpression > should skip ExportNamedDeclaration w/ FunctionExpression with @refresh reload 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { getNextElement as _$getNextElement } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { getNextElement as _$getNextElement } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); // @refresh reload export function Foo() { @@ -281,8 +281,8 @@ if (import.meta.hot) { `; exports[`vite (client, hydratable) > ExportNamedDeclaration w/ FunctionExpression > should skip ExportNamedDeclaration w/ FunctionExpression with @refresh skip 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { getNextElement as _$getNextElement } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { getNextElement as _$getNextElement } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); // @refresh skip export function Foo() { @@ -291,9 +291,9 @@ export function Foo() { `; exports[`vite (client, hydratable) > ExportNamedDeclaration w/ FunctionExpression > should skip ExportNamedDeclaration w/ FunctionExpression with invalid Component name 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; -import { getNextElement as _$getNextElement } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; +import { getNextElement as _$getNextElement } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -317,9 +317,9 @@ if (import.meta.hot) { `; exports[`vite (client, hydratable) > ExportNamedDeclaration w/ FunctionExpression > should skip ExportNamedDeclaration w/ FunctionExpression with valid Component name and >1 params 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; -import { getNextElement as _$getNextElement } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; +import { getNextElement as _$getNextElement } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -339,9 +339,9 @@ if (import.meta.hot) { `; exports[`vite (client, hydratable) > ExportNamedDeclaration w/ FunctionExpression > should transform ExportNamedDeclaration w/ FunctionExpression with valid Component name and params 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; -import { getNextElement as _$getNextElement } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; +import { getNextElement as _$getNextElement } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -365,9 +365,9 @@ if (import.meta.hot) { `; exports[`vite (client, hydratable) > ExportNamedDeclaration w/ FunctionExpression > should transform ExportNamedDeclaration w/ FunctionExpression with valid Component name and params 2`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; -import { getNextElement as _$getNextElement } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; +import { getNextElement as _$getNextElement } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -391,10 +391,10 @@ if (import.meta.hot) { `; exports[`vite (client, hydratable) > ExportNamedDeclaration w/ FunctionExpression > should transform ExportNamedDeclaration w/ FunctionExpression with valid Component name and params 3`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; -import { getNextElement as _$getNextElement } from "solid-js/web"; -import { insert as _$insert } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; +import { getNextElement as _$getNextElement } from "@solidjs/web"; +import { insert as _$insert } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -428,7 +428,7 @@ if (import.meta.hot) { `; exports[`vite (client, hydratable) > ExportNamedDeclaration w/ FunctionExpression > should transform ExportNamedDeclaration w/ FunctionExpression with valid Component name and params 4`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; @@ -461,9 +461,9 @@ if (import.meta.hot) { `; exports[`vite (client, hydratable) > ExportNamedDeclaration w/ FunctionExpression > should transform ExportNamedDeclaration w/ FunctionExpression with valid Component name and params 5`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; -import { getNextElement as _$getNextElement } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; +import { getNextElement as _$getNextElement } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`
bar\`), _tmpl$2 = /*#__PURE__*/_$template(\`
foo\`); import { $$component as _$$component } from "solid-refresh"; @@ -507,8 +507,8 @@ if (import.meta.hot) { `; exports[`vite (client, hydratable) > FunctionDeclaration > should skip FunctionDeclaration with @refresh reload 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { getNextElement as _$getNextElement } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { getNextElement as _$getNextElement } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); // @refresh reload function Foo() { @@ -520,8 +520,8 @@ if (import.meta.hot) { `; exports[`vite (client, hydratable) > FunctionDeclaration > should skip FunctionDeclaration with @refresh skip 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { getNextElement as _$getNextElement } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { getNextElement as _$getNextElement } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); // @refresh skip function Foo() { @@ -530,9 +530,9 @@ function Foo() { `; exports[`vite (client, hydratable) > FunctionDeclaration > should skip FunctionDeclaration with invalid Component name 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; -import { getNextElement as _$getNextElement } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; +import { getNextElement as _$getNextElement } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -552,9 +552,9 @@ if (import.meta.hot) { `; exports[`vite (client, hydratable) > FunctionDeclaration > should skip FunctionDeclaration with valid Component name and >1 params 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; -import { getNextElement as _$getNextElement } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; +import { getNextElement as _$getNextElement } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -574,9 +574,9 @@ if (import.meta.hot) { `; exports[`vite (client, hydratable) > FunctionDeclaration > should transform FunctionDeclaration with valid Component name and params 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; -import { getNextElement as _$getNextElement } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; +import { getNextElement as _$getNextElement } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -599,9 +599,9 @@ if (import.meta.hot) { `; exports[`vite (client, hydratable) > FunctionDeclaration > should transform FunctionDeclaration with valid Component name and params 2`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; -import { getNextElement as _$getNextElement } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; +import { getNextElement as _$getNextElement } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -624,10 +624,10 @@ if (import.meta.hot) { `; exports[`vite (client, hydratable) > FunctionDeclaration > should transform FunctionDeclaration with valid Component name and params 3`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; -import { getNextElement as _$getNextElement } from "solid-js/web"; -import { insert as _$insert } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; +import { getNextElement as _$getNextElement } from "@solidjs/web"; +import { insert as _$insert } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -660,7 +660,7 @@ if (import.meta.hot) { `; exports[`vite (client, hydratable) > FunctionDeclaration > should transform FunctionDeclaration with valid Component name and params 4`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; @@ -692,9 +692,9 @@ if (import.meta.hot) { `; exports[`vite (client, hydratable) > FunctionDeclaration > should transform FunctionDeclaration with valid Component name and params 5`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; -import { getNextElement as _$getNextElement } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; +import { getNextElement as _$getNextElement } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`
foo\`), _tmpl$2 = /*#__PURE__*/_$template(\`
bar\`); import { $$component as _$$component } from "solid-refresh"; @@ -736,8 +736,8 @@ if (import.meta.hot) { `; exports[`vite (client, hydratable) > VariableDeclarator > ArrowFunctionExpression > should skip VariableDeclarator w/ ArrowFunctionExpression with @refresh reload 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { getNextElement as _$getNextElement } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { getNextElement as _$getNextElement } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); // @refresh reload const Foo = () => { @@ -749,8 +749,8 @@ if (import.meta.hot) { `; exports[`vite (client, hydratable) > VariableDeclarator > ArrowFunctionExpression > should skip VariableDeclarator w/ ArrowFunctionExpression with @refresh skip 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { getNextElement as _$getNextElement } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { getNextElement as _$getNextElement } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); // @refresh skip const Foo = () => { @@ -759,9 +759,9 @@ const Foo = () => { `; exports[`vite (client, hydratable) > VariableDeclarator > ArrowFunctionExpression > should skip VariableDeclarator w/ ArrowFunctionExpression with invalid Component name 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; -import { getNextElement as _$getNextElement } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; +import { getNextElement as _$getNextElement } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -781,9 +781,9 @@ if (import.meta.hot) { `; exports[`vite (client, hydratable) > VariableDeclarator > ArrowFunctionExpression > should skip VariableDeclarator w/ ArrowFunctionExpression with valid Component name and >1 params 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; -import { getNextElement as _$getNextElement } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; +import { getNextElement as _$getNextElement } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -803,9 +803,9 @@ if (import.meta.hot) { `; exports[`vite (client, hydratable) > VariableDeclarator > ArrowFunctionExpression > should transform VariableDeclarator w/ ArrowFunctionExpression with valid Component name and params 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; -import { getNextElement as _$getNextElement } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; +import { getNextElement as _$getNextElement } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -828,9 +828,9 @@ if (import.meta.hot) { `; exports[`vite (client, hydratable) > VariableDeclarator > ArrowFunctionExpression > should transform VariableDeclarator w/ ArrowFunctionExpression with valid Component name and params 2`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; -import { getNextElement as _$getNextElement } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; +import { getNextElement as _$getNextElement } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -853,10 +853,10 @@ if (import.meta.hot) { `; exports[`vite (client, hydratable) > VariableDeclarator > ArrowFunctionExpression > should transform VariableDeclarator w/ ArrowFunctionExpression with valid Component name and params 3`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; -import { getNextElement as _$getNextElement } from "solid-js/web"; -import { insert as _$insert } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; +import { getNextElement as _$getNextElement } from "@solidjs/web"; +import { insert as _$insert } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -889,7 +889,7 @@ if (import.meta.hot) { `; exports[`vite (client, hydratable) > VariableDeclarator > ArrowFunctionExpression > should transform VariableDeclarator w/ ArrowFunctionExpression with valid Component name and params 4`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; @@ -921,9 +921,9 @@ if (import.meta.hot) { `; exports[`vite (client, hydratable) > VariableDeclarator > ArrowFunctionExpression > should transform VariableDeclarator w/ ArrowFunctionExpression with valid Component name and params 5`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; -import { getNextElement as _$getNextElement } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; +import { getNextElement as _$getNextElement } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`
bar\`), _tmpl$2 = /*#__PURE__*/_$template(\`
foo\`); import { $$component as _$$component } from "solid-refresh"; @@ -965,8 +965,8 @@ if (import.meta.hot) { `; exports[`vite (client, hydratable) > VariableDeclarator > FunctionExpression > should skip VariableDeclarator w/ FunctionExpression with @refresh reload 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { getNextElement as _$getNextElement } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { getNextElement as _$getNextElement } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); // @refresh reload const Foo = function () { @@ -978,8 +978,8 @@ if (import.meta.hot) { `; exports[`vite (client, hydratable) > VariableDeclarator > FunctionExpression > should skip VariableDeclarator w/ FunctionExpression with @refresh skip 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { getNextElement as _$getNextElement } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { getNextElement as _$getNextElement } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); // @refresh skip const Foo = function () { @@ -988,9 +988,9 @@ const Foo = function () { `; exports[`vite (client, hydratable) > VariableDeclarator > FunctionExpression > should skip VariableDeclarator w/ FunctionExpression with invalid Component name 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; -import { getNextElement as _$getNextElement } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; +import { getNextElement as _$getNextElement } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -1010,9 +1010,9 @@ if (import.meta.hot) { `; exports[`vite (client, hydratable) > VariableDeclarator > FunctionExpression > should skip VariableDeclarator w/ FunctionExpression with valid Component name and >1 params 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; -import { getNextElement as _$getNextElement } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; +import { getNextElement as _$getNextElement } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -1032,9 +1032,9 @@ if (import.meta.hot) { `; exports[`vite (client, hydratable) > VariableDeclarator > FunctionExpression > should transform VariableDeclarator w/ FunctionExpression with valid Component name and params 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; -import { getNextElement as _$getNextElement } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; +import { getNextElement as _$getNextElement } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -1057,9 +1057,9 @@ if (import.meta.hot) { `; exports[`vite (client, hydratable) > VariableDeclarator > FunctionExpression > should transform VariableDeclarator w/ FunctionExpression with valid Component name and params 2`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; -import { getNextElement as _$getNextElement } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; +import { getNextElement as _$getNextElement } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -1082,10 +1082,10 @@ if (import.meta.hot) { `; exports[`vite (client, hydratable) > VariableDeclarator > FunctionExpression > should transform VariableDeclarator w/ FunctionExpression with valid Component name and params 3`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; -import { getNextElement as _$getNextElement } from "solid-js/web"; -import { insert as _$insert } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; +import { getNextElement as _$getNextElement } from "@solidjs/web"; +import { insert as _$insert } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -1118,7 +1118,7 @@ if (import.meta.hot) { `; exports[`vite (client, hydratable) > VariableDeclarator > FunctionExpression > should transform VariableDeclarator w/ FunctionExpression with valid Component name and params 4`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; @@ -1150,9 +1150,9 @@ if (import.meta.hot) { `; exports[`vite (client, hydratable) > VariableDeclarator > FunctionExpression > should transform VariableDeclarator w/ FunctionExpression with valid Component name and params 5`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; -import { getNextElement as _$getNextElement } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; +import { getNextElement as _$getNextElement } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`
bar\`), _tmpl$2 = /*#__PURE__*/_$template(\`
foo\`); import { $$component as _$$component } from "solid-refresh"; @@ -1194,10 +1194,10 @@ if (import.meta.hot) { `; exports[`vite (client, hydratable) > fix build > refs > should work with a function 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; -import { getNextElement as _$getNextElement } from "solid-js/web"; -import { use as _$use } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; +import { getNextElement as _$getNextElement } from "@solidjs/web"; +import { ref as _$ref } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`
Comp\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -1206,7 +1206,7 @@ const _REGISTRY = _$$registry(); const Comp_1 = _$$component(_REGISTRY, "Comp_1", _props => /*@refresh jsx-skip*/(() => { var _el$ = _$getNextElement(_tmpl$); var _ref$ = _props.v0; - typeof _ref$ === "function" ? _$use(_ref$, _el$) : _props.v0 = _el$; + typeof _ref$ === "function" || Array.isArray(_ref$) ? _$ref(() => _ref$, _el$) : _props.v0 = _el$; return _el$; })(), { location: "example.jsx:4:19", @@ -1228,10 +1228,10 @@ if (import.meta.hot) { `; exports[`vite (client, hydratable) > fix build > refs > should work with a mutable variable 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; -import { getNextElement as _$getNextElement } from "solid-js/web"; -import { use as _$use } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; +import { getNextElement as _$getNextElement } from "@solidjs/web"; +import { ref as _$ref } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`
Comp\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -1240,7 +1240,7 @@ const _REGISTRY = _$$registry(); const Comp_1 = _$$component(_REGISTRY, "Comp_1", _props => /*@refresh jsx-skip*/(() => { var _el$ = _$getNextElement(_tmpl$); var _ref$ = _props.v0; - typeof _ref$ === "function" ? _$use(_ref$, _el$) : _props.v0 = _el$; + typeof _ref$ === "function" || Array.isArray(_ref$) ? _$ref(() => _ref$, _el$) : _props.v0 = _el$; return _el$; })(), { location: "example.jsx:4:19", @@ -1268,10 +1268,10 @@ if (import.meta.hot) { `; exports[`vite (client, hydratable) > fix build > signals as refs > should work 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; -import { getNextElement as _$getNextElement } from "solid-js/web"; -import { use as _$use } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; +import { getNextElement as _$getNextElement } from "@solidjs/web"; +import { ref as _$ref } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`
Comp\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -1281,7 +1281,7 @@ const _REGISTRY = _$$registry(); const Comp_1 = _$$component(_REGISTRY, "Comp_1", _props => /*@refresh jsx-skip*/(() => { var _el$ = _$getNextElement(_tmpl$); var _ref$ = _props.v0; - typeof _ref$ === "function" ? _$use(_ref$, _el$) : _props.v0 = _el$; + typeof _ref$ === "function" || Array.isArray(_ref$) ? _$ref(() => _ref$, _el$) : _props.v0 = _el$; return _el$; })(), { location: "example.jsx:6:19", @@ -1310,7 +1310,7 @@ if (import.meta.hot) { `; exports[`vite (client, hydratable) > fix render > @refresh reload > should work 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; // @refresh reload import { render } from 'solid-js/web'; if (root) { @@ -1323,7 +1323,7 @@ if (import.meta.hot) { `; exports[`vite (client, hydratable) > fix render > import specifiers > should work with ImportNamespaceSpecifier 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; @@ -1344,7 +1344,7 @@ if (import.meta.hot) { `; exports[`vite (client, hydratable) > fix render > import specifiers > should work with ImportSpecifier + Identifier 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; @@ -1365,7 +1365,7 @@ if (import.meta.hot) { `; exports[`vite (client, hydratable) > fix render > import specifiers > should work with ImportSpecifier + aliased Identifier 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; @@ -1386,7 +1386,7 @@ if (import.meta.hot) { `; exports[`vite (client, hydratable) > fix render > import specifiers > should work with ImportSpecifier + aliased Identifier from StringLiteral 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; @@ -1407,7 +1407,7 @@ if (import.meta.hot) { `; exports[`vite (client, hydratable) > fix render > top-level statements > should work with IfStatement 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; diff --git a/tests/client-hydratable/__snapshots__/webpack5.test.ts.snap b/tests/client-hydratable/__snapshots__/webpack5.test.ts.snap index 6043390..e40fba2 100644 --- a/tests/client-hydratable/__snapshots__/webpack5.test.ts.snap +++ b/tests/client-hydratable/__snapshots__/webpack5.test.ts.snap @@ -32,8 +32,8 @@ if (import.meta.webpackHot) { `; exports[`webpack5 (client, hydratable) > ExportDefaultDeclaration w/ FunctionExpression > should skip ExportDefaultDeclaration w/ FunctionExpression with @refresh reload 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { getNextElement as _$getNextElement } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { getNextElement as _$getNextElement } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$decline as _$$decline } from "solid-refresh"; // @refresh reload @@ -46,8 +46,8 @@ if (import.meta.webpackHot) { `; exports[`webpack5 (client, hydratable) > ExportDefaultDeclaration w/ FunctionExpression > should skip ExportDefaultDeclaration w/ FunctionExpression with @refresh skip 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { getNextElement as _$getNextElement } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { getNextElement as _$getNextElement } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); // @refresh skip export default function Foo() { @@ -56,9 +56,9 @@ export default function Foo() { `; exports[`webpack5 (client, hydratable) > ExportDefaultDeclaration w/ FunctionExpression > should skip ExportDefaultDeclaration w/ FunctionExpression with invalid Component name 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; -import { getNextElement as _$getNextElement } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; +import { getNextElement as _$getNextElement } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -77,9 +77,9 @@ if (import.meta.webpackHot) { `; exports[`webpack5 (client, hydratable) > ExportDefaultDeclaration w/ FunctionExpression > should skip ExportDefaultDeclaration w/ FunctionExpression with valid Component name and >1 params 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; -import { getNextElement as _$getNextElement } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; +import { getNextElement as _$getNextElement } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -98,9 +98,9 @@ if (import.meta.webpackHot) { `; exports[`webpack5 (client, hydratable) > ExportDefaultDeclaration w/ FunctionExpression > should transform ExportDefaultDeclaration w/ FunctionExpression with valid Component name and params 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; -import { getNextElement as _$getNextElement } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; +import { getNextElement as _$getNextElement } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -123,9 +123,9 @@ if (import.meta.webpackHot) { `; exports[`webpack5 (client, hydratable) > ExportDefaultDeclaration w/ FunctionExpression > should transform ExportDefaultDeclaration w/ FunctionExpression with valid Component name and params 2`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; -import { getNextElement as _$getNextElement } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; +import { getNextElement as _$getNextElement } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -148,10 +148,10 @@ if (import.meta.webpackHot) { `; exports[`webpack5 (client, hydratable) > ExportDefaultDeclaration w/ FunctionExpression > should transform ExportDefaultDeclaration w/ FunctionExpression with valid Component name and params 3`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; -import { getNextElement as _$getNextElement } from "solid-js/web"; -import { insert as _$insert } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; +import { getNextElement as _$getNextElement } from "@solidjs/web"; +import { insert as _$insert } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -184,7 +184,7 @@ if (import.meta.webpackHot) { `; exports[`webpack5 (client, hydratable) > ExportDefaultDeclaration w/ FunctionExpression > should transform ExportDefaultDeclaration w/ FunctionExpression with valid Component name and params 4`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; @@ -216,9 +216,9 @@ if (import.meta.webpackHot) { `; exports[`webpack5 (client, hydratable) > ExportDefaultDeclaration w/ FunctionExpression > should transform ExportDefaultDeclaration w/ FunctionExpression with valid Component name and params 5`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; -import { getNextElement as _$getNextElement } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; +import { getNextElement as _$getNextElement } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`
foo\`), _tmpl$2 = /*#__PURE__*/_$template(\`
bar\`); import { $$component as _$$component } from "solid-refresh"; @@ -260,8 +260,8 @@ if (import.meta.webpackHot) { `; exports[`webpack5 (client, hydratable) > ExportNamedDeclaration w/ FunctionExpression > should skip ExportNamedDeclaration w/ FunctionExpression with @refresh reload 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { getNextElement as _$getNextElement } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { getNextElement as _$getNextElement } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$decline as _$$decline } from "solid-refresh"; // @refresh reload @@ -274,8 +274,8 @@ if (import.meta.webpackHot) { `; exports[`webpack5 (client, hydratable) > ExportNamedDeclaration w/ FunctionExpression > should skip ExportNamedDeclaration w/ FunctionExpression with @refresh skip 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { getNextElement as _$getNextElement } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { getNextElement as _$getNextElement } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); // @refresh skip export function Foo() { @@ -284,9 +284,9 @@ export function Foo() { `; exports[`webpack5 (client, hydratable) > ExportNamedDeclaration w/ FunctionExpression > should skip ExportNamedDeclaration w/ FunctionExpression with invalid Component name 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; -import { getNextElement as _$getNextElement } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; +import { getNextElement as _$getNextElement } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -309,9 +309,9 @@ if (import.meta.webpackHot) { `; exports[`webpack5 (client, hydratable) > ExportNamedDeclaration w/ FunctionExpression > should skip ExportNamedDeclaration w/ FunctionExpression with valid Component name and >1 params 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; -import { getNextElement as _$getNextElement } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; +import { getNextElement as _$getNextElement } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -330,9 +330,9 @@ if (import.meta.webpackHot) { `; exports[`webpack5 (client, hydratable) > ExportNamedDeclaration w/ FunctionExpression > should transform ExportNamedDeclaration w/ FunctionExpression with valid Component name and params 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; -import { getNextElement as _$getNextElement } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; +import { getNextElement as _$getNextElement } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -355,9 +355,9 @@ if (import.meta.webpackHot) { `; exports[`webpack5 (client, hydratable) > ExportNamedDeclaration w/ FunctionExpression > should transform ExportNamedDeclaration w/ FunctionExpression with valid Component name and params 2`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; -import { getNextElement as _$getNextElement } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; +import { getNextElement as _$getNextElement } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -380,10 +380,10 @@ if (import.meta.webpackHot) { `; exports[`webpack5 (client, hydratable) > ExportNamedDeclaration w/ FunctionExpression > should transform ExportNamedDeclaration w/ FunctionExpression with valid Component name and params 3`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; -import { getNextElement as _$getNextElement } from "solid-js/web"; -import { insert as _$insert } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; +import { getNextElement as _$getNextElement } from "@solidjs/web"; +import { insert as _$insert } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -416,7 +416,7 @@ if (import.meta.webpackHot) { `; exports[`webpack5 (client, hydratable) > ExportNamedDeclaration w/ FunctionExpression > should transform ExportNamedDeclaration w/ FunctionExpression with valid Component name and params 4`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; @@ -448,9 +448,9 @@ if (import.meta.webpackHot) { `; exports[`webpack5 (client, hydratable) > ExportNamedDeclaration w/ FunctionExpression > should transform ExportNamedDeclaration w/ FunctionExpression with valid Component name and params 5`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; -import { getNextElement as _$getNextElement } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; +import { getNextElement as _$getNextElement } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`
bar\`), _tmpl$2 = /*#__PURE__*/_$template(\`
foo\`); import { $$component as _$$component } from "solid-refresh"; @@ -493,8 +493,8 @@ if (import.meta.webpackHot) { `; exports[`webpack5 (client, hydratable) > FunctionDeclaration > should skip FunctionDeclaration with @refresh reload 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { getNextElement as _$getNextElement } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { getNextElement as _$getNextElement } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$decline as _$$decline } from "solid-refresh"; // @refresh reload @@ -507,8 +507,8 @@ if (import.meta.webpackHot) { `; exports[`webpack5 (client, hydratable) > FunctionDeclaration > should skip FunctionDeclaration with @refresh skip 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { getNextElement as _$getNextElement } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { getNextElement as _$getNextElement } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); // @refresh skip function Foo() { @@ -517,9 +517,9 @@ function Foo() { `; exports[`webpack5 (client, hydratable) > FunctionDeclaration > should skip FunctionDeclaration with invalid Component name 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; -import { getNextElement as _$getNextElement } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; +import { getNextElement as _$getNextElement } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -538,9 +538,9 @@ if (import.meta.webpackHot) { `; exports[`webpack5 (client, hydratable) > FunctionDeclaration > should skip FunctionDeclaration with valid Component name and >1 params 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; -import { getNextElement as _$getNextElement } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; +import { getNextElement as _$getNextElement } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -559,9 +559,9 @@ if (import.meta.webpackHot) { `; exports[`webpack5 (client, hydratable) > FunctionDeclaration > should transform FunctionDeclaration with valid Component name and params 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; -import { getNextElement as _$getNextElement } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; +import { getNextElement as _$getNextElement } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -583,9 +583,9 @@ if (import.meta.webpackHot) { `; exports[`webpack5 (client, hydratable) > FunctionDeclaration > should transform FunctionDeclaration with valid Component name and params 2`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; -import { getNextElement as _$getNextElement } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; +import { getNextElement as _$getNextElement } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -607,10 +607,10 @@ if (import.meta.webpackHot) { `; exports[`webpack5 (client, hydratable) > FunctionDeclaration > should transform FunctionDeclaration with valid Component name and params 3`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; -import { getNextElement as _$getNextElement } from "solid-js/web"; -import { insert as _$insert } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; +import { getNextElement as _$getNextElement } from "@solidjs/web"; +import { insert as _$insert } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -642,7 +642,7 @@ if (import.meta.webpackHot) { `; exports[`webpack5 (client, hydratable) > FunctionDeclaration > should transform FunctionDeclaration with valid Component name and params 4`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; @@ -673,9 +673,9 @@ if (import.meta.webpackHot) { `; exports[`webpack5 (client, hydratable) > FunctionDeclaration > should transform FunctionDeclaration with valid Component name and params 5`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; -import { getNextElement as _$getNextElement } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; +import { getNextElement as _$getNextElement } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`
foo\`), _tmpl$2 = /*#__PURE__*/_$template(\`
bar\`); import { $$component as _$$component } from "solid-refresh"; @@ -716,8 +716,8 @@ if (import.meta.webpackHot) { `; exports[`webpack5 (client, hydratable) > VariableDeclarator > ArrowFunctionExpression > should skip VariableDeclarator w/ ArrowFunctionExpression with @refresh reload 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { getNextElement as _$getNextElement } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { getNextElement as _$getNextElement } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$decline as _$$decline } from "solid-refresh"; // @refresh reload @@ -730,8 +730,8 @@ if (import.meta.webpackHot) { `; exports[`webpack5 (client, hydratable) > VariableDeclarator > ArrowFunctionExpression > should skip VariableDeclarator w/ ArrowFunctionExpression with @refresh skip 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { getNextElement as _$getNextElement } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { getNextElement as _$getNextElement } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); // @refresh skip const Foo = () => { @@ -740,9 +740,9 @@ const Foo = () => { `; exports[`webpack5 (client, hydratable) > VariableDeclarator > ArrowFunctionExpression > should skip VariableDeclarator w/ ArrowFunctionExpression with invalid Component name 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; -import { getNextElement as _$getNextElement } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; +import { getNextElement as _$getNextElement } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -761,9 +761,9 @@ if (import.meta.webpackHot) { `; exports[`webpack5 (client, hydratable) > VariableDeclarator > ArrowFunctionExpression > should skip VariableDeclarator w/ ArrowFunctionExpression with valid Component name and >1 params 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; -import { getNextElement as _$getNextElement } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; +import { getNextElement as _$getNextElement } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -782,9 +782,9 @@ if (import.meta.webpackHot) { `; exports[`webpack5 (client, hydratable) > VariableDeclarator > ArrowFunctionExpression > should transform VariableDeclarator w/ ArrowFunctionExpression with valid Component name and params 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; -import { getNextElement as _$getNextElement } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; +import { getNextElement as _$getNextElement } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -806,9 +806,9 @@ if (import.meta.webpackHot) { `; exports[`webpack5 (client, hydratable) > VariableDeclarator > ArrowFunctionExpression > should transform VariableDeclarator w/ ArrowFunctionExpression with valid Component name and params 2`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; -import { getNextElement as _$getNextElement } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; +import { getNextElement as _$getNextElement } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -830,10 +830,10 @@ if (import.meta.webpackHot) { `; exports[`webpack5 (client, hydratable) > VariableDeclarator > ArrowFunctionExpression > should transform VariableDeclarator w/ ArrowFunctionExpression with valid Component name and params 3`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; -import { getNextElement as _$getNextElement } from "solid-js/web"; -import { insert as _$insert } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; +import { getNextElement as _$getNextElement } from "@solidjs/web"; +import { insert as _$insert } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -865,7 +865,7 @@ if (import.meta.webpackHot) { `; exports[`webpack5 (client, hydratable) > VariableDeclarator > ArrowFunctionExpression > should transform VariableDeclarator w/ ArrowFunctionExpression with valid Component name and params 4`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; @@ -896,9 +896,9 @@ if (import.meta.webpackHot) { `; exports[`webpack5 (client, hydratable) > VariableDeclarator > ArrowFunctionExpression > should transform VariableDeclarator w/ ArrowFunctionExpression with valid Component name and params 5`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; -import { getNextElement as _$getNextElement } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; +import { getNextElement as _$getNextElement } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`
bar\`), _tmpl$2 = /*#__PURE__*/_$template(\`
foo\`); import { $$component as _$$component } from "solid-refresh"; @@ -939,8 +939,8 @@ if (import.meta.webpackHot) { `; exports[`webpack5 (client, hydratable) > VariableDeclarator > FunctionExpression > should skip VariableDeclarator w/ FunctionExpression with @refresh reload 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { getNextElement as _$getNextElement } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { getNextElement as _$getNextElement } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$decline as _$$decline } from "solid-refresh"; // @refresh reload @@ -953,8 +953,8 @@ if (import.meta.webpackHot) { `; exports[`webpack5 (client, hydratable) > VariableDeclarator > FunctionExpression > should skip VariableDeclarator w/ FunctionExpression with @refresh skip 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { getNextElement as _$getNextElement } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { getNextElement as _$getNextElement } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); // @refresh skip const Foo = function () { @@ -963,9 +963,9 @@ const Foo = function () { `; exports[`webpack5 (client, hydratable) > VariableDeclarator > FunctionExpression > should skip VariableDeclarator w/ FunctionExpression with invalid Component name 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; -import { getNextElement as _$getNextElement } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; +import { getNextElement as _$getNextElement } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -984,9 +984,9 @@ if (import.meta.webpackHot) { `; exports[`webpack5 (client, hydratable) > VariableDeclarator > FunctionExpression > should skip VariableDeclarator w/ FunctionExpression with valid Component name and >1 params 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; -import { getNextElement as _$getNextElement } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; +import { getNextElement as _$getNextElement } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -1005,9 +1005,9 @@ if (import.meta.webpackHot) { `; exports[`webpack5 (client, hydratable) > VariableDeclarator > FunctionExpression > should transform VariableDeclarator w/ FunctionExpression with valid Component name and params 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; -import { getNextElement as _$getNextElement } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; +import { getNextElement as _$getNextElement } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -1029,9 +1029,9 @@ if (import.meta.webpackHot) { `; exports[`webpack5 (client, hydratable) > VariableDeclarator > FunctionExpression > should transform VariableDeclarator w/ FunctionExpression with valid Component name and params 2`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; -import { getNextElement as _$getNextElement } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; +import { getNextElement as _$getNextElement } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -1053,10 +1053,10 @@ if (import.meta.webpackHot) { `; exports[`webpack5 (client, hydratable) > VariableDeclarator > FunctionExpression > should transform VariableDeclarator w/ FunctionExpression with valid Component name and params 3`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; -import { getNextElement as _$getNextElement } from "solid-js/web"; -import { insert as _$insert } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; +import { getNextElement as _$getNextElement } from "@solidjs/web"; +import { insert as _$insert } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -1088,7 +1088,7 @@ if (import.meta.webpackHot) { `; exports[`webpack5 (client, hydratable) > VariableDeclarator > FunctionExpression > should transform VariableDeclarator w/ FunctionExpression with valid Component name and params 4`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; @@ -1119,9 +1119,9 @@ if (import.meta.webpackHot) { `; exports[`webpack5 (client, hydratable) > VariableDeclarator > FunctionExpression > should transform VariableDeclarator w/ FunctionExpression with valid Component name and params 5`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; -import { getNextElement as _$getNextElement } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; +import { getNextElement as _$getNextElement } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`
bar\`), _tmpl$2 = /*#__PURE__*/_$template(\`
foo\`); import { $$component as _$$component } from "solid-refresh"; @@ -1162,10 +1162,10 @@ if (import.meta.webpackHot) { `; exports[`webpack5 (client, hydratable) > fix build > refs > should work with a function 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; -import { getNextElement as _$getNextElement } from "solid-js/web"; -import { use as _$use } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; +import { getNextElement as _$getNextElement } from "@solidjs/web"; +import { ref as _$ref } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`
Comp\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -1174,7 +1174,7 @@ const _REGISTRY = _$$registry(); const Comp_1 = _$$component(_REGISTRY, "Comp_1", _props => /*@refresh jsx-skip*/(() => { var _el$ = _$getNextElement(_tmpl$); var _ref$ = _props.v0; - typeof _ref$ === "function" ? _$use(_ref$, _el$) : _props.v0 = _el$; + typeof _ref$ === "function" || Array.isArray(_ref$) ? _$ref(() => _ref$, _el$) : _props.v0 = _el$; return _el$; })(), { location: "example.jsx:4:19", @@ -1195,10 +1195,10 @@ if (import.meta.webpackHot) { `; exports[`webpack5 (client, hydratable) > fix build > refs > should work with a mutable variable 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; -import { getNextElement as _$getNextElement } from "solid-js/web"; -import { use as _$use } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; +import { getNextElement as _$getNextElement } from "@solidjs/web"; +import { ref as _$ref } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`
Comp\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -1207,7 +1207,7 @@ const _REGISTRY = _$$registry(); const Comp_1 = _$$component(_REGISTRY, "Comp_1", _props => /*@refresh jsx-skip*/(() => { var _el$ = _$getNextElement(_tmpl$); var _ref$ = _props.v0; - typeof _ref$ === "function" ? _$use(_ref$, _el$) : _props.v0 = _el$; + typeof _ref$ === "function" || Array.isArray(_ref$) ? _$ref(() => _ref$, _el$) : _props.v0 = _el$; return _el$; })(), { location: "example.jsx:4:19", @@ -1234,10 +1234,10 @@ if (import.meta.webpackHot) { `; exports[`webpack5 (client, hydratable) > fix build > signals as refs > should work 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; -import { getNextElement as _$getNextElement } from "solid-js/web"; -import { use as _$use } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; +import { getNextElement as _$getNextElement } from "@solidjs/web"; +import { ref as _$ref } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`
Comp\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -1247,7 +1247,7 @@ const _REGISTRY = _$$registry(); const Comp_1 = _$$component(_REGISTRY, "Comp_1", _props => /*@refresh jsx-skip*/(() => { var _el$ = _$getNextElement(_tmpl$); var _ref$ = _props.v0; - typeof _ref$ === "function" ? _$use(_ref$, _el$) : _props.v0 = _el$; + typeof _ref$ === "function" || Array.isArray(_ref$) ? _$ref(() => _ref$, _el$) : _props.v0 = _el$; return _el$; })(), { location: "example.jsx:6:19", @@ -1275,7 +1275,7 @@ if (import.meta.webpackHot) { `; exports[`webpack5 (client, hydratable) > fix render > @refresh reload > should work 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; import { $$decline as _$$decline } from "solid-refresh"; // @refresh reload import { render } from 'solid-js/web'; @@ -1289,7 +1289,7 @@ if (import.meta.webpackHot) { `; exports[`webpack5 (client, hydratable) > fix render > import specifiers > should work with ImportNamespaceSpecifier 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; @@ -1309,7 +1309,7 @@ if (import.meta.webpackHot) { `; exports[`webpack5 (client, hydratable) > fix render > import specifiers > should work with ImportSpecifier + Identifier 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; @@ -1329,7 +1329,7 @@ if (import.meta.webpackHot) { `; exports[`webpack5 (client, hydratable) > fix render > import specifiers > should work with ImportSpecifier + aliased Identifier 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; @@ -1349,7 +1349,7 @@ if (import.meta.webpackHot) { `; exports[`webpack5 (client, hydratable) > fix render > import specifiers > should work with ImportSpecifier + aliased Identifier from StringLiteral 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; @@ -1369,7 +1369,7 @@ if (import.meta.webpackHot) { `; exports[`webpack5 (client, hydratable) > fix render > top-level statements > should work with IfStatement 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; diff --git a/tests/client/__snapshots__/esm.test.ts.snap b/tests/client/__snapshots__/esm.test.ts.snap index 145d2fc..c370c5e 100644 --- a/tests/client/__snapshots__/esm.test.ts.snap +++ b/tests/client/__snapshots__/esm.test.ts.snap @@ -32,7 +32,7 @@ if (import.meta.hot) { `; exports[`esm (client, non-hydratable) > ExportDefaultDeclaration w/ FunctionExpression > should skip ExportDefaultDeclaration w/ FunctionExpression with @refresh reload 1`] = ` -"import { template as _$template } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$decline as _$$decline } from "solid-refresh"; // @refresh reload @@ -45,7 +45,7 @@ if (import.meta.hot) { `; exports[`esm (client, non-hydratable) > ExportDefaultDeclaration w/ FunctionExpression > should skip ExportDefaultDeclaration w/ FunctionExpression with @refresh skip 1`] = ` -"import { template as _$template } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); // @refresh skip export default function Foo() { @@ -54,8 +54,8 @@ export default function Foo() { `; exports[`esm (client, non-hydratable) > ExportDefaultDeclaration w/ FunctionExpression > should skip ExportDefaultDeclaration w/ FunctionExpression with invalid Component name 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -74,8 +74,8 @@ if (import.meta.hot) { `; exports[`esm (client, non-hydratable) > ExportDefaultDeclaration w/ FunctionExpression > should skip ExportDefaultDeclaration w/ FunctionExpression with valid Component name and >1 params 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -94,8 +94,8 @@ if (import.meta.hot) { `; exports[`esm (client, non-hydratable) > ExportDefaultDeclaration w/ FunctionExpression > should transform ExportDefaultDeclaration w/ FunctionExpression with valid Component name and params 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -118,8 +118,8 @@ if (import.meta.hot) { `; exports[`esm (client, non-hydratable) > ExportDefaultDeclaration w/ FunctionExpression > should transform ExportDefaultDeclaration w/ FunctionExpression with valid Component name and params 2`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -142,9 +142,9 @@ if (import.meta.hot) { `; exports[`esm (client, non-hydratable) > ExportDefaultDeclaration w/ FunctionExpression > should transform ExportDefaultDeclaration w/ FunctionExpression with valid Component name and params 3`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; -import { insert as _$insert } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; +import { insert as _$insert } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -177,7 +177,7 @@ if (import.meta.hot) { `; exports[`esm (client, non-hydratable) > ExportDefaultDeclaration w/ FunctionExpression > should transform ExportDefaultDeclaration w/ FunctionExpression with valid Component name and params 4`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; @@ -209,8 +209,8 @@ if (import.meta.hot) { `; exports[`esm (client, non-hydratable) > ExportDefaultDeclaration w/ FunctionExpression > should transform ExportDefaultDeclaration w/ FunctionExpression with valid Component name and params 5`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`
foo\`), _tmpl$2 = /*#__PURE__*/_$template(\`
bar\`); import { $$component as _$$component } from "solid-refresh"; @@ -252,7 +252,7 @@ if (import.meta.hot) { `; exports[`esm (client, non-hydratable) > ExportNamedDeclaration w/ FunctionExpression > should skip ExportNamedDeclaration w/ FunctionExpression with @refresh reload 1`] = ` -"import { template as _$template } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$decline as _$$decline } from "solid-refresh"; // @refresh reload @@ -265,7 +265,7 @@ if (import.meta.hot) { `; exports[`esm (client, non-hydratable) > ExportNamedDeclaration w/ FunctionExpression > should skip ExportNamedDeclaration w/ FunctionExpression with @refresh skip 1`] = ` -"import { template as _$template } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); // @refresh skip export function Foo() { @@ -274,8 +274,8 @@ export function Foo() { `; exports[`esm (client, non-hydratable) > ExportNamedDeclaration w/ FunctionExpression > should skip ExportNamedDeclaration w/ FunctionExpression with invalid Component name 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -298,8 +298,8 @@ if (import.meta.hot) { `; exports[`esm (client, non-hydratable) > ExportNamedDeclaration w/ FunctionExpression > should skip ExportNamedDeclaration w/ FunctionExpression with valid Component name and >1 params 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -318,8 +318,8 @@ if (import.meta.hot) { `; exports[`esm (client, non-hydratable) > ExportNamedDeclaration w/ FunctionExpression > should transform ExportNamedDeclaration w/ FunctionExpression with valid Component name and params 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -342,8 +342,8 @@ if (import.meta.hot) { `; exports[`esm (client, non-hydratable) > ExportNamedDeclaration w/ FunctionExpression > should transform ExportNamedDeclaration w/ FunctionExpression with valid Component name and params 2`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -366,9 +366,9 @@ if (import.meta.hot) { `; exports[`esm (client, non-hydratable) > ExportNamedDeclaration w/ FunctionExpression > should transform ExportNamedDeclaration w/ FunctionExpression with valid Component name and params 3`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; -import { insert as _$insert } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; +import { insert as _$insert } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -401,7 +401,7 @@ if (import.meta.hot) { `; exports[`esm (client, non-hydratable) > ExportNamedDeclaration w/ FunctionExpression > should transform ExportNamedDeclaration w/ FunctionExpression with valid Component name and params 4`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; @@ -433,8 +433,8 @@ if (import.meta.hot) { `; exports[`esm (client, non-hydratable) > ExportNamedDeclaration w/ FunctionExpression > should transform ExportNamedDeclaration w/ FunctionExpression with valid Component name and params 5`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`
bar\`), _tmpl$2 = /*#__PURE__*/_$template(\`
foo\`); import { $$component as _$$component } from "solid-refresh"; @@ -477,7 +477,7 @@ if (import.meta.hot) { `; exports[`esm (client, non-hydratable) > FunctionDeclaration > should skip FunctionDeclaration with @refresh reload 1`] = ` -"import { template as _$template } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$decline as _$$decline } from "solid-refresh"; // @refresh reload @@ -490,7 +490,7 @@ if (import.meta.hot) { `; exports[`esm (client, non-hydratable) > FunctionDeclaration > should skip FunctionDeclaration with @refresh skip 1`] = ` -"import { template as _$template } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); // @refresh skip function Foo() { @@ -499,8 +499,8 @@ function Foo() { `; exports[`esm (client, non-hydratable) > FunctionDeclaration > should skip FunctionDeclaration with invalid Component name 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -519,8 +519,8 @@ if (import.meta.hot) { `; exports[`esm (client, non-hydratable) > FunctionDeclaration > should skip FunctionDeclaration with valid Component name and >1 params 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -539,8 +539,8 @@ if (import.meta.hot) { `; exports[`esm (client, non-hydratable) > FunctionDeclaration > should transform FunctionDeclaration with valid Component name and params 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -562,8 +562,8 @@ if (import.meta.hot) { `; exports[`esm (client, non-hydratable) > FunctionDeclaration > should transform FunctionDeclaration with valid Component name and params 2`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -585,9 +585,9 @@ if (import.meta.hot) { `; exports[`esm (client, non-hydratable) > FunctionDeclaration > should transform FunctionDeclaration with valid Component name and params 3`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; -import { insert as _$insert } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; +import { insert as _$insert } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -619,7 +619,7 @@ if (import.meta.hot) { `; exports[`esm (client, non-hydratable) > FunctionDeclaration > should transform FunctionDeclaration with valid Component name and params 4`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; @@ -650,8 +650,8 @@ if (import.meta.hot) { `; exports[`esm (client, non-hydratable) > FunctionDeclaration > should transform FunctionDeclaration with valid Component name and params 5`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`
foo\`), _tmpl$2 = /*#__PURE__*/_$template(\`
bar\`); import { $$component as _$$component } from "solid-refresh"; @@ -692,7 +692,7 @@ if (import.meta.hot) { `; exports[`esm (client, non-hydratable) > VariableDeclarator > ArrowFunctionExpression > should skip VariableDeclarator w/ ArrowFunctionExpression with @refresh reload 1`] = ` -"import { template as _$template } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$decline as _$$decline } from "solid-refresh"; // @refresh reload @@ -705,7 +705,7 @@ if (import.meta.hot) { `; exports[`esm (client, non-hydratable) > VariableDeclarator > ArrowFunctionExpression > should skip VariableDeclarator w/ ArrowFunctionExpression with @refresh skip 1`] = ` -"import { template as _$template } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); // @refresh skip const Foo = () => { @@ -714,8 +714,8 @@ const Foo = () => { `; exports[`esm (client, non-hydratable) > VariableDeclarator > ArrowFunctionExpression > should skip VariableDeclarator w/ ArrowFunctionExpression with invalid Component name 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -734,8 +734,8 @@ if (import.meta.hot) { `; exports[`esm (client, non-hydratable) > VariableDeclarator > ArrowFunctionExpression > should skip VariableDeclarator w/ ArrowFunctionExpression with valid Component name and >1 params 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -754,8 +754,8 @@ if (import.meta.hot) { `; exports[`esm (client, non-hydratable) > VariableDeclarator > ArrowFunctionExpression > should transform VariableDeclarator w/ ArrowFunctionExpression with valid Component name and params 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -777,8 +777,8 @@ if (import.meta.hot) { `; exports[`esm (client, non-hydratable) > VariableDeclarator > ArrowFunctionExpression > should transform VariableDeclarator w/ ArrowFunctionExpression with valid Component name and params 2`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -800,9 +800,9 @@ if (import.meta.hot) { `; exports[`esm (client, non-hydratable) > VariableDeclarator > ArrowFunctionExpression > should transform VariableDeclarator w/ ArrowFunctionExpression with valid Component name and params 3`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; -import { insert as _$insert } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; +import { insert as _$insert } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -834,7 +834,7 @@ if (import.meta.hot) { `; exports[`esm (client, non-hydratable) > VariableDeclarator > ArrowFunctionExpression > should transform VariableDeclarator w/ ArrowFunctionExpression with valid Component name and params 4`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; @@ -865,8 +865,8 @@ if (import.meta.hot) { `; exports[`esm (client, non-hydratable) > VariableDeclarator > ArrowFunctionExpression > should transform VariableDeclarator w/ ArrowFunctionExpression with valid Component name and params 5`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`
bar\`), _tmpl$2 = /*#__PURE__*/_$template(\`
foo\`); import { $$component as _$$component } from "solid-refresh"; @@ -907,7 +907,7 @@ if (import.meta.hot) { `; exports[`esm (client, non-hydratable) > VariableDeclarator > FunctionExpression > should skip VariableDeclarator w/ FunctionExpression with @refresh reload 1`] = ` -"import { template as _$template } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$decline as _$$decline } from "solid-refresh"; // @refresh reload @@ -920,7 +920,7 @@ if (import.meta.hot) { `; exports[`esm (client, non-hydratable) > VariableDeclarator > FunctionExpression > should skip VariableDeclarator w/ FunctionExpression with @refresh skip 1`] = ` -"import { template as _$template } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); // @refresh skip const Foo = function () { @@ -929,8 +929,8 @@ const Foo = function () { `; exports[`esm (client, non-hydratable) > VariableDeclarator > FunctionExpression > should skip VariableDeclarator w/ FunctionExpression with invalid Component name 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -949,8 +949,8 @@ if (import.meta.hot) { `; exports[`esm (client, non-hydratable) > VariableDeclarator > FunctionExpression > should skip VariableDeclarator w/ FunctionExpression with valid Component name and >1 params 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -969,8 +969,8 @@ if (import.meta.hot) { `; exports[`esm (client, non-hydratable) > VariableDeclarator > FunctionExpression > should transform VariableDeclarator w/ FunctionExpression with valid Component name and params 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -992,8 +992,8 @@ if (import.meta.hot) { `; exports[`esm (client, non-hydratable) > VariableDeclarator > FunctionExpression > should transform VariableDeclarator w/ FunctionExpression with valid Component name and params 2`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -1015,9 +1015,9 @@ if (import.meta.hot) { `; exports[`esm (client, non-hydratable) > VariableDeclarator > FunctionExpression > should transform VariableDeclarator w/ FunctionExpression with valid Component name and params 3`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; -import { insert as _$insert } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; +import { insert as _$insert } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -1049,7 +1049,7 @@ if (import.meta.hot) { `; exports[`esm (client, non-hydratable) > VariableDeclarator > FunctionExpression > should transform VariableDeclarator w/ FunctionExpression with valid Component name and params 4`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; @@ -1080,8 +1080,8 @@ if (import.meta.hot) { `; exports[`esm (client, non-hydratable) > VariableDeclarator > FunctionExpression > should transform VariableDeclarator w/ FunctionExpression with valid Component name and params 5`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`
bar\`), _tmpl$2 = /*#__PURE__*/_$template(\`
foo\`); import { $$component as _$$component } from "solid-refresh"; @@ -1122,9 +1122,9 @@ if (import.meta.hot) { `; exports[`esm (client, non-hydratable) > fix build > refs > should work with a function 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; -import { use as _$use } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; +import { ref as _$ref } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`
Comp\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -1133,7 +1133,7 @@ const _REGISTRY = _$$registry(); const Comp_1 = _$$component(_REGISTRY, "Comp_1", _props => /*@refresh jsx-skip*/(() => { var _el$ = _tmpl$(); var _ref$ = _props.v0; - typeof _ref$ === "function" ? _$use(_ref$, _el$) : _props.v0 = _el$; + typeof _ref$ === "function" || Array.isArray(_ref$) ? _$ref(() => _ref$, _el$) : _props.v0 = _el$; return _el$; })(), { location: "example.jsx:4:19", @@ -1154,9 +1154,9 @@ if (import.meta.hot) { `; exports[`esm (client, non-hydratable) > fix build > refs > should work with a mutable variable 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; -import { use as _$use } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; +import { ref as _$ref } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`
Comp\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -1165,7 +1165,7 @@ const _REGISTRY = _$$registry(); const Comp_1 = _$$component(_REGISTRY, "Comp_1", _props => /*@refresh jsx-skip*/(() => { var _el$ = _tmpl$(); var _ref$ = _props.v0; - typeof _ref$ === "function" ? _$use(_ref$, _el$) : _props.v0 = _el$; + typeof _ref$ === "function" || Array.isArray(_ref$) ? _$ref(() => _ref$, _el$) : _props.v0 = _el$; return _el$; })(), { location: "example.jsx:4:19", @@ -1192,9 +1192,9 @@ if (import.meta.hot) { `; exports[`esm (client, non-hydratable) > fix build > signals as refs > should work 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; -import { use as _$use } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; +import { ref as _$ref } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`
Comp\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -1204,7 +1204,7 @@ const _REGISTRY = _$$registry(); const Comp_1 = _$$component(_REGISTRY, "Comp_1", _props => /*@refresh jsx-skip*/(() => { var _el$ = _tmpl$(); var _ref$ = _props.v0; - typeof _ref$ === "function" ? _$use(_ref$, _el$) : _props.v0 = _el$; + typeof _ref$ === "function" || Array.isArray(_ref$) ? _$ref(() => _ref$, _el$) : _props.v0 = _el$; return _el$; })(), { location: "example.jsx:6:19", @@ -1232,7 +1232,7 @@ if (import.meta.hot) { `; exports[`esm (client, non-hydratable) > fix render > @refresh reload > should work 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; import { $$decline as _$$decline } from "solid-refresh"; // @refresh reload import { render } from 'solid-js/web'; @@ -1246,7 +1246,7 @@ if (import.meta.hot) { `; exports[`esm (client, non-hydratable) > fix render > import specifiers > should work with ImportNamespaceSpecifier 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; @@ -1266,7 +1266,7 @@ if (import.meta.hot) { `; exports[`esm (client, non-hydratable) > fix render > import specifiers > should work with ImportSpecifier + Identifier 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; @@ -1286,7 +1286,7 @@ if (import.meta.hot) { `; exports[`esm (client, non-hydratable) > fix render > import specifiers > should work with ImportSpecifier + aliased Identifier 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; @@ -1306,7 +1306,7 @@ if (import.meta.hot) { `; exports[`esm (client, non-hydratable) > fix render > import specifiers > should work with ImportSpecifier + aliased Identifier from StringLiteral 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; @@ -1326,7 +1326,7 @@ if (import.meta.hot) { `; exports[`esm (client, non-hydratable) > fix render > top-level statements > should work with IfStatement 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; diff --git a/tests/client/__snapshots__/rspack-esm.test.ts.snap b/tests/client/__snapshots__/rspack-esm.test.ts.snap index b9469df..e5098ff 100644 --- a/tests/client/__snapshots__/rspack-esm.test.ts.snap +++ b/tests/client/__snapshots__/rspack-esm.test.ts.snap @@ -32,7 +32,7 @@ if (import.meta.webpackHot) { `; exports[`rspack-esm (client, non-hydratable) > ExportDefaultDeclaration w/ FunctionExpression > should skip ExportDefaultDeclaration w/ FunctionExpression with @refresh reload 1`] = ` -"import { template as _$template } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$decline as _$$decline } from "solid-refresh"; // @refresh reload @@ -45,7 +45,7 @@ if (import.meta.webpackHot) { `; exports[`rspack-esm (client, non-hydratable) > ExportDefaultDeclaration w/ FunctionExpression > should skip ExportDefaultDeclaration w/ FunctionExpression with @refresh skip 1`] = ` -"import { template as _$template } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); // @refresh skip export default function Foo() { @@ -54,8 +54,8 @@ export default function Foo() { `; exports[`rspack-esm (client, non-hydratable) > ExportDefaultDeclaration w/ FunctionExpression > should skip ExportDefaultDeclaration w/ FunctionExpression with invalid Component name 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -74,8 +74,8 @@ if (import.meta.webpackHot) { `; exports[`rspack-esm (client, non-hydratable) > ExportDefaultDeclaration w/ FunctionExpression > should skip ExportDefaultDeclaration w/ FunctionExpression with valid Component name and >1 params 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -94,8 +94,8 @@ if (import.meta.webpackHot) { `; exports[`rspack-esm (client, non-hydratable) > ExportDefaultDeclaration w/ FunctionExpression > should transform ExportDefaultDeclaration w/ FunctionExpression with valid Component name and params 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -118,8 +118,8 @@ if (import.meta.webpackHot) { `; exports[`rspack-esm (client, non-hydratable) > ExportDefaultDeclaration w/ FunctionExpression > should transform ExportDefaultDeclaration w/ FunctionExpression with valid Component name and params 2`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -142,9 +142,9 @@ if (import.meta.webpackHot) { `; exports[`rspack-esm (client, non-hydratable) > ExportDefaultDeclaration w/ FunctionExpression > should transform ExportDefaultDeclaration w/ FunctionExpression with valid Component name and params 3`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; -import { insert as _$insert } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; +import { insert as _$insert } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -177,7 +177,7 @@ if (import.meta.webpackHot) { `; exports[`rspack-esm (client, non-hydratable) > ExportDefaultDeclaration w/ FunctionExpression > should transform ExportDefaultDeclaration w/ FunctionExpression with valid Component name and params 4`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; @@ -209,8 +209,8 @@ if (import.meta.webpackHot) { `; exports[`rspack-esm (client, non-hydratable) > ExportDefaultDeclaration w/ FunctionExpression > should transform ExportDefaultDeclaration w/ FunctionExpression with valid Component name and params 5`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`
foo\`), _tmpl$2 = /*#__PURE__*/_$template(\`
bar\`); import { $$component as _$$component } from "solid-refresh"; @@ -252,7 +252,7 @@ if (import.meta.webpackHot) { `; exports[`rspack-esm (client, non-hydratable) > ExportNamedDeclaration w/ FunctionExpression > should skip ExportNamedDeclaration w/ FunctionExpression with @refresh reload 1`] = ` -"import { template as _$template } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$decline as _$$decline } from "solid-refresh"; // @refresh reload @@ -265,7 +265,7 @@ if (import.meta.webpackHot) { `; exports[`rspack-esm (client, non-hydratable) > ExportNamedDeclaration w/ FunctionExpression > should skip ExportNamedDeclaration w/ FunctionExpression with @refresh skip 1`] = ` -"import { template as _$template } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); // @refresh skip export function Foo() { @@ -274,8 +274,8 @@ export function Foo() { `; exports[`rspack-esm (client, non-hydratable) > ExportNamedDeclaration w/ FunctionExpression > should skip ExportNamedDeclaration w/ FunctionExpression with invalid Component name 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -298,8 +298,8 @@ if (import.meta.webpackHot) { `; exports[`rspack-esm (client, non-hydratable) > ExportNamedDeclaration w/ FunctionExpression > should skip ExportNamedDeclaration w/ FunctionExpression with valid Component name and >1 params 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -318,8 +318,8 @@ if (import.meta.webpackHot) { `; exports[`rspack-esm (client, non-hydratable) > ExportNamedDeclaration w/ FunctionExpression > should transform ExportNamedDeclaration w/ FunctionExpression with valid Component name and params 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -342,8 +342,8 @@ if (import.meta.webpackHot) { `; exports[`rspack-esm (client, non-hydratable) > ExportNamedDeclaration w/ FunctionExpression > should transform ExportNamedDeclaration w/ FunctionExpression with valid Component name and params 2`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -366,9 +366,9 @@ if (import.meta.webpackHot) { `; exports[`rspack-esm (client, non-hydratable) > ExportNamedDeclaration w/ FunctionExpression > should transform ExportNamedDeclaration w/ FunctionExpression with valid Component name and params 3`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; -import { insert as _$insert } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; +import { insert as _$insert } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -401,7 +401,7 @@ if (import.meta.webpackHot) { `; exports[`rspack-esm (client, non-hydratable) > ExportNamedDeclaration w/ FunctionExpression > should transform ExportNamedDeclaration w/ FunctionExpression with valid Component name and params 4`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; @@ -433,8 +433,8 @@ if (import.meta.webpackHot) { `; exports[`rspack-esm (client, non-hydratable) > ExportNamedDeclaration w/ FunctionExpression > should transform ExportNamedDeclaration w/ FunctionExpression with valid Component name and params 5`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`
bar\`), _tmpl$2 = /*#__PURE__*/_$template(\`
foo\`); import { $$component as _$$component } from "solid-refresh"; @@ -477,7 +477,7 @@ if (import.meta.webpackHot) { `; exports[`rspack-esm (client, non-hydratable) > FunctionDeclaration > should skip FunctionDeclaration with @refresh reload 1`] = ` -"import { template as _$template } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$decline as _$$decline } from "solid-refresh"; // @refresh reload @@ -490,7 +490,7 @@ if (import.meta.webpackHot) { `; exports[`rspack-esm (client, non-hydratable) > FunctionDeclaration > should skip FunctionDeclaration with @refresh skip 1`] = ` -"import { template as _$template } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); // @refresh skip function Foo() { @@ -499,8 +499,8 @@ function Foo() { `; exports[`rspack-esm (client, non-hydratable) > FunctionDeclaration > should skip FunctionDeclaration with invalid Component name 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -519,8 +519,8 @@ if (import.meta.webpackHot) { `; exports[`rspack-esm (client, non-hydratable) > FunctionDeclaration > should skip FunctionDeclaration with valid Component name and >1 params 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -539,8 +539,8 @@ if (import.meta.webpackHot) { `; exports[`rspack-esm (client, non-hydratable) > FunctionDeclaration > should transform FunctionDeclaration with valid Component name and params 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -562,8 +562,8 @@ if (import.meta.webpackHot) { `; exports[`rspack-esm (client, non-hydratable) > FunctionDeclaration > should transform FunctionDeclaration with valid Component name and params 2`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -585,9 +585,9 @@ if (import.meta.webpackHot) { `; exports[`rspack-esm (client, non-hydratable) > FunctionDeclaration > should transform FunctionDeclaration with valid Component name and params 3`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; -import { insert as _$insert } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; +import { insert as _$insert } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -619,7 +619,7 @@ if (import.meta.webpackHot) { `; exports[`rspack-esm (client, non-hydratable) > FunctionDeclaration > should transform FunctionDeclaration with valid Component name and params 4`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; @@ -650,8 +650,8 @@ if (import.meta.webpackHot) { `; exports[`rspack-esm (client, non-hydratable) > FunctionDeclaration > should transform FunctionDeclaration with valid Component name and params 5`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`
foo\`), _tmpl$2 = /*#__PURE__*/_$template(\`
bar\`); import { $$component as _$$component } from "solid-refresh"; @@ -692,7 +692,7 @@ if (import.meta.webpackHot) { `; exports[`rspack-esm (client, non-hydratable) > VariableDeclarator > ArrowFunctionExpression > should skip VariableDeclarator w/ ArrowFunctionExpression with @refresh reload 1`] = ` -"import { template as _$template } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$decline as _$$decline } from "solid-refresh"; // @refresh reload @@ -705,7 +705,7 @@ if (import.meta.webpackHot) { `; exports[`rspack-esm (client, non-hydratable) > VariableDeclarator > ArrowFunctionExpression > should skip VariableDeclarator w/ ArrowFunctionExpression with @refresh skip 1`] = ` -"import { template as _$template } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); // @refresh skip const Foo = () => { @@ -714,8 +714,8 @@ const Foo = () => { `; exports[`rspack-esm (client, non-hydratable) > VariableDeclarator > ArrowFunctionExpression > should skip VariableDeclarator w/ ArrowFunctionExpression with invalid Component name 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -734,8 +734,8 @@ if (import.meta.webpackHot) { `; exports[`rspack-esm (client, non-hydratable) > VariableDeclarator > ArrowFunctionExpression > should skip VariableDeclarator w/ ArrowFunctionExpression with valid Component name and >1 params 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -754,8 +754,8 @@ if (import.meta.webpackHot) { `; exports[`rspack-esm (client, non-hydratable) > VariableDeclarator > ArrowFunctionExpression > should transform VariableDeclarator w/ ArrowFunctionExpression with valid Component name and params 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -777,8 +777,8 @@ if (import.meta.webpackHot) { `; exports[`rspack-esm (client, non-hydratable) > VariableDeclarator > ArrowFunctionExpression > should transform VariableDeclarator w/ ArrowFunctionExpression with valid Component name and params 2`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -800,9 +800,9 @@ if (import.meta.webpackHot) { `; exports[`rspack-esm (client, non-hydratable) > VariableDeclarator > ArrowFunctionExpression > should transform VariableDeclarator w/ ArrowFunctionExpression with valid Component name and params 3`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; -import { insert as _$insert } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; +import { insert as _$insert } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -834,7 +834,7 @@ if (import.meta.webpackHot) { `; exports[`rspack-esm (client, non-hydratable) > VariableDeclarator > ArrowFunctionExpression > should transform VariableDeclarator w/ ArrowFunctionExpression with valid Component name and params 4`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; @@ -865,8 +865,8 @@ if (import.meta.webpackHot) { `; exports[`rspack-esm (client, non-hydratable) > VariableDeclarator > ArrowFunctionExpression > should transform VariableDeclarator w/ ArrowFunctionExpression with valid Component name and params 5`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`
bar\`), _tmpl$2 = /*#__PURE__*/_$template(\`
foo\`); import { $$component as _$$component } from "solid-refresh"; @@ -907,7 +907,7 @@ if (import.meta.webpackHot) { `; exports[`rspack-esm (client, non-hydratable) > VariableDeclarator > FunctionExpression > should skip VariableDeclarator w/ FunctionExpression with @refresh reload 1`] = ` -"import { template as _$template } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$decline as _$$decline } from "solid-refresh"; // @refresh reload @@ -920,7 +920,7 @@ if (import.meta.webpackHot) { `; exports[`rspack-esm (client, non-hydratable) > VariableDeclarator > FunctionExpression > should skip VariableDeclarator w/ FunctionExpression with @refresh skip 1`] = ` -"import { template as _$template } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); // @refresh skip const Foo = function () { @@ -929,8 +929,8 @@ const Foo = function () { `; exports[`rspack-esm (client, non-hydratable) > VariableDeclarator > FunctionExpression > should skip VariableDeclarator w/ FunctionExpression with invalid Component name 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -949,8 +949,8 @@ if (import.meta.webpackHot) { `; exports[`rspack-esm (client, non-hydratable) > VariableDeclarator > FunctionExpression > should skip VariableDeclarator w/ FunctionExpression with valid Component name and >1 params 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -969,8 +969,8 @@ if (import.meta.webpackHot) { `; exports[`rspack-esm (client, non-hydratable) > VariableDeclarator > FunctionExpression > should transform VariableDeclarator w/ FunctionExpression with valid Component name and params 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -992,8 +992,8 @@ if (import.meta.webpackHot) { `; exports[`rspack-esm (client, non-hydratable) > VariableDeclarator > FunctionExpression > should transform VariableDeclarator w/ FunctionExpression with valid Component name and params 2`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -1015,9 +1015,9 @@ if (import.meta.webpackHot) { `; exports[`rspack-esm (client, non-hydratable) > VariableDeclarator > FunctionExpression > should transform VariableDeclarator w/ FunctionExpression with valid Component name and params 3`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; -import { insert as _$insert } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; +import { insert as _$insert } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -1049,7 +1049,7 @@ if (import.meta.webpackHot) { `; exports[`rspack-esm (client, non-hydratable) > VariableDeclarator > FunctionExpression > should transform VariableDeclarator w/ FunctionExpression with valid Component name and params 4`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; @@ -1080,8 +1080,8 @@ if (import.meta.webpackHot) { `; exports[`rspack-esm (client, non-hydratable) > VariableDeclarator > FunctionExpression > should transform VariableDeclarator w/ FunctionExpression with valid Component name and params 5`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`
bar\`), _tmpl$2 = /*#__PURE__*/_$template(\`
foo\`); import { $$component as _$$component } from "solid-refresh"; @@ -1122,9 +1122,9 @@ if (import.meta.webpackHot) { `; exports[`rspack-esm (client, non-hydratable) > fix build > refs > should work with a function 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; -import { use as _$use } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; +import { ref as _$ref } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`
Comp\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -1133,7 +1133,7 @@ const _REGISTRY = _$$registry(); const Comp_1 = _$$component(_REGISTRY, "Comp_1", _props => /*@refresh jsx-skip*/(() => { var _el$ = _tmpl$(); var _ref$ = _props.v0; - typeof _ref$ === "function" ? _$use(_ref$, _el$) : _props.v0 = _el$; + typeof _ref$ === "function" || Array.isArray(_ref$) ? _$ref(() => _ref$, _el$) : _props.v0 = _el$; return _el$; })(), { location: "example.jsx:4:19", @@ -1154,9 +1154,9 @@ if (import.meta.webpackHot) { `; exports[`rspack-esm (client, non-hydratable) > fix build > refs > should work with a mutable variable 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; -import { use as _$use } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; +import { ref as _$ref } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`
Comp\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -1165,7 +1165,7 @@ const _REGISTRY = _$$registry(); const Comp_1 = _$$component(_REGISTRY, "Comp_1", _props => /*@refresh jsx-skip*/(() => { var _el$ = _tmpl$(); var _ref$ = _props.v0; - typeof _ref$ === "function" ? _$use(_ref$, _el$) : _props.v0 = _el$; + typeof _ref$ === "function" || Array.isArray(_ref$) ? _$ref(() => _ref$, _el$) : _props.v0 = _el$; return _el$; })(), { location: "example.jsx:4:19", @@ -1192,9 +1192,9 @@ if (import.meta.webpackHot) { `; exports[`rspack-esm (client, non-hydratable) > fix build > signals as refs > should work 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; -import { use as _$use } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; +import { ref as _$ref } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`
Comp\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -1204,7 +1204,7 @@ const _REGISTRY = _$$registry(); const Comp_1 = _$$component(_REGISTRY, "Comp_1", _props => /*@refresh jsx-skip*/(() => { var _el$ = _tmpl$(); var _ref$ = _props.v0; - typeof _ref$ === "function" ? _$use(_ref$, _el$) : _props.v0 = _el$; + typeof _ref$ === "function" || Array.isArray(_ref$) ? _$ref(() => _ref$, _el$) : _props.v0 = _el$; return _el$; })(), { location: "example.jsx:6:19", @@ -1232,7 +1232,7 @@ if (import.meta.webpackHot) { `; exports[`rspack-esm (client, non-hydratable) > fix render > @refresh reload > should work 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; import { $$decline as _$$decline } from "solid-refresh"; // @refresh reload import { render } from 'solid-js/web'; @@ -1246,7 +1246,7 @@ if (import.meta.webpackHot) { `; exports[`rspack-esm (client, non-hydratable) > fix render > import specifiers > should work with ImportNamespaceSpecifier 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; @@ -1266,7 +1266,7 @@ if (import.meta.webpackHot) { `; exports[`rspack-esm (client, non-hydratable) > fix render > import specifiers > should work with ImportSpecifier + Identifier 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; @@ -1286,7 +1286,7 @@ if (import.meta.webpackHot) { `; exports[`rspack-esm (client, non-hydratable) > fix render > import specifiers > should work with ImportSpecifier + aliased Identifier 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; @@ -1306,7 +1306,7 @@ if (import.meta.webpackHot) { `; exports[`rspack-esm (client, non-hydratable) > fix render > import specifiers > should work with ImportSpecifier + aliased Identifier from StringLiteral 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; @@ -1326,7 +1326,7 @@ if (import.meta.webpackHot) { `; exports[`rspack-esm (client, non-hydratable) > fix render > top-level statements > should work with IfStatement 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; diff --git a/tests/client/__snapshots__/standard.test.ts.snap b/tests/client/__snapshots__/standard.test.ts.snap index 5eb7b84..aa6594f 100644 --- a/tests/client/__snapshots__/standard.test.ts.snap +++ b/tests/client/__snapshots__/standard.test.ts.snap @@ -32,7 +32,7 @@ if (module.hot) { `; exports[`standard (client, non-hydratable) > ExportDefaultDeclaration w/ FunctionExpression > should skip ExportDefaultDeclaration w/ FunctionExpression with @refresh reload 1`] = ` -"import { template as _$template } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$decline as _$$decline } from "solid-refresh"; // @refresh reload @@ -45,7 +45,7 @@ if (module.hot) { `; exports[`standard (client, non-hydratable) > ExportDefaultDeclaration w/ FunctionExpression > should skip ExportDefaultDeclaration w/ FunctionExpression with @refresh skip 1`] = ` -"import { template as _$template } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); // @refresh skip export default function Foo() { @@ -54,8 +54,8 @@ export default function Foo() { `; exports[`standard (client, non-hydratable) > ExportDefaultDeclaration w/ FunctionExpression > should skip ExportDefaultDeclaration w/ FunctionExpression with invalid Component name 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -74,8 +74,8 @@ if (module.hot) { `; exports[`standard (client, non-hydratable) > ExportDefaultDeclaration w/ FunctionExpression > should skip ExportDefaultDeclaration w/ FunctionExpression with valid Component name and >1 params 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -94,8 +94,8 @@ if (module.hot) { `; exports[`standard (client, non-hydratable) > ExportDefaultDeclaration w/ FunctionExpression > should transform ExportDefaultDeclaration w/ FunctionExpression with valid Component name and params 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -118,8 +118,8 @@ if (module.hot) { `; exports[`standard (client, non-hydratable) > ExportDefaultDeclaration w/ FunctionExpression > should transform ExportDefaultDeclaration w/ FunctionExpression with valid Component name and params 2`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -142,9 +142,9 @@ if (module.hot) { `; exports[`standard (client, non-hydratable) > ExportDefaultDeclaration w/ FunctionExpression > should transform ExportDefaultDeclaration w/ FunctionExpression with valid Component name and params 3`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; -import { insert as _$insert } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; +import { insert as _$insert } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -177,7 +177,7 @@ if (module.hot) { `; exports[`standard (client, non-hydratable) > ExportDefaultDeclaration w/ FunctionExpression > should transform ExportDefaultDeclaration w/ FunctionExpression with valid Component name and params 4`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; @@ -209,8 +209,8 @@ if (module.hot) { `; exports[`standard (client, non-hydratable) > ExportDefaultDeclaration w/ FunctionExpression > should transform ExportDefaultDeclaration w/ FunctionExpression with valid Component name and params 5`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`
foo\`), _tmpl$2 = /*#__PURE__*/_$template(\`
bar\`); import { $$component as _$$component } from "solid-refresh"; @@ -252,7 +252,7 @@ if (module.hot) { `; exports[`standard (client, non-hydratable) > ExportNamedDeclaration w/ FunctionExpression > should skip ExportNamedDeclaration w/ FunctionExpression with @refresh reload 1`] = ` -"import { template as _$template } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$decline as _$$decline } from "solid-refresh"; // @refresh reload @@ -265,7 +265,7 @@ if (module.hot) { `; exports[`standard (client, non-hydratable) > ExportNamedDeclaration w/ FunctionExpression > should skip ExportNamedDeclaration w/ FunctionExpression with @refresh skip 1`] = ` -"import { template as _$template } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); // @refresh skip export function Foo() { @@ -274,8 +274,8 @@ export function Foo() { `; exports[`standard (client, non-hydratable) > ExportNamedDeclaration w/ FunctionExpression > should skip ExportNamedDeclaration w/ FunctionExpression with invalid Component name 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -298,8 +298,8 @@ if (module.hot) { `; exports[`standard (client, non-hydratable) > ExportNamedDeclaration w/ FunctionExpression > should skip ExportNamedDeclaration w/ FunctionExpression with valid Component name and >1 params 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -318,8 +318,8 @@ if (module.hot) { `; exports[`standard (client, non-hydratable) > ExportNamedDeclaration w/ FunctionExpression > should transform ExportNamedDeclaration w/ FunctionExpression with valid Component name and params 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -342,8 +342,8 @@ if (module.hot) { `; exports[`standard (client, non-hydratable) > ExportNamedDeclaration w/ FunctionExpression > should transform ExportNamedDeclaration w/ FunctionExpression with valid Component name and params 2`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -366,9 +366,9 @@ if (module.hot) { `; exports[`standard (client, non-hydratable) > ExportNamedDeclaration w/ FunctionExpression > should transform ExportNamedDeclaration w/ FunctionExpression with valid Component name and params 3`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; -import { insert as _$insert } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; +import { insert as _$insert } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -401,7 +401,7 @@ if (module.hot) { `; exports[`standard (client, non-hydratable) > ExportNamedDeclaration w/ FunctionExpression > should transform ExportNamedDeclaration w/ FunctionExpression with valid Component name and params 4`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; @@ -433,8 +433,8 @@ if (module.hot) { `; exports[`standard (client, non-hydratable) > ExportNamedDeclaration w/ FunctionExpression > should transform ExportNamedDeclaration w/ FunctionExpression with valid Component name and params 5`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`
bar\`), _tmpl$2 = /*#__PURE__*/_$template(\`
foo\`); import { $$component as _$$component } from "solid-refresh"; @@ -477,7 +477,7 @@ if (module.hot) { `; exports[`standard (client, non-hydratable) > FunctionDeclaration > should skip FunctionDeclaration with @refresh reload 1`] = ` -"import { template as _$template } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$decline as _$$decline } from "solid-refresh"; // @refresh reload @@ -490,7 +490,7 @@ if (module.hot) { `; exports[`standard (client, non-hydratable) > FunctionDeclaration > should skip FunctionDeclaration with @refresh skip 1`] = ` -"import { template as _$template } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); // @refresh skip function Foo() { @@ -499,8 +499,8 @@ function Foo() { `; exports[`standard (client, non-hydratable) > FunctionDeclaration > should skip FunctionDeclaration with invalid Component name 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -519,8 +519,8 @@ if (module.hot) { `; exports[`standard (client, non-hydratable) > FunctionDeclaration > should skip FunctionDeclaration with valid Component name and >1 params 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -539,8 +539,8 @@ if (module.hot) { `; exports[`standard (client, non-hydratable) > FunctionDeclaration > should transform FunctionDeclaration with valid Component name and params 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -562,8 +562,8 @@ if (module.hot) { `; exports[`standard (client, non-hydratable) > FunctionDeclaration > should transform FunctionDeclaration with valid Component name and params 2`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -585,9 +585,9 @@ if (module.hot) { `; exports[`standard (client, non-hydratable) > FunctionDeclaration > should transform FunctionDeclaration with valid Component name and params 3`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; -import { insert as _$insert } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; +import { insert as _$insert } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -619,7 +619,7 @@ if (module.hot) { `; exports[`standard (client, non-hydratable) > FunctionDeclaration > should transform FunctionDeclaration with valid Component name and params 4`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; @@ -650,8 +650,8 @@ if (module.hot) { `; exports[`standard (client, non-hydratable) > FunctionDeclaration > should transform FunctionDeclaration with valid Component name and params 5`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`
foo\`), _tmpl$2 = /*#__PURE__*/_$template(\`
bar\`); import { $$component as _$$component } from "solid-refresh"; @@ -692,7 +692,7 @@ if (module.hot) { `; exports[`standard (client, non-hydratable) > VariableDeclarator > ArrowFunctionExpression > should skip VariableDeclarator w/ ArrowFunctionExpression with @refresh reload 1`] = ` -"import { template as _$template } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$decline as _$$decline } from "solid-refresh"; // @refresh reload @@ -705,7 +705,7 @@ if (module.hot) { `; exports[`standard (client, non-hydratable) > VariableDeclarator > ArrowFunctionExpression > should skip VariableDeclarator w/ ArrowFunctionExpression with @refresh skip 1`] = ` -"import { template as _$template } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); // @refresh skip const Foo = () => { @@ -714,8 +714,8 @@ const Foo = () => { `; exports[`standard (client, non-hydratable) > VariableDeclarator > ArrowFunctionExpression > should skip VariableDeclarator w/ ArrowFunctionExpression with invalid Component name 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -734,8 +734,8 @@ if (module.hot) { `; exports[`standard (client, non-hydratable) > VariableDeclarator > ArrowFunctionExpression > should skip VariableDeclarator w/ ArrowFunctionExpression with valid Component name and >1 params 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -754,8 +754,8 @@ if (module.hot) { `; exports[`standard (client, non-hydratable) > VariableDeclarator > ArrowFunctionExpression > should transform VariableDeclarator w/ ArrowFunctionExpression with valid Component name and params 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -777,8 +777,8 @@ if (module.hot) { `; exports[`standard (client, non-hydratable) > VariableDeclarator > ArrowFunctionExpression > should transform VariableDeclarator w/ ArrowFunctionExpression with valid Component name and params 2`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -800,9 +800,9 @@ if (module.hot) { `; exports[`standard (client, non-hydratable) > VariableDeclarator > ArrowFunctionExpression > should transform VariableDeclarator w/ ArrowFunctionExpression with valid Component name and params 3`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; -import { insert as _$insert } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; +import { insert as _$insert } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -834,7 +834,7 @@ if (module.hot) { `; exports[`standard (client, non-hydratable) > VariableDeclarator > ArrowFunctionExpression > should transform VariableDeclarator w/ ArrowFunctionExpression with valid Component name and params 4`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; @@ -865,8 +865,8 @@ if (module.hot) { `; exports[`standard (client, non-hydratable) > VariableDeclarator > ArrowFunctionExpression > should transform VariableDeclarator w/ ArrowFunctionExpression with valid Component name and params 5`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`
bar\`), _tmpl$2 = /*#__PURE__*/_$template(\`
foo\`); import { $$component as _$$component } from "solid-refresh"; @@ -907,7 +907,7 @@ if (module.hot) { `; exports[`standard (client, non-hydratable) > VariableDeclarator > FunctionExpression > should skip VariableDeclarator w/ FunctionExpression with @refresh reload 1`] = ` -"import { template as _$template } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$decline as _$$decline } from "solid-refresh"; // @refresh reload @@ -920,7 +920,7 @@ if (module.hot) { `; exports[`standard (client, non-hydratable) > VariableDeclarator > FunctionExpression > should skip VariableDeclarator w/ FunctionExpression with @refresh skip 1`] = ` -"import { template as _$template } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); // @refresh skip const Foo = function () { @@ -929,8 +929,8 @@ const Foo = function () { `; exports[`standard (client, non-hydratable) > VariableDeclarator > FunctionExpression > should skip VariableDeclarator w/ FunctionExpression with invalid Component name 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -949,8 +949,8 @@ if (module.hot) { `; exports[`standard (client, non-hydratable) > VariableDeclarator > FunctionExpression > should skip VariableDeclarator w/ FunctionExpression with valid Component name and >1 params 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -969,8 +969,8 @@ if (module.hot) { `; exports[`standard (client, non-hydratable) > VariableDeclarator > FunctionExpression > should transform VariableDeclarator w/ FunctionExpression with valid Component name and params 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -992,8 +992,8 @@ if (module.hot) { `; exports[`standard (client, non-hydratable) > VariableDeclarator > FunctionExpression > should transform VariableDeclarator w/ FunctionExpression with valid Component name and params 2`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -1015,9 +1015,9 @@ if (module.hot) { `; exports[`standard (client, non-hydratable) > VariableDeclarator > FunctionExpression > should transform VariableDeclarator w/ FunctionExpression with valid Component name and params 3`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; -import { insert as _$insert } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; +import { insert as _$insert } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -1049,7 +1049,7 @@ if (module.hot) { `; exports[`standard (client, non-hydratable) > VariableDeclarator > FunctionExpression > should transform VariableDeclarator w/ FunctionExpression with valid Component name and params 4`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; @@ -1080,8 +1080,8 @@ if (module.hot) { `; exports[`standard (client, non-hydratable) > VariableDeclarator > FunctionExpression > should transform VariableDeclarator w/ FunctionExpression with valid Component name and params 5`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`
bar\`), _tmpl$2 = /*#__PURE__*/_$template(\`
foo\`); import { $$component as _$$component } from "solid-refresh"; @@ -1122,9 +1122,9 @@ if (module.hot) { `; exports[`standard (client, non-hydratable) > fix build > refs > should work with a function 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; -import { use as _$use } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; +import { ref as _$ref } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`
Comp\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -1133,7 +1133,7 @@ const _REGISTRY = _$$registry(); const Comp_1 = _$$component(_REGISTRY, "Comp_1", _props => /*@refresh jsx-skip*/(() => { var _el$ = _tmpl$(); var _ref$ = _props.v0; - typeof _ref$ === "function" ? _$use(_ref$, _el$) : _props.v0 = _el$; + typeof _ref$ === "function" || Array.isArray(_ref$) ? _$ref(() => _ref$, _el$) : _props.v0 = _el$; return _el$; })(), { location: "example.jsx:4:19", @@ -1154,9 +1154,9 @@ if (module.hot) { `; exports[`standard (client, non-hydratable) > fix build > refs > should work with a mutable variable 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; -import { use as _$use } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; +import { ref as _$ref } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`
Comp\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -1165,7 +1165,7 @@ const _REGISTRY = _$$registry(); const Comp_1 = _$$component(_REGISTRY, "Comp_1", _props => /*@refresh jsx-skip*/(() => { var _el$ = _tmpl$(); var _ref$ = _props.v0; - typeof _ref$ === "function" ? _$use(_ref$, _el$) : _props.v0 = _el$; + typeof _ref$ === "function" || Array.isArray(_ref$) ? _$ref(() => _ref$, _el$) : _props.v0 = _el$; return _el$; })(), { location: "example.jsx:4:19", @@ -1192,9 +1192,9 @@ if (module.hot) { `; exports[`standard (client, non-hydratable) > fix build > signals as refs > should work 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; -import { use as _$use } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; +import { ref as _$ref } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`
Comp\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -1204,7 +1204,7 @@ const _REGISTRY = _$$registry(); const Comp_1 = _$$component(_REGISTRY, "Comp_1", _props => /*@refresh jsx-skip*/(() => { var _el$ = _tmpl$(); var _ref$ = _props.v0; - typeof _ref$ === "function" ? _$use(_ref$, _el$) : _props.v0 = _el$; + typeof _ref$ === "function" || Array.isArray(_ref$) ? _$ref(() => _ref$, _el$) : _props.v0 = _el$; return _el$; })(), { location: "example.jsx:6:19", @@ -1232,7 +1232,7 @@ if (module.hot) { `; exports[`standard (client, non-hydratable) > fix render > @refresh reload > should work 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; import { $$decline as _$$decline } from "solid-refresh"; // @refresh reload import { render } from 'solid-js/web'; @@ -1246,7 +1246,7 @@ if (module.hot) { `; exports[`standard (client, non-hydratable) > fix render > import specifiers > should work with ImportNamespaceSpecifier 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; @@ -1266,7 +1266,7 @@ if (module.hot) { `; exports[`standard (client, non-hydratable) > fix render > import specifiers > should work with ImportSpecifier + Identifier 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; @@ -1286,7 +1286,7 @@ if (module.hot) { `; exports[`standard (client, non-hydratable) > fix render > import specifiers > should work with ImportSpecifier + aliased Identifier 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; @@ -1306,7 +1306,7 @@ if (module.hot) { `; exports[`standard (client, non-hydratable) > fix render > import specifiers > should work with ImportSpecifier + aliased Identifier from StringLiteral 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; @@ -1326,7 +1326,7 @@ if (module.hot) { `; exports[`standard (client, non-hydratable) > fix render > top-level statements > should work with IfStatement 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; diff --git a/tests/client/__snapshots__/vite.test.ts.snap b/tests/client/__snapshots__/vite.test.ts.snap index 95165d5..3771ffa 100644 --- a/tests/client/__snapshots__/vite.test.ts.snap +++ b/tests/client/__snapshots__/vite.test.ts.snap @@ -34,7 +34,7 @@ if (import.meta.hot) { `; exports[`vite (client, non-hydratable) > ExportDefaultDeclaration w/ FunctionExpression > should skip ExportDefaultDeclaration w/ FunctionExpression with @refresh reload 1`] = ` -"import { template as _$template } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); // @refresh reload export default function Foo() { @@ -46,7 +46,7 @@ if (import.meta.hot) { `; exports[`vite (client, non-hydratable) > ExportDefaultDeclaration w/ FunctionExpression > should skip ExportDefaultDeclaration w/ FunctionExpression with @refresh skip 1`] = ` -"import { template as _$template } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); // @refresh skip export default function Foo() { @@ -55,8 +55,8 @@ export default function Foo() { `; exports[`vite (client, non-hydratable) > ExportDefaultDeclaration w/ FunctionExpression > should skip ExportDefaultDeclaration w/ FunctionExpression with invalid Component name 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -76,8 +76,8 @@ if (import.meta.hot) { `; exports[`vite (client, non-hydratable) > ExportDefaultDeclaration w/ FunctionExpression > should skip ExportDefaultDeclaration w/ FunctionExpression with valid Component name and >1 params 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -97,8 +97,8 @@ if (import.meta.hot) { `; exports[`vite (client, non-hydratable) > ExportDefaultDeclaration w/ FunctionExpression > should transform ExportDefaultDeclaration w/ FunctionExpression with valid Component name and params 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -122,8 +122,8 @@ if (import.meta.hot) { `; exports[`vite (client, non-hydratable) > ExportDefaultDeclaration w/ FunctionExpression > should transform ExportDefaultDeclaration w/ FunctionExpression with valid Component name and params 2`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -147,9 +147,9 @@ if (import.meta.hot) { `; exports[`vite (client, non-hydratable) > ExportDefaultDeclaration w/ FunctionExpression > should transform ExportDefaultDeclaration w/ FunctionExpression with valid Component name and params 3`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; -import { insert as _$insert } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; +import { insert as _$insert } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -183,7 +183,7 @@ if (import.meta.hot) { `; exports[`vite (client, non-hydratable) > ExportDefaultDeclaration w/ FunctionExpression > should transform ExportDefaultDeclaration w/ FunctionExpression with valid Component name and params 4`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; @@ -216,8 +216,8 @@ if (import.meta.hot) { `; exports[`vite (client, non-hydratable) > ExportDefaultDeclaration w/ FunctionExpression > should transform ExportDefaultDeclaration w/ FunctionExpression with valid Component name and params 5`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`
foo\`), _tmpl$2 = /*#__PURE__*/_$template(\`
bar\`); import { $$component as _$$component } from "solid-refresh"; @@ -260,7 +260,7 @@ if (import.meta.hot) { `; exports[`vite (client, non-hydratable) > ExportNamedDeclaration w/ FunctionExpression > should skip ExportNamedDeclaration w/ FunctionExpression with @refresh reload 1`] = ` -"import { template as _$template } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); // @refresh reload export function Foo() { @@ -272,7 +272,7 @@ if (import.meta.hot) { `; exports[`vite (client, non-hydratable) > ExportNamedDeclaration w/ FunctionExpression > should skip ExportNamedDeclaration w/ FunctionExpression with @refresh skip 1`] = ` -"import { template as _$template } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); // @refresh skip export function Foo() { @@ -281,8 +281,8 @@ export function Foo() { `; exports[`vite (client, non-hydratable) > ExportNamedDeclaration w/ FunctionExpression > should skip ExportNamedDeclaration w/ FunctionExpression with invalid Component name 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -306,8 +306,8 @@ if (import.meta.hot) { `; exports[`vite (client, non-hydratable) > ExportNamedDeclaration w/ FunctionExpression > should skip ExportNamedDeclaration w/ FunctionExpression with valid Component name and >1 params 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -327,8 +327,8 @@ if (import.meta.hot) { `; exports[`vite (client, non-hydratable) > ExportNamedDeclaration w/ FunctionExpression > should transform ExportNamedDeclaration w/ FunctionExpression with valid Component name and params 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -352,8 +352,8 @@ if (import.meta.hot) { `; exports[`vite (client, non-hydratable) > ExportNamedDeclaration w/ FunctionExpression > should transform ExportNamedDeclaration w/ FunctionExpression with valid Component name and params 2`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -377,9 +377,9 @@ if (import.meta.hot) { `; exports[`vite (client, non-hydratable) > ExportNamedDeclaration w/ FunctionExpression > should transform ExportNamedDeclaration w/ FunctionExpression with valid Component name and params 3`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; -import { insert as _$insert } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; +import { insert as _$insert } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -413,7 +413,7 @@ if (import.meta.hot) { `; exports[`vite (client, non-hydratable) > ExportNamedDeclaration w/ FunctionExpression > should transform ExportNamedDeclaration w/ FunctionExpression with valid Component name and params 4`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; @@ -446,8 +446,8 @@ if (import.meta.hot) { `; exports[`vite (client, non-hydratable) > ExportNamedDeclaration w/ FunctionExpression > should transform ExportNamedDeclaration w/ FunctionExpression with valid Component name and params 5`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`
bar\`), _tmpl$2 = /*#__PURE__*/_$template(\`
foo\`); import { $$component as _$$component } from "solid-refresh"; @@ -491,7 +491,7 @@ if (import.meta.hot) { `; exports[`vite (client, non-hydratable) > FunctionDeclaration > should skip FunctionDeclaration with @refresh reload 1`] = ` -"import { template as _$template } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); // @refresh reload function Foo() { @@ -503,7 +503,7 @@ if (import.meta.hot) { `; exports[`vite (client, non-hydratable) > FunctionDeclaration > should skip FunctionDeclaration with @refresh skip 1`] = ` -"import { template as _$template } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); // @refresh skip function Foo() { @@ -512,8 +512,8 @@ function Foo() { `; exports[`vite (client, non-hydratable) > FunctionDeclaration > should skip FunctionDeclaration with invalid Component name 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -533,8 +533,8 @@ if (import.meta.hot) { `; exports[`vite (client, non-hydratable) > FunctionDeclaration > should skip FunctionDeclaration with valid Component name and >1 params 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -554,8 +554,8 @@ if (import.meta.hot) { `; exports[`vite (client, non-hydratable) > FunctionDeclaration > should transform FunctionDeclaration with valid Component name and params 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -578,8 +578,8 @@ if (import.meta.hot) { `; exports[`vite (client, non-hydratable) > FunctionDeclaration > should transform FunctionDeclaration with valid Component name and params 2`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -602,9 +602,9 @@ if (import.meta.hot) { `; exports[`vite (client, non-hydratable) > FunctionDeclaration > should transform FunctionDeclaration with valid Component name and params 3`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; -import { insert as _$insert } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; +import { insert as _$insert } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -637,7 +637,7 @@ if (import.meta.hot) { `; exports[`vite (client, non-hydratable) > FunctionDeclaration > should transform FunctionDeclaration with valid Component name and params 4`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; @@ -669,8 +669,8 @@ if (import.meta.hot) { `; exports[`vite (client, non-hydratable) > FunctionDeclaration > should transform FunctionDeclaration with valid Component name and params 5`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`
foo\`), _tmpl$2 = /*#__PURE__*/_$template(\`
bar\`); import { $$component as _$$component } from "solid-refresh"; @@ -712,7 +712,7 @@ if (import.meta.hot) { `; exports[`vite (client, non-hydratable) > VariableDeclarator > ArrowFunctionExpression > should skip VariableDeclarator w/ ArrowFunctionExpression with @refresh reload 1`] = ` -"import { template as _$template } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); // @refresh reload const Foo = () => { @@ -724,7 +724,7 @@ if (import.meta.hot) { `; exports[`vite (client, non-hydratable) > VariableDeclarator > ArrowFunctionExpression > should skip VariableDeclarator w/ ArrowFunctionExpression with @refresh skip 1`] = ` -"import { template as _$template } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); // @refresh skip const Foo = () => { @@ -733,8 +733,8 @@ const Foo = () => { `; exports[`vite (client, non-hydratable) > VariableDeclarator > ArrowFunctionExpression > should skip VariableDeclarator w/ ArrowFunctionExpression with invalid Component name 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -754,8 +754,8 @@ if (import.meta.hot) { `; exports[`vite (client, non-hydratable) > VariableDeclarator > ArrowFunctionExpression > should skip VariableDeclarator w/ ArrowFunctionExpression with valid Component name and >1 params 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -775,8 +775,8 @@ if (import.meta.hot) { `; exports[`vite (client, non-hydratable) > VariableDeclarator > ArrowFunctionExpression > should transform VariableDeclarator w/ ArrowFunctionExpression with valid Component name and params 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -799,8 +799,8 @@ if (import.meta.hot) { `; exports[`vite (client, non-hydratable) > VariableDeclarator > ArrowFunctionExpression > should transform VariableDeclarator w/ ArrowFunctionExpression with valid Component name and params 2`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -823,9 +823,9 @@ if (import.meta.hot) { `; exports[`vite (client, non-hydratable) > VariableDeclarator > ArrowFunctionExpression > should transform VariableDeclarator w/ ArrowFunctionExpression with valid Component name and params 3`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; -import { insert as _$insert } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; +import { insert as _$insert } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -858,7 +858,7 @@ if (import.meta.hot) { `; exports[`vite (client, non-hydratable) > VariableDeclarator > ArrowFunctionExpression > should transform VariableDeclarator w/ ArrowFunctionExpression with valid Component name and params 4`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; @@ -890,8 +890,8 @@ if (import.meta.hot) { `; exports[`vite (client, non-hydratable) > VariableDeclarator > ArrowFunctionExpression > should transform VariableDeclarator w/ ArrowFunctionExpression with valid Component name and params 5`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`
bar\`), _tmpl$2 = /*#__PURE__*/_$template(\`
foo\`); import { $$component as _$$component } from "solid-refresh"; @@ -933,7 +933,7 @@ if (import.meta.hot) { `; exports[`vite (client, non-hydratable) > VariableDeclarator > FunctionExpression > should skip VariableDeclarator w/ FunctionExpression with @refresh reload 1`] = ` -"import { template as _$template } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); // @refresh reload const Foo = function () { @@ -945,7 +945,7 @@ if (import.meta.hot) { `; exports[`vite (client, non-hydratable) > VariableDeclarator > FunctionExpression > should skip VariableDeclarator w/ FunctionExpression with @refresh skip 1`] = ` -"import { template as _$template } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); // @refresh skip const Foo = function () { @@ -954,8 +954,8 @@ const Foo = function () { `; exports[`vite (client, non-hydratable) > VariableDeclarator > FunctionExpression > should skip VariableDeclarator w/ FunctionExpression with invalid Component name 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -975,8 +975,8 @@ if (import.meta.hot) { `; exports[`vite (client, non-hydratable) > VariableDeclarator > FunctionExpression > should skip VariableDeclarator w/ FunctionExpression with valid Component name and >1 params 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -996,8 +996,8 @@ if (import.meta.hot) { `; exports[`vite (client, non-hydratable) > VariableDeclarator > FunctionExpression > should transform VariableDeclarator w/ FunctionExpression with valid Component name and params 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -1020,8 +1020,8 @@ if (import.meta.hot) { `; exports[`vite (client, non-hydratable) > VariableDeclarator > FunctionExpression > should transform VariableDeclarator w/ FunctionExpression with valid Component name and params 2`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -1044,9 +1044,9 @@ if (import.meta.hot) { `; exports[`vite (client, non-hydratable) > VariableDeclarator > FunctionExpression > should transform VariableDeclarator w/ FunctionExpression with valid Component name and params 3`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; -import { insert as _$insert } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; +import { insert as _$insert } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -1079,7 +1079,7 @@ if (import.meta.hot) { `; exports[`vite (client, non-hydratable) > VariableDeclarator > FunctionExpression > should transform VariableDeclarator w/ FunctionExpression with valid Component name and params 4`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; @@ -1111,8 +1111,8 @@ if (import.meta.hot) { `; exports[`vite (client, non-hydratable) > VariableDeclarator > FunctionExpression > should transform VariableDeclarator w/ FunctionExpression with valid Component name and params 5`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`
bar\`), _tmpl$2 = /*#__PURE__*/_$template(\`
foo\`); import { $$component as _$$component } from "solid-refresh"; @@ -1154,9 +1154,9 @@ if (import.meta.hot) { `; exports[`vite (client, non-hydratable) > fix build > refs > should work with a function 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; -import { use as _$use } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; +import { ref as _$ref } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`
Comp\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -1165,7 +1165,7 @@ const _REGISTRY = _$$registry(); const Comp_1 = _$$component(_REGISTRY, "Comp_1", _props => /*@refresh jsx-skip*/(() => { var _el$ = _tmpl$(); var _ref$ = _props.v0; - typeof _ref$ === "function" ? _$use(_ref$, _el$) : _props.v0 = _el$; + typeof _ref$ === "function" || Array.isArray(_ref$) ? _$ref(() => _ref$, _el$) : _props.v0 = _el$; return _el$; })(), { location: "example.jsx:4:19", @@ -1187,9 +1187,9 @@ if (import.meta.hot) { `; exports[`vite (client, non-hydratable) > fix build > refs > should work with a mutable variable 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; -import { use as _$use } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; +import { ref as _$ref } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`
Comp\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -1198,7 +1198,7 @@ const _REGISTRY = _$$registry(); const Comp_1 = _$$component(_REGISTRY, "Comp_1", _props => /*@refresh jsx-skip*/(() => { var _el$ = _tmpl$(); var _ref$ = _props.v0; - typeof _ref$ === "function" ? _$use(_ref$, _el$) : _props.v0 = _el$; + typeof _ref$ === "function" || Array.isArray(_ref$) ? _$ref(() => _ref$, _el$) : _props.v0 = _el$; return _el$; })(), { location: "example.jsx:4:19", @@ -1226,9 +1226,9 @@ if (import.meta.hot) { `; exports[`vite (client, non-hydratable) > fix build > signals as refs > should work 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; -import { use as _$use } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; +import { ref as _$ref } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`
Comp\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -1238,7 +1238,7 @@ const _REGISTRY = _$$registry(); const Comp_1 = _$$component(_REGISTRY, "Comp_1", _props => /*@refresh jsx-skip*/(() => { var _el$ = _tmpl$(); var _ref$ = _props.v0; - typeof _ref$ === "function" ? _$use(_ref$, _el$) : _props.v0 = _el$; + typeof _ref$ === "function" || Array.isArray(_ref$) ? _$ref(() => _ref$, _el$) : _props.v0 = _el$; return _el$; })(), { location: "example.jsx:6:19", @@ -1267,7 +1267,7 @@ if (import.meta.hot) { `; exports[`vite (client, non-hydratable) > fix render > @refresh reload > should work 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; // @refresh reload import { render } from 'solid-js/web'; if (root) { @@ -1280,7 +1280,7 @@ if (import.meta.hot) { `; exports[`vite (client, non-hydratable) > fix render > import specifiers > should work with ImportNamespaceSpecifier 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; @@ -1301,7 +1301,7 @@ if (import.meta.hot) { `; exports[`vite (client, non-hydratable) > fix render > import specifiers > should work with ImportSpecifier + Identifier 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; @@ -1322,7 +1322,7 @@ if (import.meta.hot) { `; exports[`vite (client, non-hydratable) > fix render > import specifiers > should work with ImportSpecifier + aliased Identifier 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; @@ -1343,7 +1343,7 @@ if (import.meta.hot) { `; exports[`vite (client, non-hydratable) > fix render > import specifiers > should work with ImportSpecifier + aliased Identifier from StringLiteral 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; @@ -1364,7 +1364,7 @@ if (import.meta.hot) { `; exports[`vite (client, non-hydratable) > fix render > top-level statements > should work with IfStatement 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; diff --git a/tests/client/__snapshots__/webpack5.test.ts.snap b/tests/client/__snapshots__/webpack5.test.ts.snap index beda463..3b8dee2 100644 --- a/tests/client/__snapshots__/webpack5.test.ts.snap +++ b/tests/client/__snapshots__/webpack5.test.ts.snap @@ -32,7 +32,7 @@ if (import.meta.webpackHot) { `; exports[`webpack5 (client, non-hydratable) > ExportDefaultDeclaration w/ FunctionExpression > should skip ExportDefaultDeclaration w/ FunctionExpression with @refresh reload 1`] = ` -"import { template as _$template } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$decline as _$$decline } from "solid-refresh"; // @refresh reload @@ -45,7 +45,7 @@ if (import.meta.webpackHot) { `; exports[`webpack5 (client, non-hydratable) > ExportDefaultDeclaration w/ FunctionExpression > should skip ExportDefaultDeclaration w/ FunctionExpression with @refresh skip 1`] = ` -"import { template as _$template } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); // @refresh skip export default function Foo() { @@ -54,8 +54,8 @@ export default function Foo() { `; exports[`webpack5 (client, non-hydratable) > ExportDefaultDeclaration w/ FunctionExpression > should skip ExportDefaultDeclaration w/ FunctionExpression with invalid Component name 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -74,8 +74,8 @@ if (import.meta.webpackHot) { `; exports[`webpack5 (client, non-hydratable) > ExportDefaultDeclaration w/ FunctionExpression > should skip ExportDefaultDeclaration w/ FunctionExpression with valid Component name and >1 params 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -94,8 +94,8 @@ if (import.meta.webpackHot) { `; exports[`webpack5 (client, non-hydratable) > ExportDefaultDeclaration w/ FunctionExpression > should transform ExportDefaultDeclaration w/ FunctionExpression with valid Component name and params 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -118,8 +118,8 @@ if (import.meta.webpackHot) { `; exports[`webpack5 (client, non-hydratable) > ExportDefaultDeclaration w/ FunctionExpression > should transform ExportDefaultDeclaration w/ FunctionExpression with valid Component name and params 2`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -142,9 +142,9 @@ if (import.meta.webpackHot) { `; exports[`webpack5 (client, non-hydratable) > ExportDefaultDeclaration w/ FunctionExpression > should transform ExportDefaultDeclaration w/ FunctionExpression with valid Component name and params 3`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; -import { insert as _$insert } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; +import { insert as _$insert } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -177,7 +177,7 @@ if (import.meta.webpackHot) { `; exports[`webpack5 (client, non-hydratable) > ExportDefaultDeclaration w/ FunctionExpression > should transform ExportDefaultDeclaration w/ FunctionExpression with valid Component name and params 4`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; @@ -209,8 +209,8 @@ if (import.meta.webpackHot) { `; exports[`webpack5 (client, non-hydratable) > ExportDefaultDeclaration w/ FunctionExpression > should transform ExportDefaultDeclaration w/ FunctionExpression with valid Component name and params 5`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`
foo\`), _tmpl$2 = /*#__PURE__*/_$template(\`
bar\`); import { $$component as _$$component } from "solid-refresh"; @@ -252,7 +252,7 @@ if (import.meta.webpackHot) { `; exports[`webpack5 (client, non-hydratable) > ExportNamedDeclaration w/ FunctionExpression > should skip ExportNamedDeclaration w/ FunctionExpression with @refresh reload 1`] = ` -"import { template as _$template } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$decline as _$$decline } from "solid-refresh"; // @refresh reload @@ -265,7 +265,7 @@ if (import.meta.webpackHot) { `; exports[`webpack5 (client, non-hydratable) > ExportNamedDeclaration w/ FunctionExpression > should skip ExportNamedDeclaration w/ FunctionExpression with @refresh skip 1`] = ` -"import { template as _$template } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); // @refresh skip export function Foo() { @@ -274,8 +274,8 @@ export function Foo() { `; exports[`webpack5 (client, non-hydratable) > ExportNamedDeclaration w/ FunctionExpression > should skip ExportNamedDeclaration w/ FunctionExpression with invalid Component name 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -298,8 +298,8 @@ if (import.meta.webpackHot) { `; exports[`webpack5 (client, non-hydratable) > ExportNamedDeclaration w/ FunctionExpression > should skip ExportNamedDeclaration w/ FunctionExpression with valid Component name and >1 params 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -318,8 +318,8 @@ if (import.meta.webpackHot) { `; exports[`webpack5 (client, non-hydratable) > ExportNamedDeclaration w/ FunctionExpression > should transform ExportNamedDeclaration w/ FunctionExpression with valid Component name and params 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -342,8 +342,8 @@ if (import.meta.webpackHot) { `; exports[`webpack5 (client, non-hydratable) > ExportNamedDeclaration w/ FunctionExpression > should transform ExportNamedDeclaration w/ FunctionExpression with valid Component name and params 2`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -366,9 +366,9 @@ if (import.meta.webpackHot) { `; exports[`webpack5 (client, non-hydratable) > ExportNamedDeclaration w/ FunctionExpression > should transform ExportNamedDeclaration w/ FunctionExpression with valid Component name and params 3`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; -import { insert as _$insert } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; +import { insert as _$insert } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -401,7 +401,7 @@ if (import.meta.webpackHot) { `; exports[`webpack5 (client, non-hydratable) > ExportNamedDeclaration w/ FunctionExpression > should transform ExportNamedDeclaration w/ FunctionExpression with valid Component name and params 4`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; @@ -433,8 +433,8 @@ if (import.meta.webpackHot) { `; exports[`webpack5 (client, non-hydratable) > ExportNamedDeclaration w/ FunctionExpression > should transform ExportNamedDeclaration w/ FunctionExpression with valid Component name and params 5`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`
bar\`), _tmpl$2 = /*#__PURE__*/_$template(\`
foo\`); import { $$component as _$$component } from "solid-refresh"; @@ -477,7 +477,7 @@ if (import.meta.webpackHot) { `; exports[`webpack5 (client, non-hydratable) > FunctionDeclaration > should skip FunctionDeclaration with @refresh reload 1`] = ` -"import { template as _$template } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$decline as _$$decline } from "solid-refresh"; // @refresh reload @@ -490,7 +490,7 @@ if (import.meta.webpackHot) { `; exports[`webpack5 (client, non-hydratable) > FunctionDeclaration > should skip FunctionDeclaration with @refresh skip 1`] = ` -"import { template as _$template } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); // @refresh skip function Foo() { @@ -499,8 +499,8 @@ function Foo() { `; exports[`webpack5 (client, non-hydratable) > FunctionDeclaration > should skip FunctionDeclaration with invalid Component name 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -519,8 +519,8 @@ if (import.meta.webpackHot) { `; exports[`webpack5 (client, non-hydratable) > FunctionDeclaration > should skip FunctionDeclaration with valid Component name and >1 params 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -539,8 +539,8 @@ if (import.meta.webpackHot) { `; exports[`webpack5 (client, non-hydratable) > FunctionDeclaration > should transform FunctionDeclaration with valid Component name and params 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -562,8 +562,8 @@ if (import.meta.webpackHot) { `; exports[`webpack5 (client, non-hydratable) > FunctionDeclaration > should transform FunctionDeclaration with valid Component name and params 2`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -585,9 +585,9 @@ if (import.meta.webpackHot) { `; exports[`webpack5 (client, non-hydratable) > FunctionDeclaration > should transform FunctionDeclaration with valid Component name and params 3`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; -import { insert as _$insert } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; +import { insert as _$insert } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -619,7 +619,7 @@ if (import.meta.webpackHot) { `; exports[`webpack5 (client, non-hydratable) > FunctionDeclaration > should transform FunctionDeclaration with valid Component name and params 4`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; @@ -650,8 +650,8 @@ if (import.meta.webpackHot) { `; exports[`webpack5 (client, non-hydratable) > FunctionDeclaration > should transform FunctionDeclaration with valid Component name and params 5`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`
foo\`), _tmpl$2 = /*#__PURE__*/_$template(\`
bar\`); import { $$component as _$$component } from "solid-refresh"; @@ -692,7 +692,7 @@ if (import.meta.webpackHot) { `; exports[`webpack5 (client, non-hydratable) > VariableDeclarator > ArrowFunctionExpression > should skip VariableDeclarator w/ ArrowFunctionExpression with @refresh reload 1`] = ` -"import { template as _$template } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$decline as _$$decline } from "solid-refresh"; // @refresh reload @@ -705,7 +705,7 @@ if (import.meta.webpackHot) { `; exports[`webpack5 (client, non-hydratable) > VariableDeclarator > ArrowFunctionExpression > should skip VariableDeclarator w/ ArrowFunctionExpression with @refresh skip 1`] = ` -"import { template as _$template } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); // @refresh skip const Foo = () => { @@ -714,8 +714,8 @@ const Foo = () => { `; exports[`webpack5 (client, non-hydratable) > VariableDeclarator > ArrowFunctionExpression > should skip VariableDeclarator w/ ArrowFunctionExpression with invalid Component name 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -734,8 +734,8 @@ if (import.meta.webpackHot) { `; exports[`webpack5 (client, non-hydratable) > VariableDeclarator > ArrowFunctionExpression > should skip VariableDeclarator w/ ArrowFunctionExpression with valid Component name and >1 params 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -754,8 +754,8 @@ if (import.meta.webpackHot) { `; exports[`webpack5 (client, non-hydratable) > VariableDeclarator > ArrowFunctionExpression > should transform VariableDeclarator w/ ArrowFunctionExpression with valid Component name and params 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -777,8 +777,8 @@ if (import.meta.webpackHot) { `; exports[`webpack5 (client, non-hydratable) > VariableDeclarator > ArrowFunctionExpression > should transform VariableDeclarator w/ ArrowFunctionExpression with valid Component name and params 2`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -800,9 +800,9 @@ if (import.meta.webpackHot) { `; exports[`webpack5 (client, non-hydratable) > VariableDeclarator > ArrowFunctionExpression > should transform VariableDeclarator w/ ArrowFunctionExpression with valid Component name and params 3`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; -import { insert as _$insert } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; +import { insert as _$insert } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -834,7 +834,7 @@ if (import.meta.webpackHot) { `; exports[`webpack5 (client, non-hydratable) > VariableDeclarator > ArrowFunctionExpression > should transform VariableDeclarator w/ ArrowFunctionExpression with valid Component name and params 4`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; @@ -865,8 +865,8 @@ if (import.meta.webpackHot) { `; exports[`webpack5 (client, non-hydratable) > VariableDeclarator > ArrowFunctionExpression > should transform VariableDeclarator w/ ArrowFunctionExpression with valid Component name and params 5`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`
bar\`), _tmpl$2 = /*#__PURE__*/_$template(\`
foo\`); import { $$component as _$$component } from "solid-refresh"; @@ -907,7 +907,7 @@ if (import.meta.webpackHot) { `; exports[`webpack5 (client, non-hydratable) > VariableDeclarator > FunctionExpression > should skip VariableDeclarator w/ FunctionExpression with @refresh reload 1`] = ` -"import { template as _$template } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$decline as _$$decline } from "solid-refresh"; // @refresh reload @@ -920,7 +920,7 @@ if (import.meta.webpackHot) { `; exports[`webpack5 (client, non-hydratable) > VariableDeclarator > FunctionExpression > should skip VariableDeclarator w/ FunctionExpression with @refresh skip 1`] = ` -"import { template as _$template } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); // @refresh skip const Foo = function () { @@ -929,8 +929,8 @@ const Foo = function () { `; exports[`webpack5 (client, non-hydratable) > VariableDeclarator > FunctionExpression > should skip VariableDeclarator w/ FunctionExpression with invalid Component name 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -949,8 +949,8 @@ if (import.meta.webpackHot) { `; exports[`webpack5 (client, non-hydratable) > VariableDeclarator > FunctionExpression > should skip VariableDeclarator w/ FunctionExpression with valid Component name and >1 params 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -969,8 +969,8 @@ if (import.meta.webpackHot) { `; exports[`webpack5 (client, non-hydratable) > VariableDeclarator > FunctionExpression > should transform VariableDeclarator w/ FunctionExpression with valid Component name and params 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -992,8 +992,8 @@ if (import.meta.webpackHot) { `; exports[`webpack5 (client, non-hydratable) > VariableDeclarator > FunctionExpression > should transform VariableDeclarator w/ FunctionExpression with valid Component name and params 2`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

Foo\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -1015,9 +1015,9 @@ if (import.meta.webpackHot) { `; exports[`webpack5 (client, non-hydratable) > VariableDeclarator > FunctionExpression > should transform VariableDeclarator w/ FunctionExpression with valid Component name and params 3`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; -import { insert as _$insert } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; +import { insert as _$insert } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`

\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -1049,7 +1049,7 @@ if (import.meta.webpackHot) { `; exports[`webpack5 (client, non-hydratable) > VariableDeclarator > FunctionExpression > should transform VariableDeclarator w/ FunctionExpression with valid Component name and params 4`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; @@ -1080,8 +1080,8 @@ if (import.meta.webpackHot) { `; exports[`webpack5 (client, non-hydratable) > VariableDeclarator > FunctionExpression > should transform VariableDeclarator w/ FunctionExpression with valid Component name and params 5`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`
bar\`), _tmpl$2 = /*#__PURE__*/_$template(\`
foo\`); import { $$component as _$$component } from "solid-refresh"; @@ -1122,9 +1122,9 @@ if (import.meta.webpackHot) { `; exports[`webpack5 (client, non-hydratable) > fix build > refs > should work with a function 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; -import { use as _$use } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; +import { ref as _$ref } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`
Comp\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -1133,7 +1133,7 @@ const _REGISTRY = _$$registry(); const Comp_1 = _$$component(_REGISTRY, "Comp_1", _props => /*@refresh jsx-skip*/(() => { var _el$ = _tmpl$(); var _ref$ = _props.v0; - typeof _ref$ === "function" ? _$use(_ref$, _el$) : _props.v0 = _el$; + typeof _ref$ === "function" || Array.isArray(_ref$) ? _$ref(() => _ref$, _el$) : _props.v0 = _el$; return _el$; })(), { location: "example.jsx:4:19", @@ -1154,9 +1154,9 @@ if (import.meta.webpackHot) { `; exports[`webpack5 (client, non-hydratable) > fix build > refs > should work with a mutable variable 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; -import { use as _$use } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; +import { ref as _$ref } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`
Comp\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -1165,7 +1165,7 @@ const _REGISTRY = _$$registry(); const Comp_1 = _$$component(_REGISTRY, "Comp_1", _props => /*@refresh jsx-skip*/(() => { var _el$ = _tmpl$(); var _ref$ = _props.v0; - typeof _ref$ === "function" ? _$use(_ref$, _el$) : _props.v0 = _el$; + typeof _ref$ === "function" || Array.isArray(_ref$) ? _$ref(() => _ref$, _el$) : _props.v0 = _el$; return _el$; })(), { location: "example.jsx:4:19", @@ -1192,9 +1192,9 @@ if (import.meta.webpackHot) { `; exports[`webpack5 (client, non-hydratable) > fix build > signals as refs > should work 1`] = ` -"import { template as _$template } from "solid-js/web"; -import { createComponent as _$createComponent } from "solid-js/web"; -import { use as _$use } from "solid-js/web"; +"import { template as _$template } from "@solidjs/web"; +import { createComponent as _$createComponent } from "@solidjs/web"; +import { ref as _$ref } from "@solidjs/web"; var _tmpl$ = /*#__PURE__*/_$template(\`
Comp\`); import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -1204,7 +1204,7 @@ const _REGISTRY = _$$registry(); const Comp_1 = _$$component(_REGISTRY, "Comp_1", _props => /*@refresh jsx-skip*/(() => { var _el$ = _tmpl$(); var _ref$ = _props.v0; - typeof _ref$ === "function" ? _$use(_ref$, _el$) : _props.v0 = _el$; + typeof _ref$ === "function" || Array.isArray(_ref$) ? _$ref(() => _ref$, _el$) : _props.v0 = _el$; return _el$; })(), { location: "example.jsx:6:19", @@ -1232,7 +1232,7 @@ if (import.meta.webpackHot) { `; exports[`webpack5 (client, non-hydratable) > fix render > @refresh reload > should work 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; import { $$decline as _$$decline } from "solid-refresh"; // @refresh reload import { render } from 'solid-js/web'; @@ -1246,7 +1246,7 @@ if (import.meta.webpackHot) { `; exports[`webpack5 (client, non-hydratable) > fix render > import specifiers > should work with ImportNamespaceSpecifier 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; @@ -1266,7 +1266,7 @@ if (import.meta.webpackHot) { `; exports[`webpack5 (client, non-hydratable) > fix render > import specifiers > should work with ImportSpecifier + Identifier 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; @@ -1286,7 +1286,7 @@ if (import.meta.webpackHot) { `; exports[`webpack5 (client, non-hydratable) > fix render > import specifiers > should work with ImportSpecifier + aliased Identifier 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; @@ -1306,7 +1306,7 @@ if (import.meta.webpackHot) { `; exports[`webpack5 (client, non-hydratable) > fix render > import specifiers > should work with ImportSpecifier + aliased Identifier from StringLiteral 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; @@ -1326,7 +1326,7 @@ if (import.meta.webpackHot) { `; exports[`webpack5 (client, non-hydratable) > fix render > top-level statements > should work with IfStatement 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; diff --git a/tests/server-hydratable/__snapshots__/esm.test.ts.snap b/tests/server-hydratable/__snapshots__/esm.test.ts.snap index c79fc3f..f0f8746 100644 --- a/tests/server-hydratable/__snapshots__/esm.test.ts.snap +++ b/tests/server-hydratable/__snapshots__/esm.test.ts.snap @@ -32,13 +32,16 @@ if (import.meta.hot) { `; exports[`esm (server, hydratable) > ExportDefaultDeclaration w/ FunctionExpression > should skip ExportDefaultDeclaration w/ FunctionExpression with @refresh reload 1`] = ` -"import { ssr as _$ssr } from "solid-js/web"; -import { ssrHydrationKey as _$ssrHydrationKey } from "solid-js/web"; +"import { ssr as _$ssr } from "@solidjs/web"; +import { ssrHydrationKey as _$ssrHydrationKey } from "@solidjs/web"; var _tmpl$ = ["Foo

"]; import { $$decline as _$$decline } from "solid-refresh"; // @refresh reload export default function Foo() { - return _$ssr(_tmpl$, _$ssrHydrationKey()); + return (() => { + var _v$ = _$ssrHydrationKey(); + return _$ssr(_tmpl$, _v$); + })(); } if (import.meta.hot) { _$$decline("esm", import.meta.hot); @@ -46,25 +49,31 @@ if (import.meta.hot) { `; exports[`esm (server, hydratable) > ExportDefaultDeclaration w/ FunctionExpression > should skip ExportDefaultDeclaration w/ FunctionExpression with @refresh skip 1`] = ` -"import { ssr as _$ssr } from "solid-js/web"; -import { ssrHydrationKey as _$ssrHydrationKey } from "solid-js/web"; +"import { ssr as _$ssr } from "@solidjs/web"; +import { ssrHydrationKey as _$ssrHydrationKey } from "@solidjs/web"; var _tmpl$ = ["Foo

"]; // @refresh skip export default function Foo() { - return _$ssr(_tmpl$, _$ssrHydrationKey()); + return (() => { + var _v$ = _$ssrHydrationKey(); + return _$ssr(_tmpl$, _v$); + })(); }" `; exports[`esm (server, hydratable) > ExportDefaultDeclaration w/ FunctionExpression > should skip ExportDefaultDeclaration w/ FunctionExpression with invalid Component name 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; -import { ssrHydrationKey as _$ssrHydrationKey } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; +import { ssrHydrationKey as _$ssrHydrationKey } from "@solidjs/web"; var _tmpl$ = ["Foo

"]; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; const _REGISTRY = _$$registry(); -const JSX_foo_1 = _$$component(_REGISTRY, "JSX_foo_1", _props => /*@refresh jsx-skip*/_$ssr(_tmpl$, _$ssrHydrationKey()), { +const JSX_foo_1 = _$$component(_REGISTRY, "JSX_foo_1", _props => /*@refresh jsx-skip*/(() => { + var _v$ = _$ssrHydrationKey(); + return _$ssr(_tmpl$, _v$); +})(), { location: "example.jsx:3:15", signature: "4b145a58" }); @@ -77,15 +86,18 @@ if (import.meta.hot) { `; exports[`esm (server, hydratable) > ExportDefaultDeclaration w/ FunctionExpression > should skip ExportDefaultDeclaration w/ FunctionExpression with valid Component name and >1 params 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; -import { ssrHydrationKey as _$ssrHydrationKey } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; +import { ssrHydrationKey as _$ssrHydrationKey } from "@solidjs/web"; var _tmpl$ = ["Foo

"]; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; const _REGISTRY = _$$registry(); -const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/_$ssr(_tmpl$, _$ssrHydrationKey()), { +const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/(() => { + var _v$ = _$ssrHydrationKey(); + return _$ssr(_tmpl$, _v$); +})(), { location: "example.jsx:3:15", signature: "4b145a58" }); @@ -98,15 +110,18 @@ if (import.meta.hot) { `; exports[`esm (server, hydratable) > ExportDefaultDeclaration w/ FunctionExpression > should transform ExportDefaultDeclaration w/ FunctionExpression with valid Component name and params 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; -import { ssrHydrationKey as _$ssrHydrationKey } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; +import { ssrHydrationKey as _$ssrHydrationKey } from "@solidjs/web"; var _tmpl$ = ["Foo

"]; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; const _REGISTRY = _$$registry(); -const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/_$ssr(_tmpl$, _$ssrHydrationKey()), { +const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/(() => { + var _v$ = _$ssrHydrationKey(); + return _$ssr(_tmpl$, _v$); +})(), { location: "example.jsx:3:15", signature: "4b145a58" }); @@ -123,15 +138,18 @@ if (import.meta.hot) { `; exports[`esm (server, hydratable) > ExportDefaultDeclaration w/ FunctionExpression > should transform ExportDefaultDeclaration w/ FunctionExpression with valid Component name and params 2`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; -import { ssrHydrationKey as _$ssrHydrationKey } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; +import { ssrHydrationKey as _$ssrHydrationKey } from "@solidjs/web"; var _tmpl$ = ["Foo

"]; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; const _REGISTRY = _$$registry(); -const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/_$ssr(_tmpl$, _$ssrHydrationKey()), { +const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/(() => { + var _v$ = _$ssrHydrationKey(); + return _$ssr(_tmpl$, _v$); +})(), { location: "example.jsx:3:15", signature: "4b145a58" }); @@ -148,16 +166,21 @@ if (import.meta.hot) { `; exports[`esm (server, hydratable) > ExportDefaultDeclaration w/ FunctionExpression > should transform ExportDefaultDeclaration w/ FunctionExpression with valid Component name and params 3`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; -import { escape as _$escape } from "solid-js/web"; -import { ssrHydrationKey as _$ssrHydrationKey } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; +import { ssrRunInScope as _$ssrRunInScope } from "@solidjs/web"; +import { escape as _$escape } from "@solidjs/web"; +import { ssrHydrationKey as _$ssrHydrationKey } from "@solidjs/web"; var _tmpl$ = ["", "

"]; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; const _REGISTRY = _$$registry(); -const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/_$ssr(_tmpl$, _$ssrHydrationKey(), _$escape(_props.v0)), { +const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/(() => { + var _v$ = _$ssrHydrationKey(), + _v$2 = _$ssrRunInScope(() => _$escape(_props.v0)); + return _$ssr(_tmpl$, _v$, _v$2); +})(), { location: "example.jsx:4:15", signature: "ae0f2a31" }); @@ -180,7 +203,7 @@ if (import.meta.hot) { `; exports[`esm (server, hydratable) > ExportDefaultDeclaration w/ FunctionExpression > should transform ExportDefaultDeclaration w/ FunctionExpression with valid Component name and params 4`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; @@ -212,16 +235,19 @@ if (import.meta.hot) { `; exports[`esm (server, hydratable) > ExportDefaultDeclaration w/ FunctionExpression > should transform ExportDefaultDeclaration w/ FunctionExpression with valid Component name and params 5`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; -import { ssrHydrationKey as _$ssrHydrationKey } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; +import { ssrHydrationKey as _$ssrHydrationKey } from "@solidjs/web"; var _tmpl$ = ["foo
"], _tmpl$2 = ["bar
"]; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; const _REGISTRY = _$$registry(); -const Foo_1_1 = _$$component(_REGISTRY, "Foo_1_1", _props3 => /*@refresh jsx-skip*/_$ssr(_tmpl$, _$ssrHydrationKey()), { +const Foo_1_1 = _$$component(_REGISTRY, "Foo_1_1", _props3 => /*@refresh jsx-skip*/(() => { + var _v$ = _$ssrHydrationKey(); + return _$ssr(_tmpl$, _v$); +})(), { location: "example.jsx:8:12", signature: "241c14a4" }); @@ -239,7 +265,10 @@ const Foo = _$$component(_REGISTRY, "Foo", function Foo() { location: "example.jsx:5:21", signature: "c963b907" }); -const Bar_1 = _$$component(_REGISTRY, "Bar_1", _props2 => /*@refresh jsx-skip*/_$ssr(_tmpl$2, _$ssrHydrationKey()), { +const Bar_1 = _$$component(_REGISTRY, "Bar_1", _props2 => /*@refresh jsx-skip*/(() => { + var _v$2 = _$ssrHydrationKey(); + return _$ssr(_tmpl$2, _v$2); +})(), { location: "example.jsx:3:15", signature: "fad4daa8" }); @@ -256,13 +285,16 @@ if (import.meta.hot) { `; exports[`esm (server, hydratable) > ExportNamedDeclaration w/ FunctionExpression > should skip ExportNamedDeclaration w/ FunctionExpression with @refresh reload 1`] = ` -"import { ssr as _$ssr } from "solid-js/web"; -import { ssrHydrationKey as _$ssrHydrationKey } from "solid-js/web"; +"import { ssr as _$ssr } from "@solidjs/web"; +import { ssrHydrationKey as _$ssrHydrationKey } from "@solidjs/web"; var _tmpl$ = ["Foo

"]; import { $$decline as _$$decline } from "solid-refresh"; // @refresh reload export function Foo() { - return _$ssr(_tmpl$, _$ssrHydrationKey()); + return (() => { + var _v$ = _$ssrHydrationKey(); + return _$ssr(_tmpl$, _v$); + })(); } if (import.meta.hot) { _$$decline("esm", import.meta.hot); @@ -270,25 +302,31 @@ if (import.meta.hot) { `; exports[`esm (server, hydratable) > ExportNamedDeclaration w/ FunctionExpression > should skip ExportNamedDeclaration w/ FunctionExpression with @refresh skip 1`] = ` -"import { ssr as _$ssr } from "solid-js/web"; -import { ssrHydrationKey as _$ssrHydrationKey } from "solid-js/web"; +"import { ssr as _$ssr } from "@solidjs/web"; +import { ssrHydrationKey as _$ssrHydrationKey } from "@solidjs/web"; var _tmpl$ = ["Foo

"]; // @refresh skip export function Foo() { - return _$ssr(_tmpl$, _$ssrHydrationKey()); + return (() => { + var _v$ = _$ssrHydrationKey(); + return _$ssr(_tmpl$, _v$); + })(); }" `; exports[`esm (server, hydratable) > ExportNamedDeclaration w/ FunctionExpression > should skip ExportNamedDeclaration w/ FunctionExpression with invalid Component name 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; -import { ssrHydrationKey as _$ssrHydrationKey } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; +import { ssrHydrationKey as _$ssrHydrationKey } from "@solidjs/web"; var _tmpl$ = ["Foo

"]; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; const _REGISTRY = _$$registry(); -const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/_$ssr(_tmpl$, _$ssrHydrationKey()), { +const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/(() => { + var _v$ = _$ssrHydrationKey(); + return _$ssr(_tmpl$, _v$); +})(), { location: "example.jsx:3:15", signature: "4b145a58" }); @@ -305,15 +343,18 @@ if (import.meta.hot) { `; exports[`esm (server, hydratable) > ExportNamedDeclaration w/ FunctionExpression > should skip ExportNamedDeclaration w/ FunctionExpression with valid Component name and >1 params 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; -import { ssrHydrationKey as _$ssrHydrationKey } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; +import { ssrHydrationKey as _$ssrHydrationKey } from "@solidjs/web"; var _tmpl$ = ["Foo

"]; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; const _REGISTRY = _$$registry(); -const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/_$ssr(_tmpl$, _$ssrHydrationKey()), { +const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/(() => { + var _v$ = _$ssrHydrationKey(); + return _$ssr(_tmpl$, _v$); +})(), { location: "example.jsx:3:15", signature: "4b145a58" }); @@ -326,15 +367,18 @@ if (import.meta.hot) { `; exports[`esm (server, hydratable) > ExportNamedDeclaration w/ FunctionExpression > should transform ExportNamedDeclaration w/ FunctionExpression with valid Component name and params 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; -import { ssrHydrationKey as _$ssrHydrationKey } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; +import { ssrHydrationKey as _$ssrHydrationKey } from "@solidjs/web"; var _tmpl$ = ["Foo

"]; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; const _REGISTRY = _$$registry(); -const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/_$ssr(_tmpl$, _$ssrHydrationKey()), { +const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/(() => { + var _v$ = _$ssrHydrationKey(); + return _$ssr(_tmpl$, _v$); +})(), { location: "example.jsx:3:15", signature: "4b145a58" }); @@ -351,15 +395,18 @@ if (import.meta.hot) { `; exports[`esm (server, hydratable) > ExportNamedDeclaration w/ FunctionExpression > should transform ExportNamedDeclaration w/ FunctionExpression with valid Component name and params 2`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; -import { ssrHydrationKey as _$ssrHydrationKey } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; +import { ssrHydrationKey as _$ssrHydrationKey } from "@solidjs/web"; var _tmpl$ = ["Foo

"]; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; const _REGISTRY = _$$registry(); -const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/_$ssr(_tmpl$, _$ssrHydrationKey()), { +const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/(() => { + var _v$ = _$ssrHydrationKey(); + return _$ssr(_tmpl$, _v$); +})(), { location: "example.jsx:3:15", signature: "4b145a58" }); @@ -376,16 +423,21 @@ if (import.meta.hot) { `; exports[`esm (server, hydratable) > ExportNamedDeclaration w/ FunctionExpression > should transform ExportNamedDeclaration w/ FunctionExpression with valid Component name and params 3`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; -import { escape as _$escape } from "solid-js/web"; -import { ssrHydrationKey as _$ssrHydrationKey } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; +import { ssrRunInScope as _$ssrRunInScope } from "@solidjs/web"; +import { escape as _$escape } from "@solidjs/web"; +import { ssrHydrationKey as _$ssrHydrationKey } from "@solidjs/web"; var _tmpl$ = ["", "

"]; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; const _REGISTRY = _$$registry(); -const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/_$ssr(_tmpl$, _$ssrHydrationKey(), _$escape(_props.v0)), { +const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/(() => { + var _v$ = _$ssrHydrationKey(), + _v$2 = _$ssrRunInScope(() => _$escape(_props.v0)); + return _$ssr(_tmpl$, _v$, _v$2); +})(), { location: "example.jsx:4:15", signature: "ae0f2a31" }); @@ -408,7 +460,7 @@ if (import.meta.hot) { `; exports[`esm (server, hydratable) > ExportNamedDeclaration w/ FunctionExpression > should transform ExportNamedDeclaration w/ FunctionExpression with valid Component name and params 4`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; @@ -440,16 +492,19 @@ if (import.meta.hot) { `; exports[`esm (server, hydratable) > ExportNamedDeclaration w/ FunctionExpression > should transform ExportNamedDeclaration w/ FunctionExpression with valid Component name and params 5`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; -import { ssrHydrationKey as _$ssrHydrationKey } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; +import { ssrHydrationKey as _$ssrHydrationKey } from "@solidjs/web"; var _tmpl$ = ["bar
"], _tmpl$2 = ["foo
"]; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; const _REGISTRY = _$$registry(); -const Bar_1 = _$$component(_REGISTRY, "Bar_1", _props => /*@refresh jsx-skip*/_$ssr(_tmpl$, _$ssrHydrationKey()), { +const Bar_1 = _$$component(_REGISTRY, "Bar_1", _props => /*@refresh jsx-skip*/(() => { + var _v$ = _$ssrHydrationKey(); + return _$ssr(_tmpl$, _v$); +})(), { location: "example.jsx:3:15", signature: "61dd3182" }); @@ -459,7 +514,10 @@ const Bar = _$$component(_REGISTRY, "Bar", function Bar() { location: "example.jsx:2:13", signature: "e93ca257" }); -const Foo_1_1 = _$$component(_REGISTRY, "Foo_1_1", _props3 => /*@refresh jsx-skip*/_$ssr(_tmpl$2, _$ssrHydrationKey()), { +const Foo_1_1 = _$$component(_REGISTRY, "Foo_1_1", _props3 => /*@refresh jsx-skip*/(() => { + var _v$2 = _$ssrHydrationKey(); + return _$ssr(_tmpl$2, _v$2); +})(), { location: "example.jsx:8:12", signature: "241c14a4" }); @@ -485,13 +543,16 @@ if (import.meta.hot) { `; exports[`esm (server, hydratable) > FunctionDeclaration > should skip FunctionDeclaration with @refresh reload 1`] = ` -"import { ssr as _$ssr } from "solid-js/web"; -import { ssrHydrationKey as _$ssrHydrationKey } from "solid-js/web"; +"import { ssr as _$ssr } from "@solidjs/web"; +import { ssrHydrationKey as _$ssrHydrationKey } from "@solidjs/web"; var _tmpl$ = ["Foo

"]; import { $$decline as _$$decline } from "solid-refresh"; // @refresh reload function Foo() { - return _$ssr(_tmpl$, _$ssrHydrationKey()); + return (() => { + var _v$ = _$ssrHydrationKey(); + return _$ssr(_tmpl$, _v$); + })(); } if (import.meta.hot) { _$$decline("esm", import.meta.hot); @@ -499,25 +560,31 @@ if (import.meta.hot) { `; exports[`esm (server, hydratable) > FunctionDeclaration > should skip FunctionDeclaration with @refresh skip 1`] = ` -"import { ssr as _$ssr } from "solid-js/web"; -import { ssrHydrationKey as _$ssrHydrationKey } from "solid-js/web"; +"import { ssr as _$ssr } from "@solidjs/web"; +import { ssrHydrationKey as _$ssrHydrationKey } from "@solidjs/web"; var _tmpl$ = ["Foo

"]; // @refresh skip function Foo() { - return _$ssr(_tmpl$, _$ssrHydrationKey()); + return (() => { + var _v$ = _$ssrHydrationKey(); + return _$ssr(_tmpl$, _v$); + })(); }" `; exports[`esm (server, hydratable) > FunctionDeclaration > should skip FunctionDeclaration with invalid Component name 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; -import { ssrHydrationKey as _$ssrHydrationKey } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; +import { ssrHydrationKey as _$ssrHydrationKey } from "@solidjs/web"; var _tmpl$ = ["Foo

"]; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; const _REGISTRY = _$$registry(); -const JSX_foo_1 = _$$component(_REGISTRY, "JSX_foo_1", _props => /*@refresh jsx-skip*/_$ssr(_tmpl$, _$ssrHydrationKey()), { +const JSX_foo_1 = _$$component(_REGISTRY, "JSX_foo_1", _props => /*@refresh jsx-skip*/(() => { + var _v$ = _$ssrHydrationKey(); + return _$ssr(_tmpl$, _v$); +})(), { location: "example.jsx:3:15", signature: "4b145a58" }); @@ -530,15 +597,18 @@ if (import.meta.hot) { `; exports[`esm (server, hydratable) > FunctionDeclaration > should skip FunctionDeclaration with valid Component name and >1 params 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; -import { ssrHydrationKey as _$ssrHydrationKey } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; +import { ssrHydrationKey as _$ssrHydrationKey } from "@solidjs/web"; var _tmpl$ = ["Foo

"]; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; const _REGISTRY = _$$registry(); -const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/_$ssr(_tmpl$, _$ssrHydrationKey()), { +const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/(() => { + var _v$ = _$ssrHydrationKey(); + return _$ssr(_tmpl$, _v$); +})(), { location: "example.jsx:3:15", signature: "4b145a58" }); @@ -551,15 +621,18 @@ if (import.meta.hot) { `; exports[`esm (server, hydratable) > FunctionDeclaration > should transform FunctionDeclaration with valid Component name and params 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; -import { ssrHydrationKey as _$ssrHydrationKey } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; +import { ssrHydrationKey as _$ssrHydrationKey } from "@solidjs/web"; var _tmpl$ = ["Foo

"]; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; const _REGISTRY = _$$registry(); -const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/_$ssr(_tmpl$, _$ssrHydrationKey()), { +const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/(() => { + var _v$ = _$ssrHydrationKey(); + return _$ssr(_tmpl$, _v$); +})(), { location: "example.jsx:3:15", signature: "4b145a58" }); @@ -575,15 +648,18 @@ if (import.meta.hot) { `; exports[`esm (server, hydratable) > FunctionDeclaration > should transform FunctionDeclaration with valid Component name and params 2`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; -import { ssrHydrationKey as _$ssrHydrationKey } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; +import { ssrHydrationKey as _$ssrHydrationKey } from "@solidjs/web"; var _tmpl$ = ["Foo

"]; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; const _REGISTRY = _$$registry(); -const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/_$ssr(_tmpl$, _$ssrHydrationKey()), { +const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/(() => { + var _v$ = _$ssrHydrationKey(); + return _$ssr(_tmpl$, _v$); +})(), { location: "example.jsx:3:15", signature: "4b145a58" }); @@ -599,16 +675,21 @@ if (import.meta.hot) { `; exports[`esm (server, hydratable) > FunctionDeclaration > should transform FunctionDeclaration with valid Component name and params 3`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; -import { escape as _$escape } from "solid-js/web"; -import { ssrHydrationKey as _$ssrHydrationKey } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; +import { ssrRunInScope as _$ssrRunInScope } from "@solidjs/web"; +import { escape as _$escape } from "@solidjs/web"; +import { ssrHydrationKey as _$ssrHydrationKey } from "@solidjs/web"; var _tmpl$ = ["", "

"]; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; const _REGISTRY = _$$registry(); -const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/_$ssr(_tmpl$, _$ssrHydrationKey(), _$escape(_props.v0)), { +const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/(() => { + var _v$ = _$ssrHydrationKey(), + _v$2 = _$ssrRunInScope(() => _$escape(_props.v0)); + return _$ssr(_tmpl$, _v$, _v$2); +})(), { location: "example.jsx:4:15", signature: "ae0f2a31" }); @@ -630,7 +711,7 @@ if (import.meta.hot) { `; exports[`esm (server, hydratable) > FunctionDeclaration > should transform FunctionDeclaration with valid Component name and params 4`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; @@ -661,16 +742,19 @@ if (import.meta.hot) { `; exports[`esm (server, hydratable) > FunctionDeclaration > should transform FunctionDeclaration with valid Component name and params 5`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; -import { ssrHydrationKey as _$ssrHydrationKey } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; +import { ssrHydrationKey as _$ssrHydrationKey } from "@solidjs/web"; var _tmpl$ = ["foo
"], _tmpl$2 = ["bar
"]; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; const _REGISTRY = _$$registry(); -const Foo_1_1 = _$$component(_REGISTRY, "Foo_1_1", _props3 => /*@refresh jsx-skip*/_$ssr(_tmpl$, _$ssrHydrationKey()), { +const Foo_1_1 = _$$component(_REGISTRY, "Foo_1_1", _props3 => /*@refresh jsx-skip*/(() => { + var _v$ = _$ssrHydrationKey(); + return _$ssr(_tmpl$, _v$); +})(), { location: "example.jsx:8:12", signature: "241c14a4" }); @@ -688,7 +772,10 @@ const Foo = _$$component(_REGISTRY, "Foo", function Foo() { location: "example.jsx:5:6", signature: "c963b907" }); -const Bar_1 = _$$component(_REGISTRY, "Bar_1", _props2 => /*@refresh jsx-skip*/_$ssr(_tmpl$2, _$ssrHydrationKey()), { +const Bar_1 = _$$component(_REGISTRY, "Bar_1", _props2 => /*@refresh jsx-skip*/(() => { + var _v$2 = _$ssrHydrationKey(); + return _$ssr(_tmpl$2, _v$2); +})(), { location: "example.jsx:3:15", signature: "fad4daa8" }); @@ -704,13 +791,16 @@ if (import.meta.hot) { `; exports[`esm (server, hydratable) > VariableDeclarator > ArrowFunctionExpression > should skip VariableDeclarator w/ ArrowFunctionExpression with @refresh reload 1`] = ` -"import { ssr as _$ssr } from "solid-js/web"; -import { ssrHydrationKey as _$ssrHydrationKey } from "solid-js/web"; +"import { ssr as _$ssr } from "@solidjs/web"; +import { ssrHydrationKey as _$ssrHydrationKey } from "@solidjs/web"; var _tmpl$ = ["Foo

"]; import { $$decline as _$$decline } from "solid-refresh"; // @refresh reload const Foo = () => { - return _$ssr(_tmpl$, _$ssrHydrationKey()); + return (() => { + var _v$ = _$ssrHydrationKey(); + return _$ssr(_tmpl$, _v$); + })(); }; if (import.meta.hot) { _$$decline("esm", import.meta.hot); @@ -718,25 +808,31 @@ if (import.meta.hot) { `; exports[`esm (server, hydratable) > VariableDeclarator > ArrowFunctionExpression > should skip VariableDeclarator w/ ArrowFunctionExpression with @refresh skip 1`] = ` -"import { ssr as _$ssr } from "solid-js/web"; -import { ssrHydrationKey as _$ssrHydrationKey } from "solid-js/web"; +"import { ssr as _$ssr } from "@solidjs/web"; +import { ssrHydrationKey as _$ssrHydrationKey } from "@solidjs/web"; var _tmpl$ = ["Foo

"]; // @refresh skip const Foo = () => { - return _$ssr(_tmpl$, _$ssrHydrationKey()); + return (() => { + var _v$ = _$ssrHydrationKey(); + return _$ssr(_tmpl$, _v$); + })(); };" `; exports[`esm (server, hydratable) > VariableDeclarator > ArrowFunctionExpression > should skip VariableDeclarator w/ ArrowFunctionExpression with invalid Component name 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; -import { ssrHydrationKey as _$ssrHydrationKey } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; +import { ssrHydrationKey as _$ssrHydrationKey } from "@solidjs/web"; var _tmpl$ = ["Foo

"]; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; const _REGISTRY = _$$registry(); -const JSX_foo_1 = _$$component(_REGISTRY, "JSX_foo_1", _props => /*@refresh jsx-skip*/_$ssr(_tmpl$, _$ssrHydrationKey()), { +const JSX_foo_1 = _$$component(_REGISTRY, "JSX_foo_1", _props => /*@refresh jsx-skip*/(() => { + var _v$ = _$ssrHydrationKey(); + return _$ssr(_tmpl$, _v$); +})(), { location: "example.jsx:3:17", signature: "4b145a58" }); @@ -749,15 +845,18 @@ if (import.meta.hot) { `; exports[`esm (server, hydratable) > VariableDeclarator > ArrowFunctionExpression > should skip VariableDeclarator w/ ArrowFunctionExpression with valid Component name and >1 params 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; -import { ssrHydrationKey as _$ssrHydrationKey } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; +import { ssrHydrationKey as _$ssrHydrationKey } from "@solidjs/web"; var _tmpl$ = ["Foo

"]; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; const _REGISTRY = _$$registry(); -const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/_$ssr(_tmpl$, _$ssrHydrationKey()), { +const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/(() => { + var _v$ = _$ssrHydrationKey(); + return _$ssr(_tmpl$, _v$); +})(), { location: "example.jsx:3:17", signature: "4b145a58" }); @@ -770,15 +869,18 @@ if (import.meta.hot) { `; exports[`esm (server, hydratable) > VariableDeclarator > ArrowFunctionExpression > should transform VariableDeclarator w/ ArrowFunctionExpression with valid Component name and params 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; -import { ssrHydrationKey as _$ssrHydrationKey } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; +import { ssrHydrationKey as _$ssrHydrationKey } from "@solidjs/web"; var _tmpl$ = ["Foo

"]; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; const _REGISTRY = _$$registry(); -const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/_$ssr(_tmpl$, _$ssrHydrationKey()), { +const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/(() => { + var _v$ = _$ssrHydrationKey(); + return _$ssr(_tmpl$, _v$); +})(), { location: "example.jsx:3:17", signature: "4b145a58" }); @@ -794,15 +896,18 @@ if (import.meta.hot) { `; exports[`esm (server, hydratable) > VariableDeclarator > ArrowFunctionExpression > should transform VariableDeclarator w/ ArrowFunctionExpression with valid Component name and params 2`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; -import { ssrHydrationKey as _$ssrHydrationKey } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; +import { ssrHydrationKey as _$ssrHydrationKey } from "@solidjs/web"; var _tmpl$ = ["Foo

"]; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; const _REGISTRY = _$$registry(); -const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/_$ssr(_tmpl$, _$ssrHydrationKey()), { +const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/(() => { + var _v$ = _$ssrHydrationKey(); + return _$ssr(_tmpl$, _v$); +})(), { location: "example.jsx:3:17", signature: "4b145a58" }); @@ -818,17 +923,22 @@ if (import.meta.hot) { `; exports[`esm (server, hydratable) > VariableDeclarator > ArrowFunctionExpression > should transform VariableDeclarator w/ ArrowFunctionExpression with valid Component name and params 3`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; -import { escape as _$escape } from "solid-js/web"; -import { ssrHydrationKey as _$ssrHydrationKey } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; +import { ssrRunInScope as _$ssrRunInScope } from "@solidjs/web"; +import { escape as _$escape } from "@solidjs/web"; +import { ssrHydrationKey as _$ssrHydrationKey } from "@solidjs/web"; var _tmpl$ = ["", "

"]; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; const example = 'Foo'; const _REGISTRY = _$$registry(); -const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/_$ssr(_tmpl$, _$ssrHydrationKey(), _$escape(_props.v0)), { +const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/(() => { + var _v$ = _$ssrHydrationKey(), + _v$2 = _$ssrRunInScope(() => _$escape(_props.v0)); + return _$ssr(_tmpl$, _v$, _v$2); +})(), { location: "example.jsx:4:17", signature: "ae0f2a31" }); @@ -849,7 +959,7 @@ if (import.meta.hot) { `; exports[`esm (server, hydratable) > VariableDeclarator > ArrowFunctionExpression > should transform VariableDeclarator w/ ArrowFunctionExpression with valid Component name and params 4`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; @@ -880,16 +990,19 @@ if (import.meta.hot) { `; exports[`esm (server, hydratable) > VariableDeclarator > ArrowFunctionExpression > should transform VariableDeclarator w/ ArrowFunctionExpression with valid Component name and params 5`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; -import { ssrHydrationKey as _$ssrHydrationKey } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; +import { ssrHydrationKey as _$ssrHydrationKey } from "@solidjs/web"; var _tmpl$ = ["bar
"], _tmpl$2 = ["foo
"]; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; const _REGISTRY = _$$registry(); -const Bar_1 = _$$component(_REGISTRY, "Bar_1", _props => /*@refresh jsx-skip*/_$ssr(_tmpl$, _$ssrHydrationKey()), { +const Bar_1 = _$$component(_REGISTRY, "Bar_1", _props => /*@refresh jsx-skip*/(() => { + var _v$ = _$ssrHydrationKey(); + return _$ssr(_tmpl$, _v$); +})(), { location: "example.jsx:3:17", signature: "61dd3182" }); @@ -899,7 +1012,10 @@ const Bar = _$$component(_REGISTRY, "Bar", () => { location: "example.jsx:2:20", signature: "d1c6ca9b" }); -const Foo_1_1 = _$$component(_REGISTRY, "Foo_1_1", _props3 => /*@refresh jsx-skip*/_$ssr(_tmpl$2, _$ssrHydrationKey()), { +const Foo_1_1 = _$$component(_REGISTRY, "Foo_1_1", _props3 => /*@refresh jsx-skip*/(() => { + var _v$2 = _$ssrHydrationKey(); + return _$ssr(_tmpl$2, _v$2); +})(), { location: "example.jsx:8:14", signature: "241c14a4" }); @@ -923,13 +1039,16 @@ if (import.meta.hot) { `; exports[`esm (server, hydratable) > VariableDeclarator > FunctionExpression > should skip VariableDeclarator w/ FunctionExpression with @refresh reload 1`] = ` -"import { ssr as _$ssr } from "solid-js/web"; -import { ssrHydrationKey as _$ssrHydrationKey } from "solid-js/web"; +"import { ssr as _$ssr } from "@solidjs/web"; +import { ssrHydrationKey as _$ssrHydrationKey } from "@solidjs/web"; var _tmpl$ = ["Foo

"]; import { $$decline as _$$decline } from "solid-refresh"; // @refresh reload const Foo = function () { - return _$ssr(_tmpl$, _$ssrHydrationKey()); + return (() => { + var _v$ = _$ssrHydrationKey(); + return _$ssr(_tmpl$, _v$); + })(); }; if (import.meta.hot) { _$$decline("esm", import.meta.hot); @@ -937,25 +1056,31 @@ if (import.meta.hot) { `; exports[`esm (server, hydratable) > VariableDeclarator > FunctionExpression > should skip VariableDeclarator w/ FunctionExpression with @refresh skip 1`] = ` -"import { ssr as _$ssr } from "solid-js/web"; -import { ssrHydrationKey as _$ssrHydrationKey } from "solid-js/web"; +"import { ssr as _$ssr } from "@solidjs/web"; +import { ssrHydrationKey as _$ssrHydrationKey } from "@solidjs/web"; var _tmpl$ = ["Foo

"]; // @refresh skip const Foo = function () { - return _$ssr(_tmpl$, _$ssrHydrationKey()); + return (() => { + var _v$ = _$ssrHydrationKey(); + return _$ssr(_tmpl$, _v$); + })(); };" `; exports[`esm (server, hydratable) > VariableDeclarator > FunctionExpression > should skip VariableDeclarator w/ FunctionExpression with invalid Component name 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; -import { ssrHydrationKey as _$ssrHydrationKey } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; +import { ssrHydrationKey as _$ssrHydrationKey } from "@solidjs/web"; var _tmpl$ = ["Foo

"]; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; const _REGISTRY = _$$registry(); -const JSX_foo_1 = _$$component(_REGISTRY, "JSX_foo_1", _props => /*@refresh jsx-skip*/_$ssr(_tmpl$, _$ssrHydrationKey()), { +const JSX_foo_1 = _$$component(_REGISTRY, "JSX_foo_1", _props => /*@refresh jsx-skip*/(() => { + var _v$ = _$ssrHydrationKey(); + return _$ssr(_tmpl$, _v$); +})(), { location: "example.jsx:3:17", signature: "4b145a58" }); @@ -968,15 +1093,18 @@ if (import.meta.hot) { `; exports[`esm (server, hydratable) > VariableDeclarator > FunctionExpression > should skip VariableDeclarator w/ FunctionExpression with valid Component name and >1 params 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; -import { ssrHydrationKey as _$ssrHydrationKey } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; +import { ssrHydrationKey as _$ssrHydrationKey } from "@solidjs/web"; var _tmpl$ = ["Foo

"]; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; const _REGISTRY = _$$registry(); -const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/_$ssr(_tmpl$, _$ssrHydrationKey()), { +const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/(() => { + var _v$ = _$ssrHydrationKey(); + return _$ssr(_tmpl$, _v$); +})(), { location: "example.jsx:3:17", signature: "4b145a58" }); @@ -989,15 +1117,18 @@ if (import.meta.hot) { `; exports[`esm (server, hydratable) > VariableDeclarator > FunctionExpression > should transform VariableDeclarator w/ FunctionExpression with valid Component name and params 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; -import { ssrHydrationKey as _$ssrHydrationKey } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; +import { ssrHydrationKey as _$ssrHydrationKey } from "@solidjs/web"; var _tmpl$ = ["Foo

"]; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; const _REGISTRY = _$$registry(); -const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/_$ssr(_tmpl$, _$ssrHydrationKey()), { +const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/(() => { + var _v$ = _$ssrHydrationKey(); + return _$ssr(_tmpl$, _v$); +})(), { location: "example.jsx:3:17", signature: "4b145a58" }); @@ -1013,15 +1144,18 @@ if (import.meta.hot) { `; exports[`esm (server, hydratable) > VariableDeclarator > FunctionExpression > should transform VariableDeclarator w/ FunctionExpression with valid Component name and params 2`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; -import { ssrHydrationKey as _$ssrHydrationKey } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; +import { ssrHydrationKey as _$ssrHydrationKey } from "@solidjs/web"; var _tmpl$ = ["Foo

"]; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; const _REGISTRY = _$$registry(); -const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/_$ssr(_tmpl$, _$ssrHydrationKey()), { +const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/(() => { + var _v$ = _$ssrHydrationKey(); + return _$ssr(_tmpl$, _v$); +})(), { location: "example.jsx:3:17", signature: "4b145a58" }); @@ -1037,17 +1171,22 @@ if (import.meta.hot) { `; exports[`esm (server, hydratable) > VariableDeclarator > FunctionExpression > should transform VariableDeclarator w/ FunctionExpression with valid Component name and params 3`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; -import { escape as _$escape } from "solid-js/web"; -import { ssrHydrationKey as _$ssrHydrationKey } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; +import { ssrRunInScope as _$ssrRunInScope } from "@solidjs/web"; +import { escape as _$escape } from "@solidjs/web"; +import { ssrHydrationKey as _$ssrHydrationKey } from "@solidjs/web"; var _tmpl$ = ["", "

"]; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; const example = 'Foo'; const _REGISTRY = _$$registry(); -const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/_$ssr(_tmpl$, _$ssrHydrationKey(), _$escape(_props.v0)), { +const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/(() => { + var _v$ = _$ssrHydrationKey(), + _v$2 = _$ssrRunInScope(() => _$escape(_props.v0)); + return _$ssr(_tmpl$, _v$, _v$2); +})(), { location: "example.jsx:4:17", signature: "ae0f2a31" }); @@ -1068,7 +1207,7 @@ if (import.meta.hot) { `; exports[`esm (server, hydratable) > VariableDeclarator > FunctionExpression > should transform VariableDeclarator w/ FunctionExpression with valid Component name and params 4`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; @@ -1099,16 +1238,19 @@ if (import.meta.hot) { `; exports[`esm (server, hydratable) > VariableDeclarator > FunctionExpression > should transform VariableDeclarator w/ FunctionExpression with valid Component name and params 5`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; -import { ssrHydrationKey as _$ssrHydrationKey } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; +import { ssrHydrationKey as _$ssrHydrationKey } from "@solidjs/web"; var _tmpl$ = ["bar
"], _tmpl$2 = ["foo
"]; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; const _REGISTRY = _$$registry(); -const Bar_1 = _$$component(_REGISTRY, "Bar_1", _props => /*@refresh jsx-skip*/_$ssr(_tmpl$, _$ssrHydrationKey()), { +const Bar_1 = _$$component(_REGISTRY, "Bar_1", _props => /*@refresh jsx-skip*/(() => { + var _v$ = _$ssrHydrationKey(); + return _$ssr(_tmpl$, _v$); +})(), { location: "example.jsx:3:17", signature: "61dd3182" }); @@ -1118,7 +1260,10 @@ const Bar = _$$component(_REGISTRY, "Bar", function () { location: "example.jsx:2:20", signature: "1fb34faa" }); -const Foo_1_1 = _$$component(_REGISTRY, "Foo_1_1", _props3 => /*@refresh jsx-skip*/_$ssr(_tmpl$2, _$ssrHydrationKey()), { +const Foo_1_1 = _$$component(_REGISTRY, "Foo_1_1", _props3 => /*@refresh jsx-skip*/(() => { + var _v$2 = _$ssrHydrationKey(); + return _$ssr(_tmpl$2, _v$2); +})(), { location: "example.jsx:8:14", signature: "241c14a4" }); @@ -1142,15 +1287,19 @@ if (import.meta.hot) { `; exports[`esm (server, hydratable) > fix build > refs > should work with a function 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; -import { ssrHydrationKey as _$ssrHydrationKey } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; +import { ssrHydrationKey as _$ssrHydrationKey } from "@solidjs/web"; var _tmpl$ = ["Comp
"]; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; const _REGISTRY = _$$registry(); -const Comp_1 = _$$component(_REGISTRY, "Comp_1", _props => /*@refresh jsx-skip*/_$ssr(_tmpl$, _$ssrHydrationKey()), { +const Comp_1 = _$$component(_REGISTRY, "Comp_1", _props => /*@refresh jsx-skip*/(() => { + var _v$ = _$ssrHydrationKey(), + _ref$ = _props.v0; + return _$ssr(_tmpl$, _v$); +})(), { location: "example.jsx:4:19", signature: "6f76290" }); @@ -1169,15 +1318,19 @@ if (import.meta.hot) { `; exports[`esm (server, hydratable) > fix build > refs > should work with a mutable variable 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; -import { ssrHydrationKey as _$ssrHydrationKey } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; +import { ssrHydrationKey as _$ssrHydrationKey } from "@solidjs/web"; var _tmpl$ = ["Comp
"]; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; const _REGISTRY = _$$registry(); -const Comp_1 = _$$component(_REGISTRY, "Comp_1", _props => /*@refresh jsx-skip*/_$ssr(_tmpl$, _$ssrHydrationKey()), { +const Comp_1 = _$$component(_REGISTRY, "Comp_1", _props => /*@refresh jsx-skip*/(() => { + var _v$ = _$ssrHydrationKey(), + _ref$ = _props.v0; + return _$ssr(_tmpl$, _v$); +})(), { location: "example.jsx:4:19", signature: "6f76290" }); @@ -1202,16 +1355,20 @@ if (import.meta.hot) { `; exports[`esm (server, hydratable) > fix build > signals as refs > should work 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; -import { ssrHydrationKey as _$ssrHydrationKey } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; +import { ssrHydrationKey as _$ssrHydrationKey } from "@solidjs/web"; var _tmpl$ = ["Comp
"]; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; import { createSignal } from 'solid-js'; const _REGISTRY = _$$registry(); -const Comp_1 = _$$component(_REGISTRY, "Comp_1", _props => /*@refresh jsx-skip*/_$ssr(_tmpl$, _$ssrHydrationKey()), { +const Comp_1 = _$$component(_REGISTRY, "Comp_1", _props => /*@refresh jsx-skip*/(() => { + var _v$ = _$ssrHydrationKey(), + _ref$ = _props.v0; + return _$ssr(_tmpl$, _v$); +})(), { location: "example.jsx:6:19", signature: "6f76290" }); @@ -1237,7 +1394,7 @@ if (import.meta.hot) { `; exports[`esm (server, hydratable) > fix render > @refresh reload > should work 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; import { $$decline as _$$decline } from "solid-refresh"; // @refresh reload import { render } from 'solid-js/web'; @@ -1251,7 +1408,7 @@ if (import.meta.hot) { `; exports[`esm (server, hydratable) > fix render > import specifiers > should work with ImportNamespaceSpecifier 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; @@ -1271,7 +1428,7 @@ if (import.meta.hot) { `; exports[`esm (server, hydratable) > fix render > import specifiers > should work with ImportSpecifier + Identifier 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; @@ -1291,7 +1448,7 @@ if (import.meta.hot) { `; exports[`esm (server, hydratable) > fix render > import specifiers > should work with ImportSpecifier + aliased Identifier 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; @@ -1311,7 +1468,7 @@ if (import.meta.hot) { `; exports[`esm (server, hydratable) > fix render > import specifiers > should work with ImportSpecifier + aliased Identifier from StringLiteral 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; @@ -1331,7 +1488,7 @@ if (import.meta.hot) { `; exports[`esm (server, hydratable) > fix render > top-level statements > should work with IfStatement 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; diff --git a/tests/server-hydratable/__snapshots__/rspack-esm.test.ts.snap b/tests/server-hydratable/__snapshots__/rspack-esm.test.ts.snap index f86b8b8..167b908 100644 --- a/tests/server-hydratable/__snapshots__/rspack-esm.test.ts.snap +++ b/tests/server-hydratable/__snapshots__/rspack-esm.test.ts.snap @@ -32,13 +32,16 @@ if (import.meta.hot) { `; exports[`esm (server, hydratable) > ExportDefaultDeclaration w/ FunctionExpression > should skip ExportDefaultDeclaration w/ FunctionExpression with @refresh reload 1`] = ` -"import { ssr as _$ssr } from "solid-js/web"; -import { ssrHydrationKey as _$ssrHydrationKey } from "solid-js/web"; +"import { ssr as _$ssr } from "@solidjs/web"; +import { ssrHydrationKey as _$ssrHydrationKey } from "@solidjs/web"; var _tmpl$ = ["Foo

"]; import { $$decline as _$$decline } from "solid-refresh"; // @refresh reload export default function Foo() { - return _$ssr(_tmpl$, _$ssrHydrationKey()); + return (() => { + var _v$ = _$ssrHydrationKey(); + return _$ssr(_tmpl$, _v$); + })(); } if (import.meta.hot) { _$$decline("esm", import.meta.hot); @@ -46,25 +49,31 @@ if (import.meta.hot) { `; exports[`esm (server, hydratable) > ExportDefaultDeclaration w/ FunctionExpression > should skip ExportDefaultDeclaration w/ FunctionExpression with @refresh skip 1`] = ` -"import { ssr as _$ssr } from "solid-js/web"; -import { ssrHydrationKey as _$ssrHydrationKey } from "solid-js/web"; +"import { ssr as _$ssr } from "@solidjs/web"; +import { ssrHydrationKey as _$ssrHydrationKey } from "@solidjs/web"; var _tmpl$ = ["Foo

"]; // @refresh skip export default function Foo() { - return _$ssr(_tmpl$, _$ssrHydrationKey()); + return (() => { + var _v$ = _$ssrHydrationKey(); + return _$ssr(_tmpl$, _v$); + })(); }" `; exports[`esm (server, hydratable) > ExportDefaultDeclaration w/ FunctionExpression > should skip ExportDefaultDeclaration w/ FunctionExpression with invalid Component name 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; -import { ssrHydrationKey as _$ssrHydrationKey } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; +import { ssrHydrationKey as _$ssrHydrationKey } from "@solidjs/web"; var _tmpl$ = ["Foo

"]; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; const _REGISTRY = _$$registry(); -const JSX_foo_1 = _$$component(_REGISTRY, "JSX_foo_1", _props => /*@refresh jsx-skip*/_$ssr(_tmpl$, _$ssrHydrationKey()), { +const JSX_foo_1 = _$$component(_REGISTRY, "JSX_foo_1", _props => /*@refresh jsx-skip*/(() => { + var _v$ = _$ssrHydrationKey(); + return _$ssr(_tmpl$, _v$); +})(), { location: "example.jsx:3:15", signature: "4b145a58" }); @@ -77,15 +86,18 @@ if (import.meta.hot) { `; exports[`esm (server, hydratable) > ExportDefaultDeclaration w/ FunctionExpression > should skip ExportDefaultDeclaration w/ FunctionExpression with valid Component name and >1 params 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; -import { ssrHydrationKey as _$ssrHydrationKey } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; +import { ssrHydrationKey as _$ssrHydrationKey } from "@solidjs/web"; var _tmpl$ = ["Foo

"]; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; const _REGISTRY = _$$registry(); -const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/_$ssr(_tmpl$, _$ssrHydrationKey()), { +const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/(() => { + var _v$ = _$ssrHydrationKey(); + return _$ssr(_tmpl$, _v$); +})(), { location: "example.jsx:3:15", signature: "4b145a58" }); @@ -98,15 +110,18 @@ if (import.meta.hot) { `; exports[`esm (server, hydratable) > ExportDefaultDeclaration w/ FunctionExpression > should transform ExportDefaultDeclaration w/ FunctionExpression with valid Component name and params 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; -import { ssrHydrationKey as _$ssrHydrationKey } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; +import { ssrHydrationKey as _$ssrHydrationKey } from "@solidjs/web"; var _tmpl$ = ["Foo

"]; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; const _REGISTRY = _$$registry(); -const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/_$ssr(_tmpl$, _$ssrHydrationKey()), { +const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/(() => { + var _v$ = _$ssrHydrationKey(); + return _$ssr(_tmpl$, _v$); +})(), { location: "example.jsx:3:15", signature: "4b145a58" }); @@ -123,15 +138,18 @@ if (import.meta.hot) { `; exports[`esm (server, hydratable) > ExportDefaultDeclaration w/ FunctionExpression > should transform ExportDefaultDeclaration w/ FunctionExpression with valid Component name and params 2`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; -import { ssrHydrationKey as _$ssrHydrationKey } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; +import { ssrHydrationKey as _$ssrHydrationKey } from "@solidjs/web"; var _tmpl$ = ["Foo

"]; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; const _REGISTRY = _$$registry(); -const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/_$ssr(_tmpl$, _$ssrHydrationKey()), { +const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/(() => { + var _v$ = _$ssrHydrationKey(); + return _$ssr(_tmpl$, _v$); +})(), { location: "example.jsx:3:15", signature: "4b145a58" }); @@ -148,16 +166,21 @@ if (import.meta.hot) { `; exports[`esm (server, hydratable) > ExportDefaultDeclaration w/ FunctionExpression > should transform ExportDefaultDeclaration w/ FunctionExpression with valid Component name and params 3`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; -import { escape as _$escape } from "solid-js/web"; -import { ssrHydrationKey as _$ssrHydrationKey } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; +import { ssrRunInScope as _$ssrRunInScope } from "@solidjs/web"; +import { escape as _$escape } from "@solidjs/web"; +import { ssrHydrationKey as _$ssrHydrationKey } from "@solidjs/web"; var _tmpl$ = ["", "

"]; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; const _REGISTRY = _$$registry(); -const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/_$ssr(_tmpl$, _$ssrHydrationKey(), _$escape(_props.v0)), { +const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/(() => { + var _v$ = _$ssrHydrationKey(), + _v$2 = _$ssrRunInScope(() => _$escape(_props.v0)); + return _$ssr(_tmpl$, _v$, _v$2); +})(), { location: "example.jsx:4:15", signature: "ae0f2a31" }); @@ -180,7 +203,7 @@ if (import.meta.hot) { `; exports[`esm (server, hydratable) > ExportDefaultDeclaration w/ FunctionExpression > should transform ExportDefaultDeclaration w/ FunctionExpression with valid Component name and params 4`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; @@ -212,16 +235,19 @@ if (import.meta.hot) { `; exports[`esm (server, hydratable) > ExportDefaultDeclaration w/ FunctionExpression > should transform ExportDefaultDeclaration w/ FunctionExpression with valid Component name and params 5`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; -import { ssrHydrationKey as _$ssrHydrationKey } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; +import { ssrHydrationKey as _$ssrHydrationKey } from "@solidjs/web"; var _tmpl$ = ["foo
"], _tmpl$2 = ["bar
"]; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; const _REGISTRY = _$$registry(); -const Foo_1_1 = _$$component(_REGISTRY, "Foo_1_1", _props3 => /*@refresh jsx-skip*/_$ssr(_tmpl$, _$ssrHydrationKey()), { +const Foo_1_1 = _$$component(_REGISTRY, "Foo_1_1", _props3 => /*@refresh jsx-skip*/(() => { + var _v$ = _$ssrHydrationKey(); + return _$ssr(_tmpl$, _v$); +})(), { location: "example.jsx:8:12", signature: "241c14a4" }); @@ -239,7 +265,10 @@ const Foo = _$$component(_REGISTRY, "Foo", function Foo() { location: "example.jsx:5:21", signature: "c963b907" }); -const Bar_1 = _$$component(_REGISTRY, "Bar_1", _props2 => /*@refresh jsx-skip*/_$ssr(_tmpl$2, _$ssrHydrationKey()), { +const Bar_1 = _$$component(_REGISTRY, "Bar_1", _props2 => /*@refresh jsx-skip*/(() => { + var _v$2 = _$ssrHydrationKey(); + return _$ssr(_tmpl$2, _v$2); +})(), { location: "example.jsx:3:15", signature: "fad4daa8" }); @@ -256,13 +285,16 @@ if (import.meta.hot) { `; exports[`esm (server, hydratable) > ExportNamedDeclaration w/ FunctionExpression > should skip ExportNamedDeclaration w/ FunctionExpression with @refresh reload 1`] = ` -"import { ssr as _$ssr } from "solid-js/web"; -import { ssrHydrationKey as _$ssrHydrationKey } from "solid-js/web"; +"import { ssr as _$ssr } from "@solidjs/web"; +import { ssrHydrationKey as _$ssrHydrationKey } from "@solidjs/web"; var _tmpl$ = ["Foo

"]; import { $$decline as _$$decline } from "solid-refresh"; // @refresh reload export function Foo() { - return _$ssr(_tmpl$, _$ssrHydrationKey()); + return (() => { + var _v$ = _$ssrHydrationKey(); + return _$ssr(_tmpl$, _v$); + })(); } if (import.meta.hot) { _$$decline("esm", import.meta.hot); @@ -270,25 +302,31 @@ if (import.meta.hot) { `; exports[`esm (server, hydratable) > ExportNamedDeclaration w/ FunctionExpression > should skip ExportNamedDeclaration w/ FunctionExpression with @refresh skip 1`] = ` -"import { ssr as _$ssr } from "solid-js/web"; -import { ssrHydrationKey as _$ssrHydrationKey } from "solid-js/web"; +"import { ssr as _$ssr } from "@solidjs/web"; +import { ssrHydrationKey as _$ssrHydrationKey } from "@solidjs/web"; var _tmpl$ = ["Foo

"]; // @refresh skip export function Foo() { - return _$ssr(_tmpl$, _$ssrHydrationKey()); + return (() => { + var _v$ = _$ssrHydrationKey(); + return _$ssr(_tmpl$, _v$); + })(); }" `; exports[`esm (server, hydratable) > ExportNamedDeclaration w/ FunctionExpression > should skip ExportNamedDeclaration w/ FunctionExpression with invalid Component name 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; -import { ssrHydrationKey as _$ssrHydrationKey } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; +import { ssrHydrationKey as _$ssrHydrationKey } from "@solidjs/web"; var _tmpl$ = ["Foo

"]; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; const _REGISTRY = _$$registry(); -const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/_$ssr(_tmpl$, _$ssrHydrationKey()), { +const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/(() => { + var _v$ = _$ssrHydrationKey(); + return _$ssr(_tmpl$, _v$); +})(), { location: "example.jsx:3:15", signature: "4b145a58" }); @@ -305,15 +343,18 @@ if (import.meta.hot) { `; exports[`esm (server, hydratable) > ExportNamedDeclaration w/ FunctionExpression > should skip ExportNamedDeclaration w/ FunctionExpression with valid Component name and >1 params 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; -import { ssrHydrationKey as _$ssrHydrationKey } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; +import { ssrHydrationKey as _$ssrHydrationKey } from "@solidjs/web"; var _tmpl$ = ["Foo

"]; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; const _REGISTRY = _$$registry(); -const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/_$ssr(_tmpl$, _$ssrHydrationKey()), { +const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/(() => { + var _v$ = _$ssrHydrationKey(); + return _$ssr(_tmpl$, _v$); +})(), { location: "example.jsx:3:15", signature: "4b145a58" }); @@ -326,15 +367,18 @@ if (import.meta.hot) { `; exports[`esm (server, hydratable) > ExportNamedDeclaration w/ FunctionExpression > should transform ExportNamedDeclaration w/ FunctionExpression with valid Component name and params 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; -import { ssrHydrationKey as _$ssrHydrationKey } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; +import { ssrHydrationKey as _$ssrHydrationKey } from "@solidjs/web"; var _tmpl$ = ["Foo

"]; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; const _REGISTRY = _$$registry(); -const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/_$ssr(_tmpl$, _$ssrHydrationKey()), { +const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/(() => { + var _v$ = _$ssrHydrationKey(); + return _$ssr(_tmpl$, _v$); +})(), { location: "example.jsx:3:15", signature: "4b145a58" }); @@ -351,15 +395,18 @@ if (import.meta.hot) { `; exports[`esm (server, hydratable) > ExportNamedDeclaration w/ FunctionExpression > should transform ExportNamedDeclaration w/ FunctionExpression with valid Component name and params 2`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; -import { ssrHydrationKey as _$ssrHydrationKey } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; +import { ssrHydrationKey as _$ssrHydrationKey } from "@solidjs/web"; var _tmpl$ = ["Foo

"]; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; const _REGISTRY = _$$registry(); -const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/_$ssr(_tmpl$, _$ssrHydrationKey()), { +const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/(() => { + var _v$ = _$ssrHydrationKey(); + return _$ssr(_tmpl$, _v$); +})(), { location: "example.jsx:3:15", signature: "4b145a58" }); @@ -376,16 +423,21 @@ if (import.meta.hot) { `; exports[`esm (server, hydratable) > ExportNamedDeclaration w/ FunctionExpression > should transform ExportNamedDeclaration w/ FunctionExpression with valid Component name and params 3`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; -import { escape as _$escape } from "solid-js/web"; -import { ssrHydrationKey as _$ssrHydrationKey } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; +import { ssrRunInScope as _$ssrRunInScope } from "@solidjs/web"; +import { escape as _$escape } from "@solidjs/web"; +import { ssrHydrationKey as _$ssrHydrationKey } from "@solidjs/web"; var _tmpl$ = ["", "

"]; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; const _REGISTRY = _$$registry(); -const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/_$ssr(_tmpl$, _$ssrHydrationKey(), _$escape(_props.v0)), { +const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/(() => { + var _v$ = _$ssrHydrationKey(), + _v$2 = _$ssrRunInScope(() => _$escape(_props.v0)); + return _$ssr(_tmpl$, _v$, _v$2); +})(), { location: "example.jsx:4:15", signature: "ae0f2a31" }); @@ -408,7 +460,7 @@ if (import.meta.hot) { `; exports[`esm (server, hydratable) > ExportNamedDeclaration w/ FunctionExpression > should transform ExportNamedDeclaration w/ FunctionExpression with valid Component name and params 4`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; @@ -440,16 +492,19 @@ if (import.meta.hot) { `; exports[`esm (server, hydratable) > ExportNamedDeclaration w/ FunctionExpression > should transform ExportNamedDeclaration w/ FunctionExpression with valid Component name and params 5`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; -import { ssrHydrationKey as _$ssrHydrationKey } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; +import { ssrHydrationKey as _$ssrHydrationKey } from "@solidjs/web"; var _tmpl$ = ["bar
"], _tmpl$2 = ["foo
"]; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; const _REGISTRY = _$$registry(); -const Bar_1 = _$$component(_REGISTRY, "Bar_1", _props => /*@refresh jsx-skip*/_$ssr(_tmpl$, _$ssrHydrationKey()), { +const Bar_1 = _$$component(_REGISTRY, "Bar_1", _props => /*@refresh jsx-skip*/(() => { + var _v$ = _$ssrHydrationKey(); + return _$ssr(_tmpl$, _v$); +})(), { location: "example.jsx:3:15", signature: "61dd3182" }); @@ -459,7 +514,10 @@ const Bar = _$$component(_REGISTRY, "Bar", function Bar() { location: "example.jsx:2:13", signature: "e93ca257" }); -const Foo_1_1 = _$$component(_REGISTRY, "Foo_1_1", _props3 => /*@refresh jsx-skip*/_$ssr(_tmpl$2, _$ssrHydrationKey()), { +const Foo_1_1 = _$$component(_REGISTRY, "Foo_1_1", _props3 => /*@refresh jsx-skip*/(() => { + var _v$2 = _$ssrHydrationKey(); + return _$ssr(_tmpl$2, _v$2); +})(), { location: "example.jsx:8:12", signature: "241c14a4" }); @@ -485,13 +543,16 @@ if (import.meta.hot) { `; exports[`esm (server, hydratable) > FunctionDeclaration > should skip FunctionDeclaration with @refresh reload 1`] = ` -"import { ssr as _$ssr } from "solid-js/web"; -import { ssrHydrationKey as _$ssrHydrationKey } from "solid-js/web"; +"import { ssr as _$ssr } from "@solidjs/web"; +import { ssrHydrationKey as _$ssrHydrationKey } from "@solidjs/web"; var _tmpl$ = ["Foo

"]; import { $$decline as _$$decline } from "solid-refresh"; // @refresh reload function Foo() { - return _$ssr(_tmpl$, _$ssrHydrationKey()); + return (() => { + var _v$ = _$ssrHydrationKey(); + return _$ssr(_tmpl$, _v$); + })(); } if (import.meta.hot) { _$$decline("esm", import.meta.hot); @@ -499,25 +560,31 @@ if (import.meta.hot) { `; exports[`esm (server, hydratable) > FunctionDeclaration > should skip FunctionDeclaration with @refresh skip 1`] = ` -"import { ssr as _$ssr } from "solid-js/web"; -import { ssrHydrationKey as _$ssrHydrationKey } from "solid-js/web"; +"import { ssr as _$ssr } from "@solidjs/web"; +import { ssrHydrationKey as _$ssrHydrationKey } from "@solidjs/web"; var _tmpl$ = ["Foo"]; // @refresh skip function Foo() { - return _$ssr(_tmpl$, _$ssrHydrationKey()); + return (() => { + var _v$ = _$ssrHydrationKey(); + return _$ssr(_tmpl$, _v$); + })(); }" `; exports[`esm (server, hydratable) > FunctionDeclaration > should skip FunctionDeclaration with invalid Component name 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; -import { ssrHydrationKey as _$ssrHydrationKey } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; +import { ssrHydrationKey as _$ssrHydrationKey } from "@solidjs/web"; var _tmpl$ = ["Foo"]; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; const _REGISTRY = _$$registry(); -const JSX_foo_1 = _$$component(_REGISTRY, "JSX_foo_1", _props => /*@refresh jsx-skip*/_$ssr(_tmpl$, _$ssrHydrationKey()), { +const JSX_foo_1 = _$$component(_REGISTRY, "JSX_foo_1", _props => /*@refresh jsx-skip*/(() => { + var _v$ = _$ssrHydrationKey(); + return _$ssr(_tmpl$, _v$); +})(), { location: "example.jsx:3:15", signature: "4b145a58" }); @@ -530,15 +597,18 @@ if (import.meta.hot) { `; exports[`esm (server, hydratable) > FunctionDeclaration > should skip FunctionDeclaration with valid Component name and >1 params 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; -import { ssrHydrationKey as _$ssrHydrationKey } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; +import { ssrHydrationKey as _$ssrHydrationKey } from "@solidjs/web"; var _tmpl$ = ["Foo"]; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; const _REGISTRY = _$$registry(); -const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/_$ssr(_tmpl$, _$ssrHydrationKey()), { +const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/(() => { + var _v$ = _$ssrHydrationKey(); + return _$ssr(_tmpl$, _v$); +})(), { location: "example.jsx:3:15", signature: "4b145a58" }); @@ -551,15 +621,18 @@ if (import.meta.hot) { `; exports[`esm (server, hydratable) > FunctionDeclaration > should transform FunctionDeclaration with valid Component name and params 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; -import { ssrHydrationKey as _$ssrHydrationKey } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; +import { ssrHydrationKey as _$ssrHydrationKey } from "@solidjs/web"; var _tmpl$ = ["Foo"]; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; const _REGISTRY = _$$registry(); -const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/_$ssr(_tmpl$, _$ssrHydrationKey()), { +const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/(() => { + var _v$ = _$ssrHydrationKey(); + return _$ssr(_tmpl$, _v$); +})(), { location: "example.jsx:3:15", signature: "4b145a58" }); @@ -575,15 +648,18 @@ if (import.meta.hot) { `; exports[`esm (server, hydratable) > FunctionDeclaration > should transform FunctionDeclaration with valid Component name and params 2`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; -import { ssrHydrationKey as _$ssrHydrationKey } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; +import { ssrHydrationKey as _$ssrHydrationKey } from "@solidjs/web"; var _tmpl$ = ["Foo"]; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; const _REGISTRY = _$$registry(); -const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/_$ssr(_tmpl$, _$ssrHydrationKey()), { +const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/(() => { + var _v$ = _$ssrHydrationKey(); + return _$ssr(_tmpl$, _v$); +})(), { location: "example.jsx:3:15", signature: "4b145a58" }); @@ -599,16 +675,21 @@ if (import.meta.hot) { `; exports[`esm (server, hydratable) > FunctionDeclaration > should transform FunctionDeclaration with valid Component name and params 3`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; -import { escape as _$escape } from "solid-js/web"; -import { ssrHydrationKey as _$ssrHydrationKey } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; +import { ssrRunInScope as _$ssrRunInScope } from "@solidjs/web"; +import { escape as _$escape } from "@solidjs/web"; +import { ssrHydrationKey as _$ssrHydrationKey } from "@solidjs/web"; var _tmpl$ = ["", ""]; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; const _REGISTRY = _$$registry(); -const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/_$ssr(_tmpl$, _$ssrHydrationKey(), _$escape(_props.v0)), { +const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/(() => { + var _v$ = _$ssrHydrationKey(), + _v$2 = _$ssrRunInScope(() => _$escape(_props.v0)); + return _$ssr(_tmpl$, _v$, _v$2); +})(), { location: "example.jsx:4:15", signature: "ae0f2a31" }); @@ -630,7 +711,7 @@ if (import.meta.hot) { `; exports[`esm (server, hydratable) > FunctionDeclaration > should transform FunctionDeclaration with valid Component name and params 4`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; @@ -661,16 +742,19 @@ if (import.meta.hot) { `; exports[`esm (server, hydratable) > FunctionDeclaration > should transform FunctionDeclaration with valid Component name and params 5`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; -import { ssrHydrationKey as _$ssrHydrationKey } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; +import { ssrHydrationKey as _$ssrHydrationKey } from "@solidjs/web"; var _tmpl$ = ["foo"], _tmpl$2 = ["bar"]; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; const _REGISTRY = _$$registry(); -const Foo_1_1 = _$$component(_REGISTRY, "Foo_1_1", _props3 => /*@refresh jsx-skip*/_$ssr(_tmpl$, _$ssrHydrationKey()), { +const Foo_1_1 = _$$component(_REGISTRY, "Foo_1_1", _props3 => /*@refresh jsx-skip*/(() => { + var _v$ = _$ssrHydrationKey(); + return _$ssr(_tmpl$, _v$); +})(), { location: "example.jsx:8:12", signature: "241c14a4" }); @@ -688,7 +772,10 @@ const Foo = _$$component(_REGISTRY, "Foo", function Foo() { location: "example.jsx:5:6", signature: "c963b907" }); -const Bar_1 = _$$component(_REGISTRY, "Bar_1", _props2 => /*@refresh jsx-skip*/_$ssr(_tmpl$2, _$ssrHydrationKey()), { +const Bar_1 = _$$component(_REGISTRY, "Bar_1", _props2 => /*@refresh jsx-skip*/(() => { + var _v$2 = _$ssrHydrationKey(); + return _$ssr(_tmpl$2, _v$2); +})(), { location: "example.jsx:3:15", signature: "fad4daa8" }); @@ -704,13 +791,16 @@ if (import.meta.hot) { `; exports[`esm (server, hydratable) > VariableDeclarator > ArrowFunctionExpression > should skip VariableDeclarator w/ ArrowFunctionExpression with @refresh reload 1`] = ` -"import { ssr as _$ssr } from "solid-js/web"; -import { ssrHydrationKey as _$ssrHydrationKey } from "solid-js/web"; +"import { ssr as _$ssr } from "@solidjs/web"; +import { ssrHydrationKey as _$ssrHydrationKey } from "@solidjs/web"; var _tmpl$ = ["Foo"]; import { $$decline as _$$decline } from "solid-refresh"; // @refresh reload const Foo = () => { - return _$ssr(_tmpl$, _$ssrHydrationKey()); + return (() => { + var _v$ = _$ssrHydrationKey(); + return _$ssr(_tmpl$, _v$); + })(); }; if (import.meta.hot) { _$$decline("esm", import.meta.hot); @@ -718,25 +808,31 @@ if (import.meta.hot) { `; exports[`esm (server, hydratable) > VariableDeclarator > ArrowFunctionExpression > should skip VariableDeclarator w/ ArrowFunctionExpression with @refresh skip 1`] = ` -"import { ssr as _$ssr } from "solid-js/web"; -import { ssrHydrationKey as _$ssrHydrationKey } from "solid-js/web"; +"import { ssr as _$ssr } from "@solidjs/web"; +import { ssrHydrationKey as _$ssrHydrationKey } from "@solidjs/web"; var _tmpl$ = ["Foo"]; // @refresh skip const Foo = () => { - return _$ssr(_tmpl$, _$ssrHydrationKey()); + return (() => { + var _v$ = _$ssrHydrationKey(); + return _$ssr(_tmpl$, _v$); + })(); };" `; exports[`esm (server, hydratable) > VariableDeclarator > ArrowFunctionExpression > should skip VariableDeclarator w/ ArrowFunctionExpression with invalid Component name 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; -import { ssrHydrationKey as _$ssrHydrationKey } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; +import { ssrHydrationKey as _$ssrHydrationKey } from "@solidjs/web"; var _tmpl$ = ["Foo"]; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; const _REGISTRY = _$$registry(); -const JSX_foo_1 = _$$component(_REGISTRY, "JSX_foo_1", _props => /*@refresh jsx-skip*/_$ssr(_tmpl$, _$ssrHydrationKey()), { +const JSX_foo_1 = _$$component(_REGISTRY, "JSX_foo_1", _props => /*@refresh jsx-skip*/(() => { + var _v$ = _$ssrHydrationKey(); + return _$ssr(_tmpl$, _v$); +})(), { location: "example.jsx:3:17", signature: "4b145a58" }); @@ -749,15 +845,18 @@ if (import.meta.hot) { `; exports[`esm (server, hydratable) > VariableDeclarator > ArrowFunctionExpression > should skip VariableDeclarator w/ ArrowFunctionExpression with valid Component name and >1 params 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; -import { ssrHydrationKey as _$ssrHydrationKey } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; +import { ssrHydrationKey as _$ssrHydrationKey } from "@solidjs/web"; var _tmpl$ = ["Foo"]; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; const _REGISTRY = _$$registry(); -const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/_$ssr(_tmpl$, _$ssrHydrationKey()), { +const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/(() => { + var _v$ = _$ssrHydrationKey(); + return _$ssr(_tmpl$, _v$); +})(), { location: "example.jsx:3:17", signature: "4b145a58" }); @@ -770,15 +869,18 @@ if (import.meta.hot) { `; exports[`esm (server, hydratable) > VariableDeclarator > ArrowFunctionExpression > should transform VariableDeclarator w/ ArrowFunctionExpression with valid Component name and params 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; -import { ssrHydrationKey as _$ssrHydrationKey } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; +import { ssrHydrationKey as _$ssrHydrationKey } from "@solidjs/web"; var _tmpl$ = ["Foo"]; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; const _REGISTRY = _$$registry(); -const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/_$ssr(_tmpl$, _$ssrHydrationKey()), { +const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/(() => { + var _v$ = _$ssrHydrationKey(); + return _$ssr(_tmpl$, _v$); +})(), { location: "example.jsx:3:17", signature: "4b145a58" }); @@ -794,15 +896,18 @@ if (import.meta.hot) { `; exports[`esm (server, hydratable) > VariableDeclarator > ArrowFunctionExpression > should transform VariableDeclarator w/ ArrowFunctionExpression with valid Component name and params 2`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; -import { ssrHydrationKey as _$ssrHydrationKey } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; +import { ssrHydrationKey as _$ssrHydrationKey } from "@solidjs/web"; var _tmpl$ = ["Foo"]; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; const _REGISTRY = _$$registry(); -const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/_$ssr(_tmpl$, _$ssrHydrationKey()), { +const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/(() => { + var _v$ = _$ssrHydrationKey(); + return _$ssr(_tmpl$, _v$); +})(), { location: "example.jsx:3:17", signature: "4b145a58" }); @@ -818,17 +923,22 @@ if (import.meta.hot) { `; exports[`esm (server, hydratable) > VariableDeclarator > ArrowFunctionExpression > should transform VariableDeclarator w/ ArrowFunctionExpression with valid Component name and params 3`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; -import { escape as _$escape } from "solid-js/web"; -import { ssrHydrationKey as _$ssrHydrationKey } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; +import { ssrRunInScope as _$ssrRunInScope } from "@solidjs/web"; +import { escape as _$escape } from "@solidjs/web"; +import { ssrHydrationKey as _$ssrHydrationKey } from "@solidjs/web"; var _tmpl$ = ["", ""]; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; const example = 'Foo'; const _REGISTRY = _$$registry(); -const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/_$ssr(_tmpl$, _$ssrHydrationKey(), _$escape(_props.v0)), { +const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/(() => { + var _v$ = _$ssrHydrationKey(), + _v$2 = _$ssrRunInScope(() => _$escape(_props.v0)); + return _$ssr(_tmpl$, _v$, _v$2); +})(), { location: "example.jsx:4:17", signature: "ae0f2a31" }); @@ -849,7 +959,7 @@ if (import.meta.hot) { `; exports[`esm (server, hydratable) > VariableDeclarator > ArrowFunctionExpression > should transform VariableDeclarator w/ ArrowFunctionExpression with valid Component name and params 4`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; @@ -880,16 +990,19 @@ if (import.meta.hot) { `; exports[`esm (server, hydratable) > VariableDeclarator > ArrowFunctionExpression > should transform VariableDeclarator w/ ArrowFunctionExpression with valid Component name and params 5`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; -import { ssrHydrationKey as _$ssrHydrationKey } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; +import { ssrHydrationKey as _$ssrHydrationKey } from "@solidjs/web"; var _tmpl$ = ["bar"], _tmpl$2 = ["foo"]; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; const _REGISTRY = _$$registry(); -const Bar_1 = _$$component(_REGISTRY, "Bar_1", _props => /*@refresh jsx-skip*/_$ssr(_tmpl$, _$ssrHydrationKey()), { +const Bar_1 = _$$component(_REGISTRY, "Bar_1", _props => /*@refresh jsx-skip*/(() => { + var _v$ = _$ssrHydrationKey(); + return _$ssr(_tmpl$, _v$); +})(), { location: "example.jsx:3:17", signature: "61dd3182" }); @@ -899,7 +1012,10 @@ const Bar = _$$component(_REGISTRY, "Bar", () => { location: "example.jsx:2:20", signature: "d1c6ca9b" }); -const Foo_1_1 = _$$component(_REGISTRY, "Foo_1_1", _props3 => /*@refresh jsx-skip*/_$ssr(_tmpl$2, _$ssrHydrationKey()), { +const Foo_1_1 = _$$component(_REGISTRY, "Foo_1_1", _props3 => /*@refresh jsx-skip*/(() => { + var _v$2 = _$ssrHydrationKey(); + return _$ssr(_tmpl$2, _v$2); +})(), { location: "example.jsx:8:14", signature: "241c14a4" }); @@ -923,13 +1039,16 @@ if (import.meta.hot) { `; exports[`esm (server, hydratable) > VariableDeclarator > FunctionExpression > should skip VariableDeclarator w/ FunctionExpression with @refresh reload 1`] = ` -"import { ssr as _$ssr } from "solid-js/web"; -import { ssrHydrationKey as _$ssrHydrationKey } from "solid-js/web"; +"import { ssr as _$ssr } from "@solidjs/web"; +import { ssrHydrationKey as _$ssrHydrationKey } from "@solidjs/web"; var _tmpl$ = ["Foo"]; import { $$decline as _$$decline } from "solid-refresh"; // @refresh reload const Foo = function () { - return _$ssr(_tmpl$, _$ssrHydrationKey()); + return (() => { + var _v$ = _$ssrHydrationKey(); + return _$ssr(_tmpl$, _v$); + })(); }; if (import.meta.hot) { _$$decline("esm", import.meta.hot); @@ -937,25 +1056,31 @@ if (import.meta.hot) { `; exports[`esm (server, hydratable) > VariableDeclarator > FunctionExpression > should skip VariableDeclarator w/ FunctionExpression with @refresh skip 1`] = ` -"import { ssr as _$ssr } from "solid-js/web"; -import { ssrHydrationKey as _$ssrHydrationKey } from "solid-js/web"; +"import { ssr as _$ssr } from "@solidjs/web"; +import { ssrHydrationKey as _$ssrHydrationKey } from "@solidjs/web"; var _tmpl$ = ["Foo"]; // @refresh skip const Foo = function () { - return _$ssr(_tmpl$, _$ssrHydrationKey()); + return (() => { + var _v$ = _$ssrHydrationKey(); + return _$ssr(_tmpl$, _v$); + })(); };" `; exports[`esm (server, hydratable) > VariableDeclarator > FunctionExpression > should skip VariableDeclarator w/ FunctionExpression with invalid Component name 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; -import { ssrHydrationKey as _$ssrHydrationKey } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; +import { ssrHydrationKey as _$ssrHydrationKey } from "@solidjs/web"; var _tmpl$ = ["Foo"]; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; const _REGISTRY = _$$registry(); -const JSX_foo_1 = _$$component(_REGISTRY, "JSX_foo_1", _props => /*@refresh jsx-skip*/_$ssr(_tmpl$, _$ssrHydrationKey()), { +const JSX_foo_1 = _$$component(_REGISTRY, "JSX_foo_1", _props => /*@refresh jsx-skip*/(() => { + var _v$ = _$ssrHydrationKey(); + return _$ssr(_tmpl$, _v$); +})(), { location: "example.jsx:3:17", signature: "4b145a58" }); @@ -968,15 +1093,18 @@ if (import.meta.hot) { `; exports[`esm (server, hydratable) > VariableDeclarator > FunctionExpression > should skip VariableDeclarator w/ FunctionExpression with valid Component name and >1 params 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; -import { ssrHydrationKey as _$ssrHydrationKey } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; +import { ssrHydrationKey as _$ssrHydrationKey } from "@solidjs/web"; var _tmpl$ = ["Foo"]; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; const _REGISTRY = _$$registry(); -const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/_$ssr(_tmpl$, _$ssrHydrationKey()), { +const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/(() => { + var _v$ = _$ssrHydrationKey(); + return _$ssr(_tmpl$, _v$); +})(), { location: "example.jsx:3:17", signature: "4b145a58" }); @@ -989,15 +1117,18 @@ if (import.meta.hot) { `; exports[`esm (server, hydratable) > VariableDeclarator > FunctionExpression > should transform VariableDeclarator w/ FunctionExpression with valid Component name and params 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; -import { ssrHydrationKey as _$ssrHydrationKey } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; +import { ssrHydrationKey as _$ssrHydrationKey } from "@solidjs/web"; var _tmpl$ = ["Foo"]; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; const _REGISTRY = _$$registry(); -const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/_$ssr(_tmpl$, _$ssrHydrationKey()), { +const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/(() => { + var _v$ = _$ssrHydrationKey(); + return _$ssr(_tmpl$, _v$); +})(), { location: "example.jsx:3:17", signature: "4b145a58" }); @@ -1013,15 +1144,18 @@ if (import.meta.hot) { `; exports[`esm (server, hydratable) > VariableDeclarator > FunctionExpression > should transform VariableDeclarator w/ FunctionExpression with valid Component name and params 2`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; -import { ssrHydrationKey as _$ssrHydrationKey } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; +import { ssrHydrationKey as _$ssrHydrationKey } from "@solidjs/web"; var _tmpl$ = ["Foo"]; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; const _REGISTRY = _$$registry(); -const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/_$ssr(_tmpl$, _$ssrHydrationKey()), { +const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/(() => { + var _v$ = _$ssrHydrationKey(); + return _$ssr(_tmpl$, _v$); +})(), { location: "example.jsx:3:17", signature: "4b145a58" }); @@ -1037,17 +1171,22 @@ if (import.meta.hot) { `; exports[`esm (server, hydratable) > VariableDeclarator > FunctionExpression > should transform VariableDeclarator w/ FunctionExpression with valid Component name and params 3`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; -import { escape as _$escape } from "solid-js/web"; -import { ssrHydrationKey as _$ssrHydrationKey } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; +import { ssrRunInScope as _$ssrRunInScope } from "@solidjs/web"; +import { escape as _$escape } from "@solidjs/web"; +import { ssrHydrationKey as _$ssrHydrationKey } from "@solidjs/web"; var _tmpl$ = ["", ""]; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; const example = 'Foo'; const _REGISTRY = _$$registry(); -const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/_$ssr(_tmpl$, _$ssrHydrationKey(), _$escape(_props.v0)), { +const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/(() => { + var _v$ = _$ssrHydrationKey(), + _v$2 = _$ssrRunInScope(() => _$escape(_props.v0)); + return _$ssr(_tmpl$, _v$, _v$2); +})(), { location: "example.jsx:4:17", signature: "ae0f2a31" }); @@ -1068,7 +1207,7 @@ if (import.meta.hot) { `; exports[`esm (server, hydratable) > VariableDeclarator > FunctionExpression > should transform VariableDeclarator w/ FunctionExpression with valid Component name and params 4`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; @@ -1099,16 +1238,19 @@ if (import.meta.hot) { `; exports[`esm (server, hydratable) > VariableDeclarator > FunctionExpression > should transform VariableDeclarator w/ FunctionExpression with valid Component name and params 5`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; -import { ssrHydrationKey as _$ssrHydrationKey } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; +import { ssrHydrationKey as _$ssrHydrationKey } from "@solidjs/web"; var _tmpl$ = ["bar"], _tmpl$2 = ["foo"]; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; const _REGISTRY = _$$registry(); -const Bar_1 = _$$component(_REGISTRY, "Bar_1", _props => /*@refresh jsx-skip*/_$ssr(_tmpl$, _$ssrHydrationKey()), { +const Bar_1 = _$$component(_REGISTRY, "Bar_1", _props => /*@refresh jsx-skip*/(() => { + var _v$ = _$ssrHydrationKey(); + return _$ssr(_tmpl$, _v$); +})(), { location: "example.jsx:3:17", signature: "61dd3182" }); @@ -1118,7 +1260,10 @@ const Bar = _$$component(_REGISTRY, "Bar", function () { location: "example.jsx:2:20", signature: "1fb34faa" }); -const Foo_1_1 = _$$component(_REGISTRY, "Foo_1_1", _props3 => /*@refresh jsx-skip*/_$ssr(_tmpl$2, _$ssrHydrationKey()), { +const Foo_1_1 = _$$component(_REGISTRY, "Foo_1_1", _props3 => /*@refresh jsx-skip*/(() => { + var _v$2 = _$ssrHydrationKey(); + return _$ssr(_tmpl$2, _v$2); +})(), { location: "example.jsx:8:14", signature: "241c14a4" }); @@ -1142,15 +1287,19 @@ if (import.meta.hot) { `; exports[`esm (server, hydratable) > fix build > refs > should work with a function 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; -import { ssrHydrationKey as _$ssrHydrationKey } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; +import { ssrHydrationKey as _$ssrHydrationKey } from "@solidjs/web"; var _tmpl$ = ["Comp"]; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; const _REGISTRY = _$$registry(); -const Comp_1 = _$$component(_REGISTRY, "Comp_1", _props => /*@refresh jsx-skip*/_$ssr(_tmpl$, _$ssrHydrationKey()), { +const Comp_1 = _$$component(_REGISTRY, "Comp_1", _props => /*@refresh jsx-skip*/(() => { + var _v$ = _$ssrHydrationKey(), + _ref$ = _props.v0; + return _$ssr(_tmpl$, _v$); +})(), { location: "example.jsx:4:19", signature: "6f76290" }); @@ -1169,15 +1318,19 @@ if (import.meta.webpackHot) { `; exports[`esm (server, hydratable) > fix build > refs > should work with a mutable variable 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; -import { ssrHydrationKey as _$ssrHydrationKey } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; +import { ssrHydrationKey as _$ssrHydrationKey } from "@solidjs/web"; var _tmpl$ = ["Comp"]; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; const _REGISTRY = _$$registry(); -const Comp_1 = _$$component(_REGISTRY, "Comp_1", _props => /*@refresh jsx-skip*/_$ssr(_tmpl$, _$ssrHydrationKey()), { +const Comp_1 = _$$component(_REGISTRY, "Comp_1", _props => /*@refresh jsx-skip*/(() => { + var _v$ = _$ssrHydrationKey(), + _ref$ = _props.v0; + return _$ssr(_tmpl$, _v$); +})(), { location: "example.jsx:4:19", signature: "6f76290" }); @@ -1202,16 +1355,20 @@ if (import.meta.webpackHot) { `; exports[`esm (server, hydratable) > fix build > signals as refs > should work 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; -import { ssrHydrationKey as _$ssrHydrationKey } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; +import { ssrHydrationKey as _$ssrHydrationKey } from "@solidjs/web"; var _tmpl$ = ["Comp"]; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; import { createSignal } from 'solid-js'; const _REGISTRY = _$$registry(); -const Comp_1 = _$$component(_REGISTRY, "Comp_1", _props => /*@refresh jsx-skip*/_$ssr(_tmpl$, _$ssrHydrationKey()), { +const Comp_1 = _$$component(_REGISTRY, "Comp_1", _props => /*@refresh jsx-skip*/(() => { + var _v$ = _$ssrHydrationKey(), + _ref$ = _props.v0; + return _$ssr(_tmpl$, _v$); +})(), { location: "example.jsx:6:19", signature: "6f76290" }); @@ -1237,7 +1394,7 @@ if (import.meta.webpackHot) { `; exports[`esm (server, hydratable) > fix render > @refresh reload > should work 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; import { $$decline as _$$decline } from "solid-refresh"; // @refresh reload import { render } from 'solid-js/web'; @@ -1251,7 +1408,7 @@ if (import.meta.hot) { `; exports[`esm (server, hydratable) > fix render > import specifiers > should work with ImportNamespaceSpecifier 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; @@ -1271,7 +1428,7 @@ if (import.meta.hot) { `; exports[`esm (server, hydratable) > fix render > import specifiers > should work with ImportSpecifier + Identifier 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; @@ -1291,7 +1448,7 @@ if (import.meta.hot) { `; exports[`esm (server, hydratable) > fix render > import specifiers > should work with ImportSpecifier + aliased Identifier 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; @@ -1311,7 +1468,7 @@ if (import.meta.hot) { `; exports[`esm (server, hydratable) > fix render > import specifiers > should work with ImportSpecifier + aliased Identifier from StringLiteral 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; @@ -1331,7 +1488,7 @@ if (import.meta.hot) { `; exports[`esm (server, hydratable) > fix render > top-level statements > should work with IfStatement 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; diff --git a/tests/server-hydratable/__snapshots__/standard.test.ts.snap b/tests/server-hydratable/__snapshots__/standard.test.ts.snap index 384228c..3a0b63a 100644 --- a/tests/server-hydratable/__snapshots__/standard.test.ts.snap +++ b/tests/server-hydratable/__snapshots__/standard.test.ts.snap @@ -32,13 +32,16 @@ if (module.hot) { `; exports[`standard (server, hydratable) > ExportDefaultDeclaration w/ FunctionExpression > should skip ExportDefaultDeclaration w/ FunctionExpression with @refresh reload 1`] = ` -"import { ssr as _$ssr } from "solid-js/web"; -import { ssrHydrationKey as _$ssrHydrationKey } from "solid-js/web"; +"import { ssr as _$ssr } from "@solidjs/web"; +import { ssrHydrationKey as _$ssrHydrationKey } from "@solidjs/web"; var _tmpl$ = ["Foo"]; import { $$decline as _$$decline } from "solid-refresh"; // @refresh reload export default function Foo() { - return _$ssr(_tmpl$, _$ssrHydrationKey()); + return (() => { + var _v$ = _$ssrHydrationKey(); + return _$ssr(_tmpl$, _v$); + })(); } if (module.hot) { _$$decline("standard", module.hot); @@ -46,25 +49,31 @@ if (module.hot) { `; exports[`standard (server, hydratable) > ExportDefaultDeclaration w/ FunctionExpression > should skip ExportDefaultDeclaration w/ FunctionExpression with @refresh skip 1`] = ` -"import { ssr as _$ssr } from "solid-js/web"; -import { ssrHydrationKey as _$ssrHydrationKey } from "solid-js/web"; +"import { ssr as _$ssr } from "@solidjs/web"; +import { ssrHydrationKey as _$ssrHydrationKey } from "@solidjs/web"; var _tmpl$ = ["Foo"]; // @refresh skip export default function Foo() { - return _$ssr(_tmpl$, _$ssrHydrationKey()); + return (() => { + var _v$ = _$ssrHydrationKey(); + return _$ssr(_tmpl$, _v$); + })(); }" `; exports[`standard (server, hydratable) > ExportDefaultDeclaration w/ FunctionExpression > should skip ExportDefaultDeclaration w/ FunctionExpression with invalid Component name 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; -import { ssrHydrationKey as _$ssrHydrationKey } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; +import { ssrHydrationKey as _$ssrHydrationKey } from "@solidjs/web"; var _tmpl$ = ["Foo"]; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; const _REGISTRY = _$$registry(); -const JSX_foo_1 = _$$component(_REGISTRY, "JSX_foo_1", _props => /*@refresh jsx-skip*/_$ssr(_tmpl$, _$ssrHydrationKey()), { +const JSX_foo_1 = _$$component(_REGISTRY, "JSX_foo_1", _props => /*@refresh jsx-skip*/(() => { + var _v$ = _$ssrHydrationKey(); + return _$ssr(_tmpl$, _v$); +})(), { location: "example.jsx:3:15", signature: "4b145a58" }); @@ -77,15 +86,18 @@ if (module.hot) { `; exports[`standard (server, hydratable) > ExportDefaultDeclaration w/ FunctionExpression > should skip ExportDefaultDeclaration w/ FunctionExpression with valid Component name and >1 params 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; -import { ssrHydrationKey as _$ssrHydrationKey } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; +import { ssrHydrationKey as _$ssrHydrationKey } from "@solidjs/web"; var _tmpl$ = ["Foo"]; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; const _REGISTRY = _$$registry(); -const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/_$ssr(_tmpl$, _$ssrHydrationKey()), { +const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/(() => { + var _v$ = _$ssrHydrationKey(); + return _$ssr(_tmpl$, _v$); +})(), { location: "example.jsx:3:15", signature: "4b145a58" }); @@ -98,15 +110,18 @@ if (module.hot) { `; exports[`standard (server, hydratable) > ExportDefaultDeclaration w/ FunctionExpression > should transform ExportDefaultDeclaration w/ FunctionExpression with valid Component name and params 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; -import { ssrHydrationKey as _$ssrHydrationKey } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; +import { ssrHydrationKey as _$ssrHydrationKey } from "@solidjs/web"; var _tmpl$ = ["Foo"]; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; const _REGISTRY = _$$registry(); -const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/_$ssr(_tmpl$, _$ssrHydrationKey()), { +const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/(() => { + var _v$ = _$ssrHydrationKey(); + return _$ssr(_tmpl$, _v$); +})(), { location: "example.jsx:3:15", signature: "4b145a58" }); @@ -123,15 +138,18 @@ if (module.hot) { `; exports[`standard (server, hydratable) > ExportDefaultDeclaration w/ FunctionExpression > should transform ExportDefaultDeclaration w/ FunctionExpression with valid Component name and params 2`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; -import { ssrHydrationKey as _$ssrHydrationKey } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; +import { ssrHydrationKey as _$ssrHydrationKey } from "@solidjs/web"; var _tmpl$ = ["Foo"]; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; const _REGISTRY = _$$registry(); -const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/_$ssr(_tmpl$, _$ssrHydrationKey()), { +const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/(() => { + var _v$ = _$ssrHydrationKey(); + return _$ssr(_tmpl$, _v$); +})(), { location: "example.jsx:3:15", signature: "4b145a58" }); @@ -148,16 +166,21 @@ if (module.hot) { `; exports[`standard (server, hydratable) > ExportDefaultDeclaration w/ FunctionExpression > should transform ExportDefaultDeclaration w/ FunctionExpression with valid Component name and params 3`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; -import { escape as _$escape } from "solid-js/web"; -import { ssrHydrationKey as _$ssrHydrationKey } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; +import { ssrRunInScope as _$ssrRunInScope } from "@solidjs/web"; +import { escape as _$escape } from "@solidjs/web"; +import { ssrHydrationKey as _$ssrHydrationKey } from "@solidjs/web"; var _tmpl$ = ["", ""]; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; const _REGISTRY = _$$registry(); -const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/_$ssr(_tmpl$, _$ssrHydrationKey(), _$escape(_props.v0)), { +const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/(() => { + var _v$ = _$ssrHydrationKey(), + _v$2 = _$ssrRunInScope(() => _$escape(_props.v0)); + return _$ssr(_tmpl$, _v$, _v$2); +})(), { location: "example.jsx:4:15", signature: "ae0f2a31" }); @@ -180,7 +203,7 @@ if (module.hot) { `; exports[`standard (server, hydratable) > ExportDefaultDeclaration w/ FunctionExpression > should transform ExportDefaultDeclaration w/ FunctionExpression with valid Component name and params 4`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; @@ -212,16 +235,19 @@ if (module.hot) { `; exports[`standard (server, hydratable) > ExportDefaultDeclaration w/ FunctionExpression > should transform ExportDefaultDeclaration w/ FunctionExpression with valid Component name and params 5`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; -import { ssrHydrationKey as _$ssrHydrationKey } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; +import { ssrHydrationKey as _$ssrHydrationKey } from "@solidjs/web"; var _tmpl$ = ["foo"], _tmpl$2 = ["bar"]; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; const _REGISTRY = _$$registry(); -const Foo_1_1 = _$$component(_REGISTRY, "Foo_1_1", _props3 => /*@refresh jsx-skip*/_$ssr(_tmpl$, _$ssrHydrationKey()), { +const Foo_1_1 = _$$component(_REGISTRY, "Foo_1_1", _props3 => /*@refresh jsx-skip*/(() => { + var _v$ = _$ssrHydrationKey(); + return _$ssr(_tmpl$, _v$); +})(), { location: "example.jsx:8:12", signature: "241c14a4" }); @@ -239,7 +265,10 @@ const Foo = _$$component(_REGISTRY, "Foo", function Foo() { location: "example.jsx:5:21", signature: "c963b907" }); -const Bar_1 = _$$component(_REGISTRY, "Bar_1", _props2 => /*@refresh jsx-skip*/_$ssr(_tmpl$2, _$ssrHydrationKey()), { +const Bar_1 = _$$component(_REGISTRY, "Bar_1", _props2 => /*@refresh jsx-skip*/(() => { + var _v$2 = _$ssrHydrationKey(); + return _$ssr(_tmpl$2, _v$2); +})(), { location: "example.jsx:3:15", signature: "fad4daa8" }); @@ -256,13 +285,16 @@ if (module.hot) { `; exports[`standard (server, hydratable) > ExportNamedDeclaration w/ FunctionExpression > should skip ExportNamedDeclaration w/ FunctionExpression with @refresh reload 1`] = ` -"import { ssr as _$ssr } from "solid-js/web"; -import { ssrHydrationKey as _$ssrHydrationKey } from "solid-js/web"; +"import { ssr as _$ssr } from "@solidjs/web"; +import { ssrHydrationKey as _$ssrHydrationKey } from "@solidjs/web"; var _tmpl$ = ["Foo"]; import { $$decline as _$$decline } from "solid-refresh"; // @refresh reload export function Foo() { - return _$ssr(_tmpl$, _$ssrHydrationKey()); + return (() => { + var _v$ = _$ssrHydrationKey(); + return _$ssr(_tmpl$, _v$); + })(); } if (module.hot) { _$$decline("standard", module.hot); @@ -270,25 +302,31 @@ if (module.hot) { `; exports[`standard (server, hydratable) > ExportNamedDeclaration w/ FunctionExpression > should skip ExportNamedDeclaration w/ FunctionExpression with @refresh skip 1`] = ` -"import { ssr as _$ssr } from "solid-js/web"; -import { ssrHydrationKey as _$ssrHydrationKey } from "solid-js/web"; +"import { ssr as _$ssr } from "@solidjs/web"; +import { ssrHydrationKey as _$ssrHydrationKey } from "@solidjs/web"; var _tmpl$ = ["Foo"]; // @refresh skip export function Foo() { - return _$ssr(_tmpl$, _$ssrHydrationKey()); + return (() => { + var _v$ = _$ssrHydrationKey(); + return _$ssr(_tmpl$, _v$); + })(); }" `; exports[`standard (server, hydratable) > ExportNamedDeclaration w/ FunctionExpression > should skip ExportNamedDeclaration w/ FunctionExpression with invalid Component name 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; -import { ssrHydrationKey as _$ssrHydrationKey } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; +import { ssrHydrationKey as _$ssrHydrationKey } from "@solidjs/web"; var _tmpl$ = ["Foo"]; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; const _REGISTRY = _$$registry(); -const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/_$ssr(_tmpl$, _$ssrHydrationKey()), { +const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/(() => { + var _v$ = _$ssrHydrationKey(); + return _$ssr(_tmpl$, _v$); +})(), { location: "example.jsx:3:15", signature: "4b145a58" }); @@ -305,15 +343,18 @@ if (module.hot) { `; exports[`standard (server, hydratable) > ExportNamedDeclaration w/ FunctionExpression > should skip ExportNamedDeclaration w/ FunctionExpression with valid Component name and >1 params 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; -import { ssrHydrationKey as _$ssrHydrationKey } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; +import { ssrHydrationKey as _$ssrHydrationKey } from "@solidjs/web"; var _tmpl$ = ["Foo"]; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; const _REGISTRY = _$$registry(); -const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/_$ssr(_tmpl$, _$ssrHydrationKey()), { +const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/(() => { + var _v$ = _$ssrHydrationKey(); + return _$ssr(_tmpl$, _v$); +})(), { location: "example.jsx:3:15", signature: "4b145a58" }); @@ -326,15 +367,18 @@ if (module.hot) { `; exports[`standard (server, hydratable) > ExportNamedDeclaration w/ FunctionExpression > should transform ExportNamedDeclaration w/ FunctionExpression with valid Component name and params 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; -import { ssrHydrationKey as _$ssrHydrationKey } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; +import { ssrHydrationKey as _$ssrHydrationKey } from "@solidjs/web"; var _tmpl$ = ["Foo"]; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; const _REGISTRY = _$$registry(); -const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/_$ssr(_tmpl$, _$ssrHydrationKey()), { +const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/(() => { + var _v$ = _$ssrHydrationKey(); + return _$ssr(_tmpl$, _v$); +})(), { location: "example.jsx:3:15", signature: "4b145a58" }); @@ -351,15 +395,18 @@ if (module.hot) { `; exports[`standard (server, hydratable) > ExportNamedDeclaration w/ FunctionExpression > should transform ExportNamedDeclaration w/ FunctionExpression with valid Component name and params 2`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; -import { ssrHydrationKey as _$ssrHydrationKey } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; +import { ssrHydrationKey as _$ssrHydrationKey } from "@solidjs/web"; var _tmpl$ = ["Foo"]; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; const _REGISTRY = _$$registry(); -const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/_$ssr(_tmpl$, _$ssrHydrationKey()), { +const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/(() => { + var _v$ = _$ssrHydrationKey(); + return _$ssr(_tmpl$, _v$); +})(), { location: "example.jsx:3:15", signature: "4b145a58" }); @@ -376,16 +423,21 @@ if (module.hot) { `; exports[`standard (server, hydratable) > ExportNamedDeclaration w/ FunctionExpression > should transform ExportNamedDeclaration w/ FunctionExpression with valid Component name and params 3`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; -import { escape as _$escape } from "solid-js/web"; -import { ssrHydrationKey as _$ssrHydrationKey } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; +import { ssrRunInScope as _$ssrRunInScope } from "@solidjs/web"; +import { escape as _$escape } from "@solidjs/web"; +import { ssrHydrationKey as _$ssrHydrationKey } from "@solidjs/web"; var _tmpl$ = ["", ""]; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; const _REGISTRY = _$$registry(); -const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/_$ssr(_tmpl$, _$ssrHydrationKey(), _$escape(_props.v0)), { +const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/(() => { + var _v$ = _$ssrHydrationKey(), + _v$2 = _$ssrRunInScope(() => _$escape(_props.v0)); + return _$ssr(_tmpl$, _v$, _v$2); +})(), { location: "example.jsx:4:15", signature: "ae0f2a31" }); @@ -408,7 +460,7 @@ if (module.hot) { `; exports[`standard (server, hydratable) > ExportNamedDeclaration w/ FunctionExpression > should transform ExportNamedDeclaration w/ FunctionExpression with valid Component name and params 4`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; @@ -440,16 +492,19 @@ if (module.hot) { `; exports[`standard (server, hydratable) > ExportNamedDeclaration w/ FunctionExpression > should transform ExportNamedDeclaration w/ FunctionExpression with valid Component name and params 5`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; -import { ssrHydrationKey as _$ssrHydrationKey } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; +import { ssrHydrationKey as _$ssrHydrationKey } from "@solidjs/web"; var _tmpl$ = ["bar"], _tmpl$2 = ["foo"]; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; const _REGISTRY = _$$registry(); -const Bar_1 = _$$component(_REGISTRY, "Bar_1", _props => /*@refresh jsx-skip*/_$ssr(_tmpl$, _$ssrHydrationKey()), { +const Bar_1 = _$$component(_REGISTRY, "Bar_1", _props => /*@refresh jsx-skip*/(() => { + var _v$ = _$ssrHydrationKey(); + return _$ssr(_tmpl$, _v$); +})(), { location: "example.jsx:3:15", signature: "61dd3182" }); @@ -459,7 +514,10 @@ const Bar = _$$component(_REGISTRY, "Bar", function Bar() { location: "example.jsx:2:13", signature: "e93ca257" }); -const Foo_1_1 = _$$component(_REGISTRY, "Foo_1_1", _props3 => /*@refresh jsx-skip*/_$ssr(_tmpl$2, _$ssrHydrationKey()), { +const Foo_1_1 = _$$component(_REGISTRY, "Foo_1_1", _props3 => /*@refresh jsx-skip*/(() => { + var _v$2 = _$ssrHydrationKey(); + return _$ssr(_tmpl$2, _v$2); +})(), { location: "example.jsx:8:12", signature: "241c14a4" }); @@ -485,13 +543,16 @@ if (module.hot) { `; exports[`standard (server, hydratable) > FunctionDeclaration > should skip FunctionDeclaration with @refresh reload 1`] = ` -"import { ssr as _$ssr } from "solid-js/web"; -import { ssrHydrationKey as _$ssrHydrationKey } from "solid-js/web"; +"import { ssr as _$ssr } from "@solidjs/web"; +import { ssrHydrationKey as _$ssrHydrationKey } from "@solidjs/web"; var _tmpl$ = ["Foo"]; import { $$decline as _$$decline } from "solid-refresh"; // @refresh reload function Foo() { - return _$ssr(_tmpl$, _$ssrHydrationKey()); + return (() => { + var _v$ = _$ssrHydrationKey(); + return _$ssr(_tmpl$, _v$); + })(); } if (module.hot) { _$$decline("standard", module.hot); @@ -499,25 +560,31 @@ if (module.hot) { `; exports[`standard (server, hydratable) > FunctionDeclaration > should skip FunctionDeclaration with @refresh skip 1`] = ` -"import { ssr as _$ssr } from "solid-js/web"; -import { ssrHydrationKey as _$ssrHydrationKey } from "solid-js/web"; +"import { ssr as _$ssr } from "@solidjs/web"; +import { ssrHydrationKey as _$ssrHydrationKey } from "@solidjs/web"; var _tmpl$ = ["Foo"]; // @refresh skip function Foo() { - return _$ssr(_tmpl$, _$ssrHydrationKey()); + return (() => { + var _v$ = _$ssrHydrationKey(); + return _$ssr(_tmpl$, _v$); + })(); }" `; exports[`standard (server, hydratable) > FunctionDeclaration > should skip FunctionDeclaration with invalid Component name 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; -import { ssrHydrationKey as _$ssrHydrationKey } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; +import { ssrHydrationKey as _$ssrHydrationKey } from "@solidjs/web"; var _tmpl$ = ["Foo"]; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; const _REGISTRY = _$$registry(); -const JSX_foo_1 = _$$component(_REGISTRY, "JSX_foo_1", _props => /*@refresh jsx-skip*/_$ssr(_tmpl$, _$ssrHydrationKey()), { +const JSX_foo_1 = _$$component(_REGISTRY, "JSX_foo_1", _props => /*@refresh jsx-skip*/(() => { + var _v$ = _$ssrHydrationKey(); + return _$ssr(_tmpl$, _v$); +})(), { location: "example.jsx:3:15", signature: "4b145a58" }); @@ -530,15 +597,18 @@ if (module.hot) { `; exports[`standard (server, hydratable) > FunctionDeclaration > should skip FunctionDeclaration with valid Component name and >1 params 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; -import { ssrHydrationKey as _$ssrHydrationKey } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; +import { ssrHydrationKey as _$ssrHydrationKey } from "@solidjs/web"; var _tmpl$ = ["Foo"]; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; const _REGISTRY = _$$registry(); -const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/_$ssr(_tmpl$, _$ssrHydrationKey()), { +const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/(() => { + var _v$ = _$ssrHydrationKey(); + return _$ssr(_tmpl$, _v$); +})(), { location: "example.jsx:3:15", signature: "4b145a58" }); @@ -551,15 +621,18 @@ if (module.hot) { `; exports[`standard (server, hydratable) > FunctionDeclaration > should transform FunctionDeclaration with valid Component name and params 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; -import { ssrHydrationKey as _$ssrHydrationKey } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; +import { ssrHydrationKey as _$ssrHydrationKey } from "@solidjs/web"; var _tmpl$ = ["Foo"]; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; const _REGISTRY = _$$registry(); -const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/_$ssr(_tmpl$, _$ssrHydrationKey()), { +const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/(() => { + var _v$ = _$ssrHydrationKey(); + return _$ssr(_tmpl$, _v$); +})(), { location: "example.jsx:3:15", signature: "4b145a58" }); @@ -575,15 +648,18 @@ if (module.hot) { `; exports[`standard (server, hydratable) > FunctionDeclaration > should transform FunctionDeclaration with valid Component name and params 2`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; -import { ssrHydrationKey as _$ssrHydrationKey } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; +import { ssrHydrationKey as _$ssrHydrationKey } from "@solidjs/web"; var _tmpl$ = ["Foo"]; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; const _REGISTRY = _$$registry(); -const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/_$ssr(_tmpl$, _$ssrHydrationKey()), { +const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/(() => { + var _v$ = _$ssrHydrationKey(); + return _$ssr(_tmpl$, _v$); +})(), { location: "example.jsx:3:15", signature: "4b145a58" }); @@ -599,16 +675,21 @@ if (module.hot) { `; exports[`standard (server, hydratable) > FunctionDeclaration > should transform FunctionDeclaration with valid Component name and params 3`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; -import { escape as _$escape } from "solid-js/web"; -import { ssrHydrationKey as _$ssrHydrationKey } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; +import { ssrRunInScope as _$ssrRunInScope } from "@solidjs/web"; +import { escape as _$escape } from "@solidjs/web"; +import { ssrHydrationKey as _$ssrHydrationKey } from "@solidjs/web"; var _tmpl$ = ["", ""]; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; const _REGISTRY = _$$registry(); -const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/_$ssr(_tmpl$, _$ssrHydrationKey(), _$escape(_props.v0)), { +const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/(() => { + var _v$ = _$ssrHydrationKey(), + _v$2 = _$ssrRunInScope(() => _$escape(_props.v0)); + return _$ssr(_tmpl$, _v$, _v$2); +})(), { location: "example.jsx:4:15", signature: "ae0f2a31" }); @@ -630,7 +711,7 @@ if (module.hot) { `; exports[`standard (server, hydratable) > FunctionDeclaration > should transform FunctionDeclaration with valid Component name and params 4`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; @@ -661,16 +742,19 @@ if (module.hot) { `; exports[`standard (server, hydratable) > FunctionDeclaration > should transform FunctionDeclaration with valid Component name and params 5`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; -import { ssrHydrationKey as _$ssrHydrationKey } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; +import { ssrHydrationKey as _$ssrHydrationKey } from "@solidjs/web"; var _tmpl$ = ["foo"], _tmpl$2 = ["bar"]; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; const _REGISTRY = _$$registry(); -const Foo_1_1 = _$$component(_REGISTRY, "Foo_1_1", _props3 => /*@refresh jsx-skip*/_$ssr(_tmpl$, _$ssrHydrationKey()), { +const Foo_1_1 = _$$component(_REGISTRY, "Foo_1_1", _props3 => /*@refresh jsx-skip*/(() => { + var _v$ = _$ssrHydrationKey(); + return _$ssr(_tmpl$, _v$); +})(), { location: "example.jsx:8:12", signature: "241c14a4" }); @@ -688,7 +772,10 @@ const Foo = _$$component(_REGISTRY, "Foo", function Foo() { location: "example.jsx:5:6", signature: "c963b907" }); -const Bar_1 = _$$component(_REGISTRY, "Bar_1", _props2 => /*@refresh jsx-skip*/_$ssr(_tmpl$2, _$ssrHydrationKey()), { +const Bar_1 = _$$component(_REGISTRY, "Bar_1", _props2 => /*@refresh jsx-skip*/(() => { + var _v$2 = _$ssrHydrationKey(); + return _$ssr(_tmpl$2, _v$2); +})(), { location: "example.jsx:3:15", signature: "fad4daa8" }); @@ -704,13 +791,16 @@ if (module.hot) { `; exports[`standard (server, hydratable) > VariableDeclarator > ArrowFunctionExpression > should skip VariableDeclarator w/ ArrowFunctionExpression with @refresh reload 1`] = ` -"import { ssr as _$ssr } from "solid-js/web"; -import { ssrHydrationKey as _$ssrHydrationKey } from "solid-js/web"; +"import { ssr as _$ssr } from "@solidjs/web"; +import { ssrHydrationKey as _$ssrHydrationKey } from "@solidjs/web"; var _tmpl$ = ["Foo"]; import { $$decline as _$$decline } from "solid-refresh"; // @refresh reload const Foo = () => { - return _$ssr(_tmpl$, _$ssrHydrationKey()); + return (() => { + var _v$ = _$ssrHydrationKey(); + return _$ssr(_tmpl$, _v$); + })(); }; if (module.hot) { _$$decline("standard", module.hot); @@ -718,25 +808,31 @@ if (module.hot) { `; exports[`standard (server, hydratable) > VariableDeclarator > ArrowFunctionExpression > should skip VariableDeclarator w/ ArrowFunctionExpression with @refresh skip 1`] = ` -"import { ssr as _$ssr } from "solid-js/web"; -import { ssrHydrationKey as _$ssrHydrationKey } from "solid-js/web"; +"import { ssr as _$ssr } from "@solidjs/web"; +import { ssrHydrationKey as _$ssrHydrationKey } from "@solidjs/web"; var _tmpl$ = ["Foo"]; // @refresh skip const Foo = () => { - return _$ssr(_tmpl$, _$ssrHydrationKey()); + return (() => { + var _v$ = _$ssrHydrationKey(); + return _$ssr(_tmpl$, _v$); + })(); };" `; exports[`standard (server, hydratable) > VariableDeclarator > ArrowFunctionExpression > should skip VariableDeclarator w/ ArrowFunctionExpression with invalid Component name 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; -import { ssrHydrationKey as _$ssrHydrationKey } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; +import { ssrHydrationKey as _$ssrHydrationKey } from "@solidjs/web"; var _tmpl$ = ["Foo"]; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; const _REGISTRY = _$$registry(); -const JSX_foo_1 = _$$component(_REGISTRY, "JSX_foo_1", _props => /*@refresh jsx-skip*/_$ssr(_tmpl$, _$ssrHydrationKey()), { +const JSX_foo_1 = _$$component(_REGISTRY, "JSX_foo_1", _props => /*@refresh jsx-skip*/(() => { + var _v$ = _$ssrHydrationKey(); + return _$ssr(_tmpl$, _v$); +})(), { location: "example.jsx:3:17", signature: "4b145a58" }); @@ -749,15 +845,18 @@ if (module.hot) { `; exports[`standard (server, hydratable) > VariableDeclarator > ArrowFunctionExpression > should skip VariableDeclarator w/ ArrowFunctionExpression with valid Component name and >1 params 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; -import { ssrHydrationKey as _$ssrHydrationKey } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; +import { ssrHydrationKey as _$ssrHydrationKey } from "@solidjs/web"; var _tmpl$ = ["Foo"]; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; const _REGISTRY = _$$registry(); -const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/_$ssr(_tmpl$, _$ssrHydrationKey()), { +const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/(() => { + var _v$ = _$ssrHydrationKey(); + return _$ssr(_tmpl$, _v$); +})(), { location: "example.jsx:3:17", signature: "4b145a58" }); @@ -770,15 +869,18 @@ if (module.hot) { `; exports[`standard (server, hydratable) > VariableDeclarator > ArrowFunctionExpression > should transform VariableDeclarator w/ ArrowFunctionExpression with valid Component name and params 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; -import { ssrHydrationKey as _$ssrHydrationKey } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; +import { ssrHydrationKey as _$ssrHydrationKey } from "@solidjs/web"; var _tmpl$ = ["Foo"]; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; const _REGISTRY = _$$registry(); -const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/_$ssr(_tmpl$, _$ssrHydrationKey()), { +const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/(() => { + var _v$ = _$ssrHydrationKey(); + return _$ssr(_tmpl$, _v$); +})(), { location: "example.jsx:3:17", signature: "4b145a58" }); @@ -794,15 +896,18 @@ if (module.hot) { `; exports[`standard (server, hydratable) > VariableDeclarator > ArrowFunctionExpression > should transform VariableDeclarator w/ ArrowFunctionExpression with valid Component name and params 2`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; -import { ssrHydrationKey as _$ssrHydrationKey } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; +import { ssrHydrationKey as _$ssrHydrationKey } from "@solidjs/web"; var _tmpl$ = ["Foo"]; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; const _REGISTRY = _$$registry(); -const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/_$ssr(_tmpl$, _$ssrHydrationKey()), { +const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/(() => { + var _v$ = _$ssrHydrationKey(); + return _$ssr(_tmpl$, _v$); +})(), { location: "example.jsx:3:17", signature: "4b145a58" }); @@ -818,17 +923,22 @@ if (module.hot) { `; exports[`standard (server, hydratable) > VariableDeclarator > ArrowFunctionExpression > should transform VariableDeclarator w/ ArrowFunctionExpression with valid Component name and params 3`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; -import { escape as _$escape } from "solid-js/web"; -import { ssrHydrationKey as _$ssrHydrationKey } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; +import { ssrRunInScope as _$ssrRunInScope } from "@solidjs/web"; +import { escape as _$escape } from "@solidjs/web"; +import { ssrHydrationKey as _$ssrHydrationKey } from "@solidjs/web"; var _tmpl$ = ["", ""]; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; const example = 'Foo'; const _REGISTRY = _$$registry(); -const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/_$ssr(_tmpl$, _$ssrHydrationKey(), _$escape(_props.v0)), { +const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/(() => { + var _v$ = _$ssrHydrationKey(), + _v$2 = _$ssrRunInScope(() => _$escape(_props.v0)); + return _$ssr(_tmpl$, _v$, _v$2); +})(), { location: "example.jsx:4:17", signature: "ae0f2a31" }); @@ -849,7 +959,7 @@ if (module.hot) { `; exports[`standard (server, hydratable) > VariableDeclarator > ArrowFunctionExpression > should transform VariableDeclarator w/ ArrowFunctionExpression with valid Component name and params 4`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; @@ -880,16 +990,19 @@ if (module.hot) { `; exports[`standard (server, hydratable) > VariableDeclarator > ArrowFunctionExpression > should transform VariableDeclarator w/ ArrowFunctionExpression with valid Component name and params 5`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; -import { ssrHydrationKey as _$ssrHydrationKey } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; +import { ssrHydrationKey as _$ssrHydrationKey } from "@solidjs/web"; var _tmpl$ = ["bar"], _tmpl$2 = ["foo"]; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; const _REGISTRY = _$$registry(); -const Bar_1 = _$$component(_REGISTRY, "Bar_1", _props => /*@refresh jsx-skip*/_$ssr(_tmpl$, _$ssrHydrationKey()), { +const Bar_1 = _$$component(_REGISTRY, "Bar_1", _props => /*@refresh jsx-skip*/(() => { + var _v$ = _$ssrHydrationKey(); + return _$ssr(_tmpl$, _v$); +})(), { location: "example.jsx:3:17", signature: "61dd3182" }); @@ -899,7 +1012,10 @@ const Bar = _$$component(_REGISTRY, "Bar", () => { location: "example.jsx:2:20", signature: "d1c6ca9b" }); -const Foo_1_1 = _$$component(_REGISTRY, "Foo_1_1", _props3 => /*@refresh jsx-skip*/_$ssr(_tmpl$2, _$ssrHydrationKey()), { +const Foo_1_1 = _$$component(_REGISTRY, "Foo_1_1", _props3 => /*@refresh jsx-skip*/(() => { + var _v$2 = _$ssrHydrationKey(); + return _$ssr(_tmpl$2, _v$2); +})(), { location: "example.jsx:8:14", signature: "241c14a4" }); @@ -923,13 +1039,16 @@ if (module.hot) { `; exports[`standard (server, hydratable) > VariableDeclarator > FunctionExpression > should skip VariableDeclarator w/ FunctionExpression with @refresh reload 1`] = ` -"import { ssr as _$ssr } from "solid-js/web"; -import { ssrHydrationKey as _$ssrHydrationKey } from "solid-js/web"; +"import { ssr as _$ssr } from "@solidjs/web"; +import { ssrHydrationKey as _$ssrHydrationKey } from "@solidjs/web"; var _tmpl$ = ["Foo"]; import { $$decline as _$$decline } from "solid-refresh"; // @refresh reload const Foo = function () { - return _$ssr(_tmpl$, _$ssrHydrationKey()); + return (() => { + var _v$ = _$ssrHydrationKey(); + return _$ssr(_tmpl$, _v$); + })(); }; if (module.hot) { _$$decline("standard", module.hot); @@ -937,25 +1056,31 @@ if (module.hot) { `; exports[`standard (server, hydratable) > VariableDeclarator > FunctionExpression > should skip VariableDeclarator w/ FunctionExpression with @refresh skip 1`] = ` -"import { ssr as _$ssr } from "solid-js/web"; -import { ssrHydrationKey as _$ssrHydrationKey } from "solid-js/web"; +"import { ssr as _$ssr } from "@solidjs/web"; +import { ssrHydrationKey as _$ssrHydrationKey } from "@solidjs/web"; var _tmpl$ = ["Foo"]; // @refresh skip const Foo = function () { - return _$ssr(_tmpl$, _$ssrHydrationKey()); + return (() => { + var _v$ = _$ssrHydrationKey(); + return _$ssr(_tmpl$, _v$); + })(); };" `; exports[`standard (server, hydratable) > VariableDeclarator > FunctionExpression > should skip VariableDeclarator w/ FunctionExpression with invalid Component name 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; -import { ssrHydrationKey as _$ssrHydrationKey } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; +import { ssrHydrationKey as _$ssrHydrationKey } from "@solidjs/web"; var _tmpl$ = ["Foo"]; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; const _REGISTRY = _$$registry(); -const JSX_foo_1 = _$$component(_REGISTRY, "JSX_foo_1", _props => /*@refresh jsx-skip*/_$ssr(_tmpl$, _$ssrHydrationKey()), { +const JSX_foo_1 = _$$component(_REGISTRY, "JSX_foo_1", _props => /*@refresh jsx-skip*/(() => { + var _v$ = _$ssrHydrationKey(); + return _$ssr(_tmpl$, _v$); +})(), { location: "example.jsx:3:17", signature: "4b145a58" }); @@ -968,15 +1093,18 @@ if (module.hot) { `; exports[`standard (server, hydratable) > VariableDeclarator > FunctionExpression > should skip VariableDeclarator w/ FunctionExpression with valid Component name and >1 params 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; -import { ssrHydrationKey as _$ssrHydrationKey } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; +import { ssrHydrationKey as _$ssrHydrationKey } from "@solidjs/web"; var _tmpl$ = ["Foo"]; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; const _REGISTRY = _$$registry(); -const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/_$ssr(_tmpl$, _$ssrHydrationKey()), { +const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/(() => { + var _v$ = _$ssrHydrationKey(); + return _$ssr(_tmpl$, _v$); +})(), { location: "example.jsx:3:17", signature: "4b145a58" }); @@ -989,15 +1117,18 @@ if (module.hot) { `; exports[`standard (server, hydratable) > VariableDeclarator > FunctionExpression > should transform VariableDeclarator w/ FunctionExpression with valid Component name and params 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; -import { ssrHydrationKey as _$ssrHydrationKey } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; +import { ssrHydrationKey as _$ssrHydrationKey } from "@solidjs/web"; var _tmpl$ = ["Foo"]; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; const _REGISTRY = _$$registry(); -const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/_$ssr(_tmpl$, _$ssrHydrationKey()), { +const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/(() => { + var _v$ = _$ssrHydrationKey(); + return _$ssr(_tmpl$, _v$); +})(), { location: "example.jsx:3:17", signature: "4b145a58" }); @@ -1013,15 +1144,18 @@ if (module.hot) { `; exports[`standard (server, hydratable) > VariableDeclarator > FunctionExpression > should transform VariableDeclarator w/ FunctionExpression with valid Component name and params 2`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; -import { ssrHydrationKey as _$ssrHydrationKey } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; +import { ssrHydrationKey as _$ssrHydrationKey } from "@solidjs/web"; var _tmpl$ = ["Foo"]; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; const _REGISTRY = _$$registry(); -const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/_$ssr(_tmpl$, _$ssrHydrationKey()), { +const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/(() => { + var _v$ = _$ssrHydrationKey(); + return _$ssr(_tmpl$, _v$); +})(), { location: "example.jsx:3:17", signature: "4b145a58" }); @@ -1037,17 +1171,22 @@ if (module.hot) { `; exports[`standard (server, hydratable) > VariableDeclarator > FunctionExpression > should transform VariableDeclarator w/ FunctionExpression with valid Component name and params 3`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; -import { escape as _$escape } from "solid-js/web"; -import { ssrHydrationKey as _$ssrHydrationKey } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; +import { ssrRunInScope as _$ssrRunInScope } from "@solidjs/web"; +import { escape as _$escape } from "@solidjs/web"; +import { ssrHydrationKey as _$ssrHydrationKey } from "@solidjs/web"; var _tmpl$ = ["", ""]; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; const example = 'Foo'; const _REGISTRY = _$$registry(); -const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/_$ssr(_tmpl$, _$ssrHydrationKey(), _$escape(_props.v0)), { +const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/(() => { + var _v$ = _$ssrHydrationKey(), + _v$2 = _$ssrRunInScope(() => _$escape(_props.v0)); + return _$ssr(_tmpl$, _v$, _v$2); +})(), { location: "example.jsx:4:17", signature: "ae0f2a31" }); @@ -1068,7 +1207,7 @@ if (module.hot) { `; exports[`standard (server, hydratable) > VariableDeclarator > FunctionExpression > should transform VariableDeclarator w/ FunctionExpression with valid Component name and params 4`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; @@ -1099,16 +1238,19 @@ if (module.hot) { `; exports[`standard (server, hydratable) > VariableDeclarator > FunctionExpression > should transform VariableDeclarator w/ FunctionExpression with valid Component name and params 5`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; -import { ssrHydrationKey as _$ssrHydrationKey } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; +import { ssrHydrationKey as _$ssrHydrationKey } from "@solidjs/web"; var _tmpl$ = ["bar"], _tmpl$2 = ["foo"]; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; const _REGISTRY = _$$registry(); -const Bar_1 = _$$component(_REGISTRY, "Bar_1", _props => /*@refresh jsx-skip*/_$ssr(_tmpl$, _$ssrHydrationKey()), { +const Bar_1 = _$$component(_REGISTRY, "Bar_1", _props => /*@refresh jsx-skip*/(() => { + var _v$ = _$ssrHydrationKey(); + return _$ssr(_tmpl$, _v$); +})(), { location: "example.jsx:3:17", signature: "61dd3182" }); @@ -1118,7 +1260,10 @@ const Bar = _$$component(_REGISTRY, "Bar", function () { location: "example.jsx:2:20", signature: "1fb34faa" }); -const Foo_1_1 = _$$component(_REGISTRY, "Foo_1_1", _props3 => /*@refresh jsx-skip*/_$ssr(_tmpl$2, _$ssrHydrationKey()), { +const Foo_1_1 = _$$component(_REGISTRY, "Foo_1_1", _props3 => /*@refresh jsx-skip*/(() => { + var _v$2 = _$ssrHydrationKey(); + return _$ssr(_tmpl$2, _v$2); +})(), { location: "example.jsx:8:14", signature: "241c14a4" }); @@ -1142,15 +1287,19 @@ if (module.hot) { `; exports[`standard (server, hydratable) > fix build > refs > should work with a function 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; -import { ssrHydrationKey as _$ssrHydrationKey } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; +import { ssrHydrationKey as _$ssrHydrationKey } from "@solidjs/web"; var _tmpl$ = ["Comp"]; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; const _REGISTRY = _$$registry(); -const Comp_1 = _$$component(_REGISTRY, "Comp_1", _props => /*@refresh jsx-skip*/_$ssr(_tmpl$, _$ssrHydrationKey()), { +const Comp_1 = _$$component(_REGISTRY, "Comp_1", _props => /*@refresh jsx-skip*/(() => { + var _v$ = _$ssrHydrationKey(), + _ref$ = _props.v0; + return _$ssr(_tmpl$, _v$); +})(), { location: "example.jsx:4:19", signature: "6f76290" }); @@ -1169,15 +1318,19 @@ if (module.hot) { `; exports[`standard (server, hydratable) > fix build > refs > should work with a mutable variable 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; -import { ssrHydrationKey as _$ssrHydrationKey } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; +import { ssrHydrationKey as _$ssrHydrationKey } from "@solidjs/web"; var _tmpl$ = ["Comp"]; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; const _REGISTRY = _$$registry(); -const Comp_1 = _$$component(_REGISTRY, "Comp_1", _props => /*@refresh jsx-skip*/_$ssr(_tmpl$, _$ssrHydrationKey()), { +const Comp_1 = _$$component(_REGISTRY, "Comp_1", _props => /*@refresh jsx-skip*/(() => { + var _v$ = _$ssrHydrationKey(), + _ref$ = _props.v0; + return _$ssr(_tmpl$, _v$); +})(), { location: "example.jsx:4:19", signature: "6f76290" }); @@ -1202,16 +1355,20 @@ if (module.hot) { `; exports[`standard (server, hydratable) > fix build > signals as refs > should work 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; -import { ssrHydrationKey as _$ssrHydrationKey } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; +import { ssrHydrationKey as _$ssrHydrationKey } from "@solidjs/web"; var _tmpl$ = ["Comp"]; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; import { createSignal } from 'solid-js'; const _REGISTRY = _$$registry(); -const Comp_1 = _$$component(_REGISTRY, "Comp_1", _props => /*@refresh jsx-skip*/_$ssr(_tmpl$, _$ssrHydrationKey()), { +const Comp_1 = _$$component(_REGISTRY, "Comp_1", _props => /*@refresh jsx-skip*/(() => { + var _v$ = _$ssrHydrationKey(), + _ref$ = _props.v0; + return _$ssr(_tmpl$, _v$); +})(), { location: "example.jsx:6:19", signature: "6f76290" }); @@ -1237,7 +1394,7 @@ if (module.hot) { `; exports[`standard (server, hydratable) > fix render > @refresh reload > should work 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; import { $$decline as _$$decline } from "solid-refresh"; // @refresh reload import { render } from 'solid-js/web'; @@ -1251,7 +1408,7 @@ if (module.hot) { `; exports[`standard (server, hydratable) > fix render > import specifiers > should work with ImportNamespaceSpecifier 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; @@ -1271,7 +1428,7 @@ if (module.hot) { `; exports[`standard (server, hydratable) > fix render > import specifiers > should work with ImportSpecifier + Identifier 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; @@ -1291,7 +1448,7 @@ if (module.hot) { `; exports[`standard (server, hydratable) > fix render > import specifiers > should work with ImportSpecifier + aliased Identifier 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; @@ -1311,7 +1468,7 @@ if (module.hot) { `; exports[`standard (server, hydratable) > fix render > import specifiers > should work with ImportSpecifier + aliased Identifier from StringLiteral 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; @@ -1331,7 +1488,7 @@ if (module.hot) { `; exports[`standard (server, hydratable) > fix render > top-level statements > should work with IfStatement 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; diff --git a/tests/server-hydratable/__snapshots__/vite.test.ts.snap b/tests/server-hydratable/__snapshots__/vite.test.ts.snap index 51d8497..ec1ead1 100644 --- a/tests/server-hydratable/__snapshots__/vite.test.ts.snap +++ b/tests/server-hydratable/__snapshots__/vite.test.ts.snap @@ -34,12 +34,15 @@ if (import.meta.hot) { `; exports[`vite (server, hydratable) > ExportDefaultDeclaration w/ FunctionExpression > should skip ExportDefaultDeclaration w/ FunctionExpression with @refresh reload 1`] = ` -"import { ssr as _$ssr } from "solid-js/web"; -import { ssrHydrationKey as _$ssrHydrationKey } from "solid-js/web"; +"import { ssr as _$ssr } from "@solidjs/web"; +import { ssrHydrationKey as _$ssrHydrationKey } from "@solidjs/web"; var _tmpl$ = ["Foo"]; // @refresh reload export default function Foo() { - return _$ssr(_tmpl$, _$ssrHydrationKey()); + return (() => { + var _v$ = _$ssrHydrationKey(); + return _$ssr(_tmpl$, _v$); + })(); } if (import.meta.hot) { import.meta.hot.accept(() => import.meta.hot.invalidate()); @@ -47,25 +50,31 @@ if (import.meta.hot) { `; exports[`vite (server, hydratable) > ExportDefaultDeclaration w/ FunctionExpression > should skip ExportDefaultDeclaration w/ FunctionExpression with @refresh skip 1`] = ` -"import { ssr as _$ssr } from "solid-js/web"; -import { ssrHydrationKey as _$ssrHydrationKey } from "solid-js/web"; +"import { ssr as _$ssr } from "@solidjs/web"; +import { ssrHydrationKey as _$ssrHydrationKey } from "@solidjs/web"; var _tmpl$ = ["Foo"]; // @refresh skip export default function Foo() { - return _$ssr(_tmpl$, _$ssrHydrationKey()); + return (() => { + var _v$ = _$ssrHydrationKey(); + return _$ssr(_tmpl$, _v$); + })(); }" `; exports[`vite (server, hydratable) > ExportDefaultDeclaration w/ FunctionExpression > should skip ExportDefaultDeclaration w/ FunctionExpression with invalid Component name 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; -import { ssrHydrationKey as _$ssrHydrationKey } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; +import { ssrHydrationKey as _$ssrHydrationKey } from "@solidjs/web"; var _tmpl$ = ["Foo"]; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; const _REGISTRY = _$$registry(); -const JSX_foo_1 = _$$component(_REGISTRY, "JSX_foo_1", _props => /*@refresh jsx-skip*/_$ssr(_tmpl$, _$ssrHydrationKey()), { +const JSX_foo_1 = _$$component(_REGISTRY, "JSX_foo_1", _props => /*@refresh jsx-skip*/(() => { + var _v$ = _$ssrHydrationKey(); + return _$ssr(_tmpl$, _v$); +})(), { location: "example.jsx:3:15", signature: "4b145a58" }); @@ -79,15 +88,18 @@ if (import.meta.hot) { `; exports[`vite (server, hydratable) > ExportDefaultDeclaration w/ FunctionExpression > should skip ExportDefaultDeclaration w/ FunctionExpression with valid Component name and >1 params 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; -import { ssrHydrationKey as _$ssrHydrationKey } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; +import { ssrHydrationKey as _$ssrHydrationKey } from "@solidjs/web"; var _tmpl$ = ["Foo"]; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; const _REGISTRY = _$$registry(); -const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/_$ssr(_tmpl$, _$ssrHydrationKey()), { +const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/(() => { + var _v$ = _$ssrHydrationKey(); + return _$ssr(_tmpl$, _v$); +})(), { location: "example.jsx:3:15", signature: "4b145a58" }); @@ -101,15 +113,18 @@ if (import.meta.hot) { `; exports[`vite (server, hydratable) > ExportDefaultDeclaration w/ FunctionExpression > should transform ExportDefaultDeclaration w/ FunctionExpression with valid Component name and params 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; -import { ssrHydrationKey as _$ssrHydrationKey } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; +import { ssrHydrationKey as _$ssrHydrationKey } from "@solidjs/web"; var _tmpl$ = ["Foo"]; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; const _REGISTRY = _$$registry(); -const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/_$ssr(_tmpl$, _$ssrHydrationKey()), { +const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/(() => { + var _v$ = _$ssrHydrationKey(); + return _$ssr(_tmpl$, _v$); +})(), { location: "example.jsx:3:15", signature: "4b145a58" }); @@ -127,15 +142,18 @@ if (import.meta.hot) { `; exports[`vite (server, hydratable) > ExportDefaultDeclaration w/ FunctionExpression > should transform ExportDefaultDeclaration w/ FunctionExpression with valid Component name and params 2`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; -import { ssrHydrationKey as _$ssrHydrationKey } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; +import { ssrHydrationKey as _$ssrHydrationKey } from "@solidjs/web"; var _tmpl$ = ["Foo"]; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; const _REGISTRY = _$$registry(); -const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/_$ssr(_tmpl$, _$ssrHydrationKey()), { +const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/(() => { + var _v$ = _$ssrHydrationKey(); + return _$ssr(_tmpl$, _v$); +})(), { location: "example.jsx:3:15", signature: "4b145a58" }); @@ -153,16 +171,21 @@ if (import.meta.hot) { `; exports[`vite (server, hydratable) > ExportDefaultDeclaration w/ FunctionExpression > should transform ExportDefaultDeclaration w/ FunctionExpression with valid Component name and params 3`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; -import { escape as _$escape } from "solid-js/web"; -import { ssrHydrationKey as _$ssrHydrationKey } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; +import { ssrRunInScope as _$ssrRunInScope } from "@solidjs/web"; +import { escape as _$escape } from "@solidjs/web"; +import { ssrHydrationKey as _$ssrHydrationKey } from "@solidjs/web"; var _tmpl$ = ["", ""]; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; const _REGISTRY = _$$registry(); -const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/_$ssr(_tmpl$, _$ssrHydrationKey(), _$escape(_props.v0)), { +const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/(() => { + var _v$ = _$ssrHydrationKey(), + _v$2 = _$ssrRunInScope(() => _$escape(_props.v0)); + return _$ssr(_tmpl$, _v$, _v$2); +})(), { location: "example.jsx:4:15", signature: "ae0f2a31" }); @@ -186,7 +209,7 @@ if (import.meta.hot) { `; exports[`vite (server, hydratable) > ExportDefaultDeclaration w/ FunctionExpression > should transform ExportDefaultDeclaration w/ FunctionExpression with valid Component name and params 4`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; @@ -219,16 +242,19 @@ if (import.meta.hot) { `; exports[`vite (server, hydratable) > ExportDefaultDeclaration w/ FunctionExpression > should transform ExportDefaultDeclaration w/ FunctionExpression with valid Component name and params 5`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; -import { ssrHydrationKey as _$ssrHydrationKey } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; +import { ssrHydrationKey as _$ssrHydrationKey } from "@solidjs/web"; var _tmpl$ = ["foo"], _tmpl$2 = ["bar"]; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; const _REGISTRY = _$$registry(); -const Foo_1_1 = _$$component(_REGISTRY, "Foo_1_1", _props3 => /*@refresh jsx-skip*/_$ssr(_tmpl$, _$ssrHydrationKey()), { +const Foo_1_1 = _$$component(_REGISTRY, "Foo_1_1", _props3 => /*@refresh jsx-skip*/(() => { + var _v$ = _$ssrHydrationKey(); + return _$ssr(_tmpl$, _v$); +})(), { location: "example.jsx:8:12", signature: "241c14a4" }); @@ -246,7 +272,10 @@ const Foo = _$$component(_REGISTRY, "Foo", function Foo() { location: "example.jsx:5:21", signature: "c963b907" }); -const Bar_1 = _$$component(_REGISTRY, "Bar_1", _props2 => /*@refresh jsx-skip*/_$ssr(_tmpl$2, _$ssrHydrationKey()), { +const Bar_1 = _$$component(_REGISTRY, "Bar_1", _props2 => /*@refresh jsx-skip*/(() => { + var _v$2 = _$ssrHydrationKey(); + return _$ssr(_tmpl$2, _v$2); +})(), { location: "example.jsx:3:15", signature: "fad4daa8" }); @@ -264,12 +293,15 @@ if (import.meta.hot) { `; exports[`vite (server, hydratable) > ExportNamedDeclaration w/ FunctionExpression > should skip ExportNamedDeclaration w/ FunctionExpression with @refresh reload 1`] = ` -"import { ssr as _$ssr } from "solid-js/web"; -import { ssrHydrationKey as _$ssrHydrationKey } from "solid-js/web"; +"import { ssr as _$ssr } from "@solidjs/web"; +import { ssrHydrationKey as _$ssrHydrationKey } from "@solidjs/web"; var _tmpl$ = ["Foo"]; // @refresh reload export function Foo() { - return _$ssr(_tmpl$, _$ssrHydrationKey()); + return (() => { + var _v$ = _$ssrHydrationKey(); + return _$ssr(_tmpl$, _v$); + })(); } if (import.meta.hot) { import.meta.hot.accept(() => import.meta.hot.invalidate()); @@ -277,25 +309,31 @@ if (import.meta.hot) { `; exports[`vite (server, hydratable) > ExportNamedDeclaration w/ FunctionExpression > should skip ExportNamedDeclaration w/ FunctionExpression with @refresh skip 1`] = ` -"import { ssr as _$ssr } from "solid-js/web"; -import { ssrHydrationKey as _$ssrHydrationKey } from "solid-js/web"; +"import { ssr as _$ssr } from "@solidjs/web"; +import { ssrHydrationKey as _$ssrHydrationKey } from "@solidjs/web"; var _tmpl$ = ["Foo"]; // @refresh skip export function Foo() { - return _$ssr(_tmpl$, _$ssrHydrationKey()); + return (() => { + var _v$ = _$ssrHydrationKey(); + return _$ssr(_tmpl$, _v$); + })(); }" `; exports[`vite (server, hydratable) > ExportNamedDeclaration w/ FunctionExpression > should skip ExportNamedDeclaration w/ FunctionExpression with invalid Component name 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; -import { ssrHydrationKey as _$ssrHydrationKey } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; +import { ssrHydrationKey as _$ssrHydrationKey } from "@solidjs/web"; var _tmpl$ = ["Foo"]; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; const _REGISTRY = _$$registry(); -const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/_$ssr(_tmpl$, _$ssrHydrationKey()), { +const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/(() => { + var _v$ = _$ssrHydrationKey(); + return _$ssr(_tmpl$, _v$); +})(), { location: "example.jsx:3:15", signature: "4b145a58" }); @@ -313,15 +351,18 @@ if (import.meta.hot) { `; exports[`vite (server, hydratable) > ExportNamedDeclaration w/ FunctionExpression > should skip ExportNamedDeclaration w/ FunctionExpression with valid Component name and >1 params 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; -import { ssrHydrationKey as _$ssrHydrationKey } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; +import { ssrHydrationKey as _$ssrHydrationKey } from "@solidjs/web"; var _tmpl$ = ["Foo"]; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; const _REGISTRY = _$$registry(); -const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/_$ssr(_tmpl$, _$ssrHydrationKey()), { +const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/(() => { + var _v$ = _$ssrHydrationKey(); + return _$ssr(_tmpl$, _v$); +})(), { location: "example.jsx:3:15", signature: "4b145a58" }); @@ -335,15 +376,18 @@ if (import.meta.hot) { `; exports[`vite (server, hydratable) > ExportNamedDeclaration w/ FunctionExpression > should transform ExportNamedDeclaration w/ FunctionExpression with valid Component name and params 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; -import { ssrHydrationKey as _$ssrHydrationKey } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; +import { ssrHydrationKey as _$ssrHydrationKey } from "@solidjs/web"; var _tmpl$ = ["Foo"]; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; const _REGISTRY = _$$registry(); -const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/_$ssr(_tmpl$, _$ssrHydrationKey()), { +const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/(() => { + var _v$ = _$ssrHydrationKey(); + return _$ssr(_tmpl$, _v$); +})(), { location: "example.jsx:3:15", signature: "4b145a58" }); @@ -361,15 +405,18 @@ if (import.meta.hot) { `; exports[`vite (server, hydratable) > ExportNamedDeclaration w/ FunctionExpression > should transform ExportNamedDeclaration w/ FunctionExpression with valid Component name and params 2`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; -import { ssrHydrationKey as _$ssrHydrationKey } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; +import { ssrHydrationKey as _$ssrHydrationKey } from "@solidjs/web"; var _tmpl$ = ["Foo"]; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; const _REGISTRY = _$$registry(); -const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/_$ssr(_tmpl$, _$ssrHydrationKey()), { +const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/(() => { + var _v$ = _$ssrHydrationKey(); + return _$ssr(_tmpl$, _v$); +})(), { location: "example.jsx:3:15", signature: "4b145a58" }); @@ -387,16 +434,21 @@ if (import.meta.hot) { `; exports[`vite (server, hydratable) > ExportNamedDeclaration w/ FunctionExpression > should transform ExportNamedDeclaration w/ FunctionExpression with valid Component name and params 3`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; -import { escape as _$escape } from "solid-js/web"; -import { ssrHydrationKey as _$ssrHydrationKey } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; +import { ssrRunInScope as _$ssrRunInScope } from "@solidjs/web"; +import { escape as _$escape } from "@solidjs/web"; +import { ssrHydrationKey as _$ssrHydrationKey } from "@solidjs/web"; var _tmpl$ = ["", ""]; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; const _REGISTRY = _$$registry(); -const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/_$ssr(_tmpl$, _$ssrHydrationKey(), _$escape(_props.v0)), { +const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/(() => { + var _v$ = _$ssrHydrationKey(), + _v$2 = _$ssrRunInScope(() => _$escape(_props.v0)); + return _$ssr(_tmpl$, _v$, _v$2); +})(), { location: "example.jsx:4:15", signature: "ae0f2a31" }); @@ -420,7 +472,7 @@ if (import.meta.hot) { `; exports[`vite (server, hydratable) > ExportNamedDeclaration w/ FunctionExpression > should transform ExportNamedDeclaration w/ FunctionExpression with valid Component name and params 4`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; @@ -453,16 +505,19 @@ if (import.meta.hot) { `; exports[`vite (server, hydratable) > ExportNamedDeclaration w/ FunctionExpression > should transform ExportNamedDeclaration w/ FunctionExpression with valid Component name and params 5`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; -import { ssrHydrationKey as _$ssrHydrationKey } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; +import { ssrHydrationKey as _$ssrHydrationKey } from "@solidjs/web"; var _tmpl$ = ["bar"], _tmpl$2 = ["foo"]; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; const _REGISTRY = _$$registry(); -const Bar_1 = _$$component(_REGISTRY, "Bar_1", _props => /*@refresh jsx-skip*/_$ssr(_tmpl$, _$ssrHydrationKey()), { +const Bar_1 = _$$component(_REGISTRY, "Bar_1", _props => /*@refresh jsx-skip*/(() => { + var _v$ = _$ssrHydrationKey(); + return _$ssr(_tmpl$, _v$); +})(), { location: "example.jsx:3:15", signature: "61dd3182" }); @@ -472,7 +527,10 @@ const Bar = _$$component(_REGISTRY, "Bar", function Bar() { location: "example.jsx:2:13", signature: "e93ca257" }); -const Foo_1_1 = _$$component(_REGISTRY, "Foo_1_1", _props3 => /*@refresh jsx-skip*/_$ssr(_tmpl$2, _$ssrHydrationKey()), { +const Foo_1_1 = _$$component(_REGISTRY, "Foo_1_1", _props3 => /*@refresh jsx-skip*/(() => { + var _v$2 = _$ssrHydrationKey(); + return _$ssr(_tmpl$2, _v$2); +})(), { location: "example.jsx:8:12", signature: "241c14a4" }); @@ -499,12 +557,15 @@ if (import.meta.hot) { `; exports[`vite (server, hydratable) > FunctionDeclaration > should skip FunctionDeclaration with @refresh reload 1`] = ` -"import { ssr as _$ssr } from "solid-js/web"; -import { ssrHydrationKey as _$ssrHydrationKey } from "solid-js/web"; +"import { ssr as _$ssr } from "@solidjs/web"; +import { ssrHydrationKey as _$ssrHydrationKey } from "@solidjs/web"; var _tmpl$ = ["Foo"]; // @refresh reload function Foo() { - return _$ssr(_tmpl$, _$ssrHydrationKey()); + return (() => { + var _v$ = _$ssrHydrationKey(); + return _$ssr(_tmpl$, _v$); + })(); } if (import.meta.hot) { import.meta.hot.accept(() => import.meta.hot.invalidate()); @@ -512,25 +573,31 @@ if (import.meta.hot) { `; exports[`vite (server, hydratable) > FunctionDeclaration > should skip FunctionDeclaration with @refresh skip 1`] = ` -"import { ssr as _$ssr } from "solid-js/web"; -import { ssrHydrationKey as _$ssrHydrationKey } from "solid-js/web"; +"import { ssr as _$ssr } from "@solidjs/web"; +import { ssrHydrationKey as _$ssrHydrationKey } from "@solidjs/web"; var _tmpl$ = ["Foo"]; // @refresh skip function Foo() { - return _$ssr(_tmpl$, _$ssrHydrationKey()); + return (() => { + var _v$ = _$ssrHydrationKey(); + return _$ssr(_tmpl$, _v$); + })(); }" `; exports[`vite (server, hydratable) > FunctionDeclaration > should skip FunctionDeclaration with invalid Component name 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; -import { ssrHydrationKey as _$ssrHydrationKey } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; +import { ssrHydrationKey as _$ssrHydrationKey } from "@solidjs/web"; var _tmpl$ = ["Foo"]; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; const _REGISTRY = _$$registry(); -const JSX_foo_1 = _$$component(_REGISTRY, "JSX_foo_1", _props => /*@refresh jsx-skip*/_$ssr(_tmpl$, _$ssrHydrationKey()), { +const JSX_foo_1 = _$$component(_REGISTRY, "JSX_foo_1", _props => /*@refresh jsx-skip*/(() => { + var _v$ = _$ssrHydrationKey(); + return _$ssr(_tmpl$, _v$); +})(), { location: "example.jsx:3:15", signature: "4b145a58" }); @@ -544,15 +611,18 @@ if (import.meta.hot) { `; exports[`vite (server, hydratable) > FunctionDeclaration > should skip FunctionDeclaration with valid Component name and >1 params 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; -import { ssrHydrationKey as _$ssrHydrationKey } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; +import { ssrHydrationKey as _$ssrHydrationKey } from "@solidjs/web"; var _tmpl$ = ["Foo"]; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; const _REGISTRY = _$$registry(); -const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/_$ssr(_tmpl$, _$ssrHydrationKey()), { +const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/(() => { + var _v$ = _$ssrHydrationKey(); + return _$ssr(_tmpl$, _v$); +})(), { location: "example.jsx:3:15", signature: "4b145a58" }); @@ -566,15 +636,18 @@ if (import.meta.hot) { `; exports[`vite (server, hydratable) > FunctionDeclaration > should transform FunctionDeclaration with valid Component name and params 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; -import { ssrHydrationKey as _$ssrHydrationKey } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; +import { ssrHydrationKey as _$ssrHydrationKey } from "@solidjs/web"; var _tmpl$ = ["Foo"]; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; const _REGISTRY = _$$registry(); -const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/_$ssr(_tmpl$, _$ssrHydrationKey()), { +const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/(() => { + var _v$ = _$ssrHydrationKey(); + return _$ssr(_tmpl$, _v$); +})(), { location: "example.jsx:3:15", signature: "4b145a58" }); @@ -591,15 +664,18 @@ if (import.meta.hot) { `; exports[`vite (server, hydratable) > FunctionDeclaration > should transform FunctionDeclaration with valid Component name and params 2`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; -import { ssrHydrationKey as _$ssrHydrationKey } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; +import { ssrHydrationKey as _$ssrHydrationKey } from "@solidjs/web"; var _tmpl$ = ["Foo"]; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; const _REGISTRY = _$$registry(); -const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/_$ssr(_tmpl$, _$ssrHydrationKey()), { +const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/(() => { + var _v$ = _$ssrHydrationKey(); + return _$ssr(_tmpl$, _v$); +})(), { location: "example.jsx:3:15", signature: "4b145a58" }); @@ -616,16 +692,21 @@ if (import.meta.hot) { `; exports[`vite (server, hydratable) > FunctionDeclaration > should transform FunctionDeclaration with valid Component name and params 3`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; -import { escape as _$escape } from "solid-js/web"; -import { ssrHydrationKey as _$ssrHydrationKey } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; +import { ssrRunInScope as _$ssrRunInScope } from "@solidjs/web"; +import { escape as _$escape } from "@solidjs/web"; +import { ssrHydrationKey as _$ssrHydrationKey } from "@solidjs/web"; var _tmpl$ = ["", ""]; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; const _REGISTRY = _$$registry(); -const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/_$ssr(_tmpl$, _$ssrHydrationKey(), _$escape(_props.v0)), { +const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/(() => { + var _v$ = _$ssrHydrationKey(), + _v$2 = _$ssrRunInScope(() => _$escape(_props.v0)); + return _$ssr(_tmpl$, _v$, _v$2); +})(), { location: "example.jsx:4:15", signature: "ae0f2a31" }); @@ -648,7 +729,7 @@ if (import.meta.hot) { `; exports[`vite (server, hydratable) > FunctionDeclaration > should transform FunctionDeclaration with valid Component name and params 4`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; @@ -680,16 +761,19 @@ if (import.meta.hot) { `; exports[`vite (server, hydratable) > FunctionDeclaration > should transform FunctionDeclaration with valid Component name and params 5`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; -import { ssrHydrationKey as _$ssrHydrationKey } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; +import { ssrHydrationKey as _$ssrHydrationKey } from "@solidjs/web"; var _tmpl$ = ["foo"], _tmpl$2 = ["bar"]; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; const _REGISTRY = _$$registry(); -const Foo_1_1 = _$$component(_REGISTRY, "Foo_1_1", _props3 => /*@refresh jsx-skip*/_$ssr(_tmpl$, _$ssrHydrationKey()), { +const Foo_1_1 = _$$component(_REGISTRY, "Foo_1_1", _props3 => /*@refresh jsx-skip*/(() => { + var _v$ = _$ssrHydrationKey(); + return _$ssr(_tmpl$, _v$); +})(), { location: "example.jsx:8:12", signature: "241c14a4" }); @@ -707,7 +791,10 @@ const Foo = _$$component(_REGISTRY, "Foo", function Foo() { location: "example.jsx:5:6", signature: "c963b907" }); -const Bar_1 = _$$component(_REGISTRY, "Bar_1", _props2 => /*@refresh jsx-skip*/_$ssr(_tmpl$2, _$ssrHydrationKey()), { +const Bar_1 = _$$component(_REGISTRY, "Bar_1", _props2 => /*@refresh jsx-skip*/(() => { + var _v$2 = _$ssrHydrationKey(); + return _$ssr(_tmpl$2, _v$2); +})(), { location: "example.jsx:3:15", signature: "fad4daa8" }); @@ -724,12 +811,15 @@ if (import.meta.hot) { `; exports[`vite (server, hydratable) > VariableDeclarator > ArrowFunctionExpression > should skip VariableDeclarator w/ ArrowFunctionExpression with @refresh reload 1`] = ` -"import { ssr as _$ssr } from "solid-js/web"; -import { ssrHydrationKey as _$ssrHydrationKey } from "solid-js/web"; +"import { ssr as _$ssr } from "@solidjs/web"; +import { ssrHydrationKey as _$ssrHydrationKey } from "@solidjs/web"; var _tmpl$ = ["Foo"]; // @refresh reload const Foo = () => { - return _$ssr(_tmpl$, _$ssrHydrationKey()); + return (() => { + var _v$ = _$ssrHydrationKey(); + return _$ssr(_tmpl$, _v$); + })(); }; if (import.meta.hot) { import.meta.hot.accept(() => import.meta.hot.invalidate()); @@ -737,25 +827,31 @@ if (import.meta.hot) { `; exports[`vite (server, hydratable) > VariableDeclarator > ArrowFunctionExpression > should skip VariableDeclarator w/ ArrowFunctionExpression with @refresh skip 1`] = ` -"import { ssr as _$ssr } from "solid-js/web"; -import { ssrHydrationKey as _$ssrHydrationKey } from "solid-js/web"; +"import { ssr as _$ssr } from "@solidjs/web"; +import { ssrHydrationKey as _$ssrHydrationKey } from "@solidjs/web"; var _tmpl$ = ["Foo"]; // @refresh skip const Foo = () => { - return _$ssr(_tmpl$, _$ssrHydrationKey()); + return (() => { + var _v$ = _$ssrHydrationKey(); + return _$ssr(_tmpl$, _v$); + })(); };" `; exports[`vite (server, hydratable) > VariableDeclarator > ArrowFunctionExpression > should skip VariableDeclarator w/ ArrowFunctionExpression with invalid Component name 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; -import { ssrHydrationKey as _$ssrHydrationKey } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; +import { ssrHydrationKey as _$ssrHydrationKey } from "@solidjs/web"; var _tmpl$ = ["Foo"]; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; const _REGISTRY = _$$registry(); -const JSX_foo_1 = _$$component(_REGISTRY, "JSX_foo_1", _props => /*@refresh jsx-skip*/_$ssr(_tmpl$, _$ssrHydrationKey()), { +const JSX_foo_1 = _$$component(_REGISTRY, "JSX_foo_1", _props => /*@refresh jsx-skip*/(() => { + var _v$ = _$ssrHydrationKey(); + return _$ssr(_tmpl$, _v$); +})(), { location: "example.jsx:3:17", signature: "4b145a58" }); @@ -769,15 +865,18 @@ if (import.meta.hot) { `; exports[`vite (server, hydratable) > VariableDeclarator > ArrowFunctionExpression > should skip VariableDeclarator w/ ArrowFunctionExpression with valid Component name and >1 params 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; -import { ssrHydrationKey as _$ssrHydrationKey } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; +import { ssrHydrationKey as _$ssrHydrationKey } from "@solidjs/web"; var _tmpl$ = ["Foo"]; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; const _REGISTRY = _$$registry(); -const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/_$ssr(_tmpl$, _$ssrHydrationKey()), { +const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/(() => { + var _v$ = _$ssrHydrationKey(); + return _$ssr(_tmpl$, _v$); +})(), { location: "example.jsx:3:17", signature: "4b145a58" }); @@ -791,15 +890,18 @@ if (import.meta.hot) { `; exports[`vite (server, hydratable) > VariableDeclarator > ArrowFunctionExpression > should transform VariableDeclarator w/ ArrowFunctionExpression with valid Component name and params 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; -import { ssrHydrationKey as _$ssrHydrationKey } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; +import { ssrHydrationKey as _$ssrHydrationKey } from "@solidjs/web"; var _tmpl$ = ["Foo"]; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; const _REGISTRY = _$$registry(); -const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/_$ssr(_tmpl$, _$ssrHydrationKey()), { +const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/(() => { + var _v$ = _$ssrHydrationKey(); + return _$ssr(_tmpl$, _v$); +})(), { location: "example.jsx:3:17", signature: "4b145a58" }); @@ -816,15 +918,18 @@ if (import.meta.hot) { `; exports[`vite (server, hydratable) > VariableDeclarator > ArrowFunctionExpression > should transform VariableDeclarator w/ ArrowFunctionExpression with valid Component name and params 2`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; -import { ssrHydrationKey as _$ssrHydrationKey } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; +import { ssrHydrationKey as _$ssrHydrationKey } from "@solidjs/web"; var _tmpl$ = ["Foo"]; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; const _REGISTRY = _$$registry(); -const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/_$ssr(_tmpl$, _$ssrHydrationKey()), { +const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/(() => { + var _v$ = _$ssrHydrationKey(); + return _$ssr(_tmpl$, _v$); +})(), { location: "example.jsx:3:17", signature: "4b145a58" }); @@ -841,17 +946,22 @@ if (import.meta.hot) { `; exports[`vite (server, hydratable) > VariableDeclarator > ArrowFunctionExpression > should transform VariableDeclarator w/ ArrowFunctionExpression with valid Component name and params 3`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; -import { escape as _$escape } from "solid-js/web"; -import { ssrHydrationKey as _$ssrHydrationKey } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; +import { ssrRunInScope as _$ssrRunInScope } from "@solidjs/web"; +import { escape as _$escape } from "@solidjs/web"; +import { ssrHydrationKey as _$ssrHydrationKey } from "@solidjs/web"; var _tmpl$ = ["", ""]; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; const example = 'Foo'; const _REGISTRY = _$$registry(); -const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/_$ssr(_tmpl$, _$ssrHydrationKey(), _$escape(_props.v0)), { +const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/(() => { + var _v$ = _$ssrHydrationKey(), + _v$2 = _$ssrRunInScope(() => _$escape(_props.v0)); + return _$ssr(_tmpl$, _v$, _v$2); +})(), { location: "example.jsx:4:17", signature: "ae0f2a31" }); @@ -873,7 +983,7 @@ if (import.meta.hot) { `; exports[`vite (server, hydratable) > VariableDeclarator > ArrowFunctionExpression > should transform VariableDeclarator w/ ArrowFunctionExpression with valid Component name and params 4`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; @@ -905,16 +1015,19 @@ if (import.meta.hot) { `; exports[`vite (server, hydratable) > VariableDeclarator > ArrowFunctionExpression > should transform VariableDeclarator w/ ArrowFunctionExpression with valid Component name and params 5`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; -import { ssrHydrationKey as _$ssrHydrationKey } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; +import { ssrHydrationKey as _$ssrHydrationKey } from "@solidjs/web"; var _tmpl$ = ["bar"], _tmpl$2 = ["foo"]; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; const _REGISTRY = _$$registry(); -const Bar_1 = _$$component(_REGISTRY, "Bar_1", _props => /*@refresh jsx-skip*/_$ssr(_tmpl$, _$ssrHydrationKey()), { +const Bar_1 = _$$component(_REGISTRY, "Bar_1", _props => /*@refresh jsx-skip*/(() => { + var _v$ = _$ssrHydrationKey(); + return _$ssr(_tmpl$, _v$); +})(), { location: "example.jsx:3:17", signature: "61dd3182" }); @@ -924,7 +1037,10 @@ const Bar = _$$component(_REGISTRY, "Bar", () => { location: "example.jsx:2:20", signature: "d1c6ca9b" }); -const Foo_1_1 = _$$component(_REGISTRY, "Foo_1_1", _props3 => /*@refresh jsx-skip*/_$ssr(_tmpl$2, _$ssrHydrationKey()), { +const Foo_1_1 = _$$component(_REGISTRY, "Foo_1_1", _props3 => /*@refresh jsx-skip*/(() => { + var _v$2 = _$ssrHydrationKey(); + return _$ssr(_tmpl$2, _v$2); +})(), { location: "example.jsx:8:14", signature: "241c14a4" }); @@ -949,12 +1065,15 @@ if (import.meta.hot) { `; exports[`vite (server, hydratable) > VariableDeclarator > FunctionExpression > should skip VariableDeclarator w/ FunctionExpression with @refresh reload 1`] = ` -"import { ssr as _$ssr } from "solid-js/web"; -import { ssrHydrationKey as _$ssrHydrationKey } from "solid-js/web"; +"import { ssr as _$ssr } from "@solidjs/web"; +import { ssrHydrationKey as _$ssrHydrationKey } from "@solidjs/web"; var _tmpl$ = ["Foo"]; // @refresh reload const Foo = function () { - return _$ssr(_tmpl$, _$ssrHydrationKey()); + return (() => { + var _v$ = _$ssrHydrationKey(); + return _$ssr(_tmpl$, _v$); + })(); }; if (import.meta.hot) { import.meta.hot.accept(() => import.meta.hot.invalidate()); @@ -962,25 +1081,31 @@ if (import.meta.hot) { `; exports[`vite (server, hydratable) > VariableDeclarator > FunctionExpression > should skip VariableDeclarator w/ FunctionExpression with @refresh skip 1`] = ` -"import { ssr as _$ssr } from "solid-js/web"; -import { ssrHydrationKey as _$ssrHydrationKey } from "solid-js/web"; +"import { ssr as _$ssr } from "@solidjs/web"; +import { ssrHydrationKey as _$ssrHydrationKey } from "@solidjs/web"; var _tmpl$ = ["Foo"]; // @refresh skip const Foo = function () { - return _$ssr(_tmpl$, _$ssrHydrationKey()); + return (() => { + var _v$ = _$ssrHydrationKey(); + return _$ssr(_tmpl$, _v$); + })(); };" `; exports[`vite (server, hydratable) > VariableDeclarator > FunctionExpression > should skip VariableDeclarator w/ FunctionExpression with invalid Component name 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; -import { ssrHydrationKey as _$ssrHydrationKey } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; +import { ssrHydrationKey as _$ssrHydrationKey } from "@solidjs/web"; var _tmpl$ = ["Foo"]; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; const _REGISTRY = _$$registry(); -const JSX_foo_1 = _$$component(_REGISTRY, "JSX_foo_1", _props => /*@refresh jsx-skip*/_$ssr(_tmpl$, _$ssrHydrationKey()), { +const JSX_foo_1 = _$$component(_REGISTRY, "JSX_foo_1", _props => /*@refresh jsx-skip*/(() => { + var _v$ = _$ssrHydrationKey(); + return _$ssr(_tmpl$, _v$); +})(), { location: "example.jsx:3:17", signature: "4b145a58" }); @@ -994,15 +1119,18 @@ if (import.meta.hot) { `; exports[`vite (server, hydratable) > VariableDeclarator > FunctionExpression > should skip VariableDeclarator w/ FunctionExpression with valid Component name and >1 params 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; -import { ssrHydrationKey as _$ssrHydrationKey } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; +import { ssrHydrationKey as _$ssrHydrationKey } from "@solidjs/web"; var _tmpl$ = ["Foo"]; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; const _REGISTRY = _$$registry(); -const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/_$ssr(_tmpl$, _$ssrHydrationKey()), { +const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/(() => { + var _v$ = _$ssrHydrationKey(); + return _$ssr(_tmpl$, _v$); +})(), { location: "example.jsx:3:17", signature: "4b145a58" }); @@ -1016,15 +1144,18 @@ if (import.meta.hot) { `; exports[`vite (server, hydratable) > VariableDeclarator > FunctionExpression > should transform VariableDeclarator w/ FunctionExpression with valid Component name and params 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; -import { ssrHydrationKey as _$ssrHydrationKey } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; +import { ssrHydrationKey as _$ssrHydrationKey } from "@solidjs/web"; var _tmpl$ = ["Foo"]; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; const _REGISTRY = _$$registry(); -const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/_$ssr(_tmpl$, _$ssrHydrationKey()), { +const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/(() => { + var _v$ = _$ssrHydrationKey(); + return _$ssr(_tmpl$, _v$); +})(), { location: "example.jsx:3:17", signature: "4b145a58" }); @@ -1041,15 +1172,18 @@ if (import.meta.hot) { `; exports[`vite (server, hydratable) > VariableDeclarator > FunctionExpression > should transform VariableDeclarator w/ FunctionExpression with valid Component name and params 2`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; -import { ssrHydrationKey as _$ssrHydrationKey } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; +import { ssrHydrationKey as _$ssrHydrationKey } from "@solidjs/web"; var _tmpl$ = ["Foo"]; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; const _REGISTRY = _$$registry(); -const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/_$ssr(_tmpl$, _$ssrHydrationKey()), { +const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/(() => { + var _v$ = _$ssrHydrationKey(); + return _$ssr(_tmpl$, _v$); +})(), { location: "example.jsx:3:17", signature: "4b145a58" }); @@ -1066,17 +1200,22 @@ if (import.meta.hot) { `; exports[`vite (server, hydratable) > VariableDeclarator > FunctionExpression > should transform VariableDeclarator w/ FunctionExpression with valid Component name and params 3`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; -import { escape as _$escape } from "solid-js/web"; -import { ssrHydrationKey as _$ssrHydrationKey } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; +import { ssrRunInScope as _$ssrRunInScope } from "@solidjs/web"; +import { escape as _$escape } from "@solidjs/web"; +import { ssrHydrationKey as _$ssrHydrationKey } from "@solidjs/web"; var _tmpl$ = ["", ""]; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; const example = 'Foo'; const _REGISTRY = _$$registry(); -const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/_$ssr(_tmpl$, _$ssrHydrationKey(), _$escape(_props.v0)), { +const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/(() => { + var _v$ = _$ssrHydrationKey(), + _v$2 = _$ssrRunInScope(() => _$escape(_props.v0)); + return _$ssr(_tmpl$, _v$, _v$2); +})(), { location: "example.jsx:4:17", signature: "ae0f2a31" }); @@ -1098,7 +1237,7 @@ if (import.meta.hot) { `; exports[`vite (server, hydratable) > VariableDeclarator > FunctionExpression > should transform VariableDeclarator w/ FunctionExpression with valid Component name and params 4`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; @@ -1130,16 +1269,19 @@ if (import.meta.hot) { `; exports[`vite (server, hydratable) > VariableDeclarator > FunctionExpression > should transform VariableDeclarator w/ FunctionExpression with valid Component name and params 5`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; -import { ssrHydrationKey as _$ssrHydrationKey } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; +import { ssrHydrationKey as _$ssrHydrationKey } from "@solidjs/web"; var _tmpl$ = ["bar"], _tmpl$2 = ["foo"]; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; const _REGISTRY = _$$registry(); -const Bar_1 = _$$component(_REGISTRY, "Bar_1", _props => /*@refresh jsx-skip*/_$ssr(_tmpl$, _$ssrHydrationKey()), { +const Bar_1 = _$$component(_REGISTRY, "Bar_1", _props => /*@refresh jsx-skip*/(() => { + var _v$ = _$ssrHydrationKey(); + return _$ssr(_tmpl$, _v$); +})(), { location: "example.jsx:3:17", signature: "61dd3182" }); @@ -1149,7 +1291,10 @@ const Bar = _$$component(_REGISTRY, "Bar", function () { location: "example.jsx:2:20", signature: "1fb34faa" }); -const Foo_1_1 = _$$component(_REGISTRY, "Foo_1_1", _props3 => /*@refresh jsx-skip*/_$ssr(_tmpl$2, _$ssrHydrationKey()), { +const Foo_1_1 = _$$component(_REGISTRY, "Foo_1_1", _props3 => /*@refresh jsx-skip*/(() => { + var _v$2 = _$ssrHydrationKey(); + return _$ssr(_tmpl$2, _v$2); +})(), { location: "example.jsx:8:14", signature: "241c14a4" }); @@ -1174,15 +1319,19 @@ if (import.meta.hot) { `; exports[`vite (server, hydratable) > fix build > refs > should work with a function 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; -import { ssrHydrationKey as _$ssrHydrationKey } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; +import { ssrHydrationKey as _$ssrHydrationKey } from "@solidjs/web"; var _tmpl$ = ["Comp"]; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; const _REGISTRY = _$$registry(); -const Comp_1 = _$$component(_REGISTRY, "Comp_1", _props => /*@refresh jsx-skip*/_$ssr(_tmpl$, _$ssrHydrationKey()), { +const Comp_1 = _$$component(_REGISTRY, "Comp_1", _props => /*@refresh jsx-skip*/(() => { + var _v$ = _$ssrHydrationKey(), + _ref$ = _props.v0; + return _$ssr(_tmpl$, _v$); +})(), { location: "example.jsx:4:19", signature: "6f76290" }); @@ -1202,15 +1351,19 @@ if (import.meta.hot) { `; exports[`vite (server, hydratable) > fix build > refs > should work with a mutable variable 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; -import { ssrHydrationKey as _$ssrHydrationKey } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; +import { ssrHydrationKey as _$ssrHydrationKey } from "@solidjs/web"; var _tmpl$ = ["Comp"]; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; const _REGISTRY = _$$registry(); -const Comp_1 = _$$component(_REGISTRY, "Comp_1", _props => /*@refresh jsx-skip*/_$ssr(_tmpl$, _$ssrHydrationKey()), { +const Comp_1 = _$$component(_REGISTRY, "Comp_1", _props => /*@refresh jsx-skip*/(() => { + var _v$ = _$ssrHydrationKey(), + _ref$ = _props.v0; + return _$ssr(_tmpl$, _v$); +})(), { location: "example.jsx:4:19", signature: "6f76290" }); @@ -1236,16 +1389,20 @@ if (import.meta.hot) { `; exports[`vite (server, hydratable) > fix build > signals as refs > should work 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; -import { ssrHydrationKey as _$ssrHydrationKey } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; +import { ssrHydrationKey as _$ssrHydrationKey } from "@solidjs/web"; var _tmpl$ = ["Comp"]; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; import { createSignal } from 'solid-js'; const _REGISTRY = _$$registry(); -const Comp_1 = _$$component(_REGISTRY, "Comp_1", _props => /*@refresh jsx-skip*/_$ssr(_tmpl$, _$ssrHydrationKey()), { +const Comp_1 = _$$component(_REGISTRY, "Comp_1", _props => /*@refresh jsx-skip*/(() => { + var _v$ = _$ssrHydrationKey(), + _ref$ = _props.v0; + return _$ssr(_tmpl$, _v$); +})(), { location: "example.jsx:6:19", signature: "6f76290" }); @@ -1272,7 +1429,7 @@ if (import.meta.hot) { `; exports[`vite (server, hydratable) > fix render > @refresh reload > should work 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; // @refresh reload import { render } from 'solid-js/web'; if (root) { @@ -1285,7 +1442,7 @@ if (import.meta.hot) { `; exports[`vite (server, hydratable) > fix render > import specifiers > should work with ImportNamespaceSpecifier 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; @@ -1306,7 +1463,7 @@ if (import.meta.hot) { `; exports[`vite (server, hydratable) > fix render > import specifiers > should work with ImportSpecifier + Identifier 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; @@ -1327,7 +1484,7 @@ if (import.meta.hot) { `; exports[`vite (server, hydratable) > fix render > import specifiers > should work with ImportSpecifier + aliased Identifier 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; @@ -1348,7 +1505,7 @@ if (import.meta.hot) { `; exports[`vite (server, hydratable) > fix render > import specifiers > should work with ImportSpecifier + aliased Identifier from StringLiteral 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; @@ -1369,7 +1526,7 @@ if (import.meta.hot) { `; exports[`vite (server, hydratable) > fix render > top-level statements > should work with IfStatement 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; diff --git a/tests/server-hydratable/__snapshots__/webpack5.test.ts.snap b/tests/server-hydratable/__snapshots__/webpack5.test.ts.snap index 1770038..eb69d51 100644 --- a/tests/server-hydratable/__snapshots__/webpack5.test.ts.snap +++ b/tests/server-hydratable/__snapshots__/webpack5.test.ts.snap @@ -32,13 +32,16 @@ if (import.meta.webpackHot) { `; exports[`webpack5 (server, hydratable) > ExportDefaultDeclaration w/ FunctionExpression > should skip ExportDefaultDeclaration w/ FunctionExpression with @refresh reload 1`] = ` -"import { ssr as _$ssr } from "solid-js/web"; -import { ssrHydrationKey as _$ssrHydrationKey } from "solid-js/web"; +"import { ssr as _$ssr } from "@solidjs/web"; +import { ssrHydrationKey as _$ssrHydrationKey } from "@solidjs/web"; var _tmpl$ = ["Foo"]; import { $$decline as _$$decline } from "solid-refresh"; // @refresh reload export default function Foo() { - return _$ssr(_tmpl$, _$ssrHydrationKey()); + return (() => { + var _v$ = _$ssrHydrationKey(); + return _$ssr(_tmpl$, _v$); + })(); } if (import.meta.webpackHot) { _$$decline("webpack5", import.meta.webpackHot); @@ -46,25 +49,31 @@ if (import.meta.webpackHot) { `; exports[`webpack5 (server, hydratable) > ExportDefaultDeclaration w/ FunctionExpression > should skip ExportDefaultDeclaration w/ FunctionExpression with @refresh skip 1`] = ` -"import { ssr as _$ssr } from "solid-js/web"; -import { ssrHydrationKey as _$ssrHydrationKey } from "solid-js/web"; +"import { ssr as _$ssr } from "@solidjs/web"; +import { ssrHydrationKey as _$ssrHydrationKey } from "@solidjs/web"; var _tmpl$ = ["Foo"]; // @refresh skip export default function Foo() { - return _$ssr(_tmpl$, _$ssrHydrationKey()); + return (() => { + var _v$ = _$ssrHydrationKey(); + return _$ssr(_tmpl$, _v$); + })(); }" `; exports[`webpack5 (server, hydratable) > ExportDefaultDeclaration w/ FunctionExpression > should skip ExportDefaultDeclaration w/ FunctionExpression with invalid Component name 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; -import { ssrHydrationKey as _$ssrHydrationKey } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; +import { ssrHydrationKey as _$ssrHydrationKey } from "@solidjs/web"; var _tmpl$ = ["Foo"]; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; const _REGISTRY = _$$registry(); -const JSX_foo_1 = _$$component(_REGISTRY, "JSX_foo_1", _props => /*@refresh jsx-skip*/_$ssr(_tmpl$, _$ssrHydrationKey()), { +const JSX_foo_1 = _$$component(_REGISTRY, "JSX_foo_1", _props => /*@refresh jsx-skip*/(() => { + var _v$ = _$ssrHydrationKey(); + return _$ssr(_tmpl$, _v$); +})(), { location: "example.jsx:3:15", signature: "4b145a58" }); @@ -77,15 +86,18 @@ if (import.meta.webpackHot) { `; exports[`webpack5 (server, hydratable) > ExportDefaultDeclaration w/ FunctionExpression > should skip ExportDefaultDeclaration w/ FunctionExpression with valid Component name and >1 params 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; -import { ssrHydrationKey as _$ssrHydrationKey } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; +import { ssrHydrationKey as _$ssrHydrationKey } from "@solidjs/web"; var _tmpl$ = ["Foo"]; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; const _REGISTRY = _$$registry(); -const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/_$ssr(_tmpl$, _$ssrHydrationKey()), { +const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/(() => { + var _v$ = _$ssrHydrationKey(); + return _$ssr(_tmpl$, _v$); +})(), { location: "example.jsx:3:15", signature: "4b145a58" }); @@ -98,15 +110,18 @@ if (import.meta.webpackHot) { `; exports[`webpack5 (server, hydratable) > ExportDefaultDeclaration w/ FunctionExpression > should transform ExportDefaultDeclaration w/ FunctionExpression with valid Component name and params 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; -import { ssrHydrationKey as _$ssrHydrationKey } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; +import { ssrHydrationKey as _$ssrHydrationKey } from "@solidjs/web"; var _tmpl$ = ["Foo"]; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; const _REGISTRY = _$$registry(); -const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/_$ssr(_tmpl$, _$ssrHydrationKey()), { +const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/(() => { + var _v$ = _$ssrHydrationKey(); + return _$ssr(_tmpl$, _v$); +})(), { location: "example.jsx:3:15", signature: "4b145a58" }); @@ -123,15 +138,18 @@ if (import.meta.webpackHot) { `; exports[`webpack5 (server, hydratable) > ExportDefaultDeclaration w/ FunctionExpression > should transform ExportDefaultDeclaration w/ FunctionExpression with valid Component name and params 2`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; -import { ssrHydrationKey as _$ssrHydrationKey } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; +import { ssrHydrationKey as _$ssrHydrationKey } from "@solidjs/web"; var _tmpl$ = ["Foo"]; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; const _REGISTRY = _$$registry(); -const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/_$ssr(_tmpl$, _$ssrHydrationKey()), { +const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/(() => { + var _v$ = _$ssrHydrationKey(); + return _$ssr(_tmpl$, _v$); +})(), { location: "example.jsx:3:15", signature: "4b145a58" }); @@ -148,16 +166,21 @@ if (import.meta.webpackHot) { `; exports[`webpack5 (server, hydratable) > ExportDefaultDeclaration w/ FunctionExpression > should transform ExportDefaultDeclaration w/ FunctionExpression with valid Component name and params 3`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; -import { escape as _$escape } from "solid-js/web"; -import { ssrHydrationKey as _$ssrHydrationKey } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; +import { ssrRunInScope as _$ssrRunInScope } from "@solidjs/web"; +import { escape as _$escape } from "@solidjs/web"; +import { ssrHydrationKey as _$ssrHydrationKey } from "@solidjs/web"; var _tmpl$ = ["", ""]; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; const _REGISTRY = _$$registry(); -const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/_$ssr(_tmpl$, _$ssrHydrationKey(), _$escape(_props.v0)), { +const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/(() => { + var _v$ = _$ssrHydrationKey(), + _v$2 = _$ssrRunInScope(() => _$escape(_props.v0)); + return _$ssr(_tmpl$, _v$, _v$2); +})(), { location: "example.jsx:4:15", signature: "ae0f2a31" }); @@ -180,7 +203,7 @@ if (import.meta.webpackHot) { `; exports[`webpack5 (server, hydratable) > ExportDefaultDeclaration w/ FunctionExpression > should transform ExportDefaultDeclaration w/ FunctionExpression with valid Component name and params 4`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; @@ -212,16 +235,19 @@ if (import.meta.webpackHot) { `; exports[`webpack5 (server, hydratable) > ExportDefaultDeclaration w/ FunctionExpression > should transform ExportDefaultDeclaration w/ FunctionExpression with valid Component name and params 5`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; -import { ssrHydrationKey as _$ssrHydrationKey } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; +import { ssrHydrationKey as _$ssrHydrationKey } from "@solidjs/web"; var _tmpl$ = ["foo"], _tmpl$2 = ["bar"]; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; const _REGISTRY = _$$registry(); -const Foo_1_1 = _$$component(_REGISTRY, "Foo_1_1", _props3 => /*@refresh jsx-skip*/_$ssr(_tmpl$, _$ssrHydrationKey()), { +const Foo_1_1 = _$$component(_REGISTRY, "Foo_1_1", _props3 => /*@refresh jsx-skip*/(() => { + var _v$ = _$ssrHydrationKey(); + return _$ssr(_tmpl$, _v$); +})(), { location: "example.jsx:8:12", signature: "241c14a4" }); @@ -239,7 +265,10 @@ const Foo = _$$component(_REGISTRY, "Foo", function Foo() { location: "example.jsx:5:21", signature: "c963b907" }); -const Bar_1 = _$$component(_REGISTRY, "Bar_1", _props2 => /*@refresh jsx-skip*/_$ssr(_tmpl$2, _$ssrHydrationKey()), { +const Bar_1 = _$$component(_REGISTRY, "Bar_1", _props2 => /*@refresh jsx-skip*/(() => { + var _v$2 = _$ssrHydrationKey(); + return _$ssr(_tmpl$2, _v$2); +})(), { location: "example.jsx:3:15", signature: "fad4daa8" }); @@ -256,13 +285,16 @@ if (import.meta.webpackHot) { `; exports[`webpack5 (server, hydratable) > ExportNamedDeclaration w/ FunctionExpression > should skip ExportNamedDeclaration w/ FunctionExpression with @refresh reload 1`] = ` -"import { ssr as _$ssr } from "solid-js/web"; -import { ssrHydrationKey as _$ssrHydrationKey } from "solid-js/web"; +"import { ssr as _$ssr } from "@solidjs/web"; +import { ssrHydrationKey as _$ssrHydrationKey } from "@solidjs/web"; var _tmpl$ = ["Foo"]; import { $$decline as _$$decline } from "solid-refresh"; // @refresh reload export function Foo() { - return _$ssr(_tmpl$, _$ssrHydrationKey()); + return (() => { + var _v$ = _$ssrHydrationKey(); + return _$ssr(_tmpl$, _v$); + })(); } if (import.meta.webpackHot) { _$$decline("webpack5", import.meta.webpackHot); @@ -270,25 +302,31 @@ if (import.meta.webpackHot) { `; exports[`webpack5 (server, hydratable) > ExportNamedDeclaration w/ FunctionExpression > should skip ExportNamedDeclaration w/ FunctionExpression with @refresh skip 1`] = ` -"import { ssr as _$ssr } from "solid-js/web"; -import { ssrHydrationKey as _$ssrHydrationKey } from "solid-js/web"; +"import { ssr as _$ssr } from "@solidjs/web"; +import { ssrHydrationKey as _$ssrHydrationKey } from "@solidjs/web"; var _tmpl$ = ["Foo"]; // @refresh skip export function Foo() { - return _$ssr(_tmpl$, _$ssrHydrationKey()); + return (() => { + var _v$ = _$ssrHydrationKey(); + return _$ssr(_tmpl$, _v$); + })(); }" `; exports[`webpack5 (server, hydratable) > ExportNamedDeclaration w/ FunctionExpression > should skip ExportNamedDeclaration w/ FunctionExpression with invalid Component name 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; -import { ssrHydrationKey as _$ssrHydrationKey } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; +import { ssrHydrationKey as _$ssrHydrationKey } from "@solidjs/web"; var _tmpl$ = ["Foo"]; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; const _REGISTRY = _$$registry(); -const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/_$ssr(_tmpl$, _$ssrHydrationKey()), { +const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/(() => { + var _v$ = _$ssrHydrationKey(); + return _$ssr(_tmpl$, _v$); +})(), { location: "example.jsx:3:15", signature: "4b145a58" }); @@ -305,15 +343,18 @@ if (import.meta.webpackHot) { `; exports[`webpack5 (server, hydratable) > ExportNamedDeclaration w/ FunctionExpression > should skip ExportNamedDeclaration w/ FunctionExpression with valid Component name and >1 params 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; -import { ssrHydrationKey as _$ssrHydrationKey } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; +import { ssrHydrationKey as _$ssrHydrationKey } from "@solidjs/web"; var _tmpl$ = ["Foo"]; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; const _REGISTRY = _$$registry(); -const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/_$ssr(_tmpl$, _$ssrHydrationKey()), { +const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/(() => { + var _v$ = _$ssrHydrationKey(); + return _$ssr(_tmpl$, _v$); +})(), { location: "example.jsx:3:15", signature: "4b145a58" }); @@ -326,15 +367,18 @@ if (import.meta.webpackHot) { `; exports[`webpack5 (server, hydratable) > ExportNamedDeclaration w/ FunctionExpression > should transform ExportNamedDeclaration w/ FunctionExpression with valid Component name and params 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; -import { ssrHydrationKey as _$ssrHydrationKey } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; +import { ssrHydrationKey as _$ssrHydrationKey } from "@solidjs/web"; var _tmpl$ = ["Foo"]; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; const _REGISTRY = _$$registry(); -const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/_$ssr(_tmpl$, _$ssrHydrationKey()), { +const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/(() => { + var _v$ = _$ssrHydrationKey(); + return _$ssr(_tmpl$, _v$); +})(), { location: "example.jsx:3:15", signature: "4b145a58" }); @@ -351,15 +395,18 @@ if (import.meta.webpackHot) { `; exports[`webpack5 (server, hydratable) > ExportNamedDeclaration w/ FunctionExpression > should transform ExportNamedDeclaration w/ FunctionExpression with valid Component name and params 2`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; -import { ssrHydrationKey as _$ssrHydrationKey } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; +import { ssrHydrationKey as _$ssrHydrationKey } from "@solidjs/web"; var _tmpl$ = ["Foo"]; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; const _REGISTRY = _$$registry(); -const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/_$ssr(_tmpl$, _$ssrHydrationKey()), { +const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/(() => { + var _v$ = _$ssrHydrationKey(); + return _$ssr(_tmpl$, _v$); +})(), { location: "example.jsx:3:15", signature: "4b145a58" }); @@ -376,16 +423,21 @@ if (import.meta.webpackHot) { `; exports[`webpack5 (server, hydratable) > ExportNamedDeclaration w/ FunctionExpression > should transform ExportNamedDeclaration w/ FunctionExpression with valid Component name and params 3`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; -import { escape as _$escape } from "solid-js/web"; -import { ssrHydrationKey as _$ssrHydrationKey } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; +import { ssrRunInScope as _$ssrRunInScope } from "@solidjs/web"; +import { escape as _$escape } from "@solidjs/web"; +import { ssrHydrationKey as _$ssrHydrationKey } from "@solidjs/web"; var _tmpl$ = ["", ""]; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; const _REGISTRY = _$$registry(); -const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/_$ssr(_tmpl$, _$ssrHydrationKey(), _$escape(_props.v0)), { +const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/(() => { + var _v$ = _$ssrHydrationKey(), + _v$2 = _$ssrRunInScope(() => _$escape(_props.v0)); + return _$ssr(_tmpl$, _v$, _v$2); +})(), { location: "example.jsx:4:15", signature: "ae0f2a31" }); @@ -408,7 +460,7 @@ if (import.meta.webpackHot) { `; exports[`webpack5 (server, hydratable) > ExportNamedDeclaration w/ FunctionExpression > should transform ExportNamedDeclaration w/ FunctionExpression with valid Component name and params 4`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; @@ -440,16 +492,19 @@ if (import.meta.webpackHot) { `; exports[`webpack5 (server, hydratable) > ExportNamedDeclaration w/ FunctionExpression > should transform ExportNamedDeclaration w/ FunctionExpression with valid Component name and params 5`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; -import { ssrHydrationKey as _$ssrHydrationKey } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; +import { ssrHydrationKey as _$ssrHydrationKey } from "@solidjs/web"; var _tmpl$ = ["bar"], _tmpl$2 = ["foo"]; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; const _REGISTRY = _$$registry(); -const Bar_1 = _$$component(_REGISTRY, "Bar_1", _props => /*@refresh jsx-skip*/_$ssr(_tmpl$, _$ssrHydrationKey()), { +const Bar_1 = _$$component(_REGISTRY, "Bar_1", _props => /*@refresh jsx-skip*/(() => { + var _v$ = _$ssrHydrationKey(); + return _$ssr(_tmpl$, _v$); +})(), { location: "example.jsx:3:15", signature: "61dd3182" }); @@ -459,7 +514,10 @@ const Bar = _$$component(_REGISTRY, "Bar", function Bar() { location: "example.jsx:2:13", signature: "e93ca257" }); -const Foo_1_1 = _$$component(_REGISTRY, "Foo_1_1", _props3 => /*@refresh jsx-skip*/_$ssr(_tmpl$2, _$ssrHydrationKey()), { +const Foo_1_1 = _$$component(_REGISTRY, "Foo_1_1", _props3 => /*@refresh jsx-skip*/(() => { + var _v$2 = _$ssrHydrationKey(); + return _$ssr(_tmpl$2, _v$2); +})(), { location: "example.jsx:8:12", signature: "241c14a4" }); @@ -485,13 +543,16 @@ if (import.meta.webpackHot) { `; exports[`webpack5 (server, hydratable) > FunctionDeclaration > should skip FunctionDeclaration with @refresh reload 1`] = ` -"import { ssr as _$ssr } from "solid-js/web"; -import { ssrHydrationKey as _$ssrHydrationKey } from "solid-js/web"; +"import { ssr as _$ssr } from "@solidjs/web"; +import { ssrHydrationKey as _$ssrHydrationKey } from "@solidjs/web"; var _tmpl$ = ["Foo"]; import { $$decline as _$$decline } from "solid-refresh"; // @refresh reload function Foo() { - return _$ssr(_tmpl$, _$ssrHydrationKey()); + return (() => { + var _v$ = _$ssrHydrationKey(); + return _$ssr(_tmpl$, _v$); + })(); } if (import.meta.webpackHot) { _$$decline("webpack5", import.meta.webpackHot); @@ -499,25 +560,31 @@ if (import.meta.webpackHot) { `; exports[`webpack5 (server, hydratable) > FunctionDeclaration > should skip FunctionDeclaration with @refresh skip 1`] = ` -"import { ssr as _$ssr } from "solid-js/web"; -import { ssrHydrationKey as _$ssrHydrationKey } from "solid-js/web"; +"import { ssr as _$ssr } from "@solidjs/web"; +import { ssrHydrationKey as _$ssrHydrationKey } from "@solidjs/web"; var _tmpl$ = ["Foo"]; // @refresh skip function Foo() { - return _$ssr(_tmpl$, _$ssrHydrationKey()); + return (() => { + var _v$ = _$ssrHydrationKey(); + return _$ssr(_tmpl$, _v$); + })(); }" `; exports[`webpack5 (server, hydratable) > FunctionDeclaration > should skip FunctionDeclaration with invalid Component name 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; -import { ssrHydrationKey as _$ssrHydrationKey } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; +import { ssrHydrationKey as _$ssrHydrationKey } from "@solidjs/web"; var _tmpl$ = ["Foo"]; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; const _REGISTRY = _$$registry(); -const JSX_foo_1 = _$$component(_REGISTRY, "JSX_foo_1", _props => /*@refresh jsx-skip*/_$ssr(_tmpl$, _$ssrHydrationKey()), { +const JSX_foo_1 = _$$component(_REGISTRY, "JSX_foo_1", _props => /*@refresh jsx-skip*/(() => { + var _v$ = _$ssrHydrationKey(); + return _$ssr(_tmpl$, _v$); +})(), { location: "example.jsx:3:15", signature: "4b145a58" }); @@ -530,15 +597,18 @@ if (import.meta.webpackHot) { `; exports[`webpack5 (server, hydratable) > FunctionDeclaration > should skip FunctionDeclaration with valid Component name and >1 params 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; -import { ssrHydrationKey as _$ssrHydrationKey } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; +import { ssrHydrationKey as _$ssrHydrationKey } from "@solidjs/web"; var _tmpl$ = ["Foo"]; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; const _REGISTRY = _$$registry(); -const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/_$ssr(_tmpl$, _$ssrHydrationKey()), { +const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/(() => { + var _v$ = _$ssrHydrationKey(); + return _$ssr(_tmpl$, _v$); +})(), { location: "example.jsx:3:15", signature: "4b145a58" }); @@ -551,15 +621,18 @@ if (import.meta.webpackHot) { `; exports[`webpack5 (server, hydratable) > FunctionDeclaration > should transform FunctionDeclaration with valid Component name and params 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; -import { ssrHydrationKey as _$ssrHydrationKey } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; +import { ssrHydrationKey as _$ssrHydrationKey } from "@solidjs/web"; var _tmpl$ = ["Foo"]; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; const _REGISTRY = _$$registry(); -const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/_$ssr(_tmpl$, _$ssrHydrationKey()), { +const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/(() => { + var _v$ = _$ssrHydrationKey(); + return _$ssr(_tmpl$, _v$); +})(), { location: "example.jsx:3:15", signature: "4b145a58" }); @@ -575,15 +648,18 @@ if (import.meta.webpackHot) { `; exports[`webpack5 (server, hydratable) > FunctionDeclaration > should transform FunctionDeclaration with valid Component name and params 2`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; -import { ssrHydrationKey as _$ssrHydrationKey } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; +import { ssrHydrationKey as _$ssrHydrationKey } from "@solidjs/web"; var _tmpl$ = ["Foo"]; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; const _REGISTRY = _$$registry(); -const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/_$ssr(_tmpl$, _$ssrHydrationKey()), { +const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/(() => { + var _v$ = _$ssrHydrationKey(); + return _$ssr(_tmpl$, _v$); +})(), { location: "example.jsx:3:15", signature: "4b145a58" }); @@ -599,16 +675,21 @@ if (import.meta.webpackHot) { `; exports[`webpack5 (server, hydratable) > FunctionDeclaration > should transform FunctionDeclaration with valid Component name and params 3`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; -import { escape as _$escape } from "solid-js/web"; -import { ssrHydrationKey as _$ssrHydrationKey } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; +import { ssrRunInScope as _$ssrRunInScope } from "@solidjs/web"; +import { escape as _$escape } from "@solidjs/web"; +import { ssrHydrationKey as _$ssrHydrationKey } from "@solidjs/web"; var _tmpl$ = ["", ""]; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; const _REGISTRY = _$$registry(); -const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/_$ssr(_tmpl$, _$ssrHydrationKey(), _$escape(_props.v0)), { +const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/(() => { + var _v$ = _$ssrHydrationKey(), + _v$2 = _$ssrRunInScope(() => _$escape(_props.v0)); + return _$ssr(_tmpl$, _v$, _v$2); +})(), { location: "example.jsx:4:15", signature: "ae0f2a31" }); @@ -630,7 +711,7 @@ if (import.meta.webpackHot) { `; exports[`webpack5 (server, hydratable) > FunctionDeclaration > should transform FunctionDeclaration with valid Component name and params 4`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; @@ -661,16 +742,19 @@ if (import.meta.webpackHot) { `; exports[`webpack5 (server, hydratable) > FunctionDeclaration > should transform FunctionDeclaration with valid Component name and params 5`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; -import { ssrHydrationKey as _$ssrHydrationKey } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; +import { ssrHydrationKey as _$ssrHydrationKey } from "@solidjs/web"; var _tmpl$ = ["foo"], _tmpl$2 = ["bar"]; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; const _REGISTRY = _$$registry(); -const Foo_1_1 = _$$component(_REGISTRY, "Foo_1_1", _props3 => /*@refresh jsx-skip*/_$ssr(_tmpl$, _$ssrHydrationKey()), { +const Foo_1_1 = _$$component(_REGISTRY, "Foo_1_1", _props3 => /*@refresh jsx-skip*/(() => { + var _v$ = _$ssrHydrationKey(); + return _$ssr(_tmpl$, _v$); +})(), { location: "example.jsx:8:12", signature: "241c14a4" }); @@ -688,7 +772,10 @@ const Foo = _$$component(_REGISTRY, "Foo", function Foo() { location: "example.jsx:5:6", signature: "c963b907" }); -const Bar_1 = _$$component(_REGISTRY, "Bar_1", _props2 => /*@refresh jsx-skip*/_$ssr(_tmpl$2, _$ssrHydrationKey()), { +const Bar_1 = _$$component(_REGISTRY, "Bar_1", _props2 => /*@refresh jsx-skip*/(() => { + var _v$2 = _$ssrHydrationKey(); + return _$ssr(_tmpl$2, _v$2); +})(), { location: "example.jsx:3:15", signature: "fad4daa8" }); @@ -704,13 +791,16 @@ if (import.meta.webpackHot) { `; exports[`webpack5 (server, hydratable) > VariableDeclarator > ArrowFunctionExpression > should skip VariableDeclarator w/ ArrowFunctionExpression with @refresh reload 1`] = ` -"import { ssr as _$ssr } from "solid-js/web"; -import { ssrHydrationKey as _$ssrHydrationKey } from "solid-js/web"; +"import { ssr as _$ssr } from "@solidjs/web"; +import { ssrHydrationKey as _$ssrHydrationKey } from "@solidjs/web"; var _tmpl$ = ["Foo"]; import { $$decline as _$$decline } from "solid-refresh"; // @refresh reload const Foo = () => { - return _$ssr(_tmpl$, _$ssrHydrationKey()); + return (() => { + var _v$ = _$ssrHydrationKey(); + return _$ssr(_tmpl$, _v$); + })(); }; if (import.meta.webpackHot) { _$$decline("webpack5", import.meta.webpackHot); @@ -718,25 +808,31 @@ if (import.meta.webpackHot) { `; exports[`webpack5 (server, hydratable) > VariableDeclarator > ArrowFunctionExpression > should skip VariableDeclarator w/ ArrowFunctionExpression with @refresh skip 1`] = ` -"import { ssr as _$ssr } from "solid-js/web"; -import { ssrHydrationKey as _$ssrHydrationKey } from "solid-js/web"; +"import { ssr as _$ssr } from "@solidjs/web"; +import { ssrHydrationKey as _$ssrHydrationKey } from "@solidjs/web"; var _tmpl$ = ["Foo"]; // @refresh skip const Foo = () => { - return _$ssr(_tmpl$, _$ssrHydrationKey()); + return (() => { + var _v$ = _$ssrHydrationKey(); + return _$ssr(_tmpl$, _v$); + })(); };" `; exports[`webpack5 (server, hydratable) > VariableDeclarator > ArrowFunctionExpression > should skip VariableDeclarator w/ ArrowFunctionExpression with invalid Component name 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; -import { ssrHydrationKey as _$ssrHydrationKey } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; +import { ssrHydrationKey as _$ssrHydrationKey } from "@solidjs/web"; var _tmpl$ = ["Foo"]; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; const _REGISTRY = _$$registry(); -const JSX_foo_1 = _$$component(_REGISTRY, "JSX_foo_1", _props => /*@refresh jsx-skip*/_$ssr(_tmpl$, _$ssrHydrationKey()), { +const JSX_foo_1 = _$$component(_REGISTRY, "JSX_foo_1", _props => /*@refresh jsx-skip*/(() => { + var _v$ = _$ssrHydrationKey(); + return _$ssr(_tmpl$, _v$); +})(), { location: "example.jsx:3:17", signature: "4b145a58" }); @@ -749,15 +845,18 @@ if (import.meta.webpackHot) { `; exports[`webpack5 (server, hydratable) > VariableDeclarator > ArrowFunctionExpression > should skip VariableDeclarator w/ ArrowFunctionExpression with valid Component name and >1 params 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; -import { ssrHydrationKey as _$ssrHydrationKey } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; +import { ssrHydrationKey as _$ssrHydrationKey } from "@solidjs/web"; var _tmpl$ = ["Foo"]; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; const _REGISTRY = _$$registry(); -const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/_$ssr(_tmpl$, _$ssrHydrationKey()), { +const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/(() => { + var _v$ = _$ssrHydrationKey(); + return _$ssr(_tmpl$, _v$); +})(), { location: "example.jsx:3:17", signature: "4b145a58" }); @@ -770,15 +869,18 @@ if (import.meta.webpackHot) { `; exports[`webpack5 (server, hydratable) > VariableDeclarator > ArrowFunctionExpression > should transform VariableDeclarator w/ ArrowFunctionExpression with valid Component name and params 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; -import { ssrHydrationKey as _$ssrHydrationKey } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; +import { ssrHydrationKey as _$ssrHydrationKey } from "@solidjs/web"; var _tmpl$ = ["Foo"]; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; const _REGISTRY = _$$registry(); -const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/_$ssr(_tmpl$, _$ssrHydrationKey()), { +const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/(() => { + var _v$ = _$ssrHydrationKey(); + return _$ssr(_tmpl$, _v$); +})(), { location: "example.jsx:3:17", signature: "4b145a58" }); @@ -794,15 +896,18 @@ if (import.meta.webpackHot) { `; exports[`webpack5 (server, hydratable) > VariableDeclarator > ArrowFunctionExpression > should transform VariableDeclarator w/ ArrowFunctionExpression with valid Component name and params 2`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; -import { ssrHydrationKey as _$ssrHydrationKey } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; +import { ssrHydrationKey as _$ssrHydrationKey } from "@solidjs/web"; var _tmpl$ = ["Foo"]; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; const _REGISTRY = _$$registry(); -const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/_$ssr(_tmpl$, _$ssrHydrationKey()), { +const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/(() => { + var _v$ = _$ssrHydrationKey(); + return _$ssr(_tmpl$, _v$); +})(), { location: "example.jsx:3:17", signature: "4b145a58" }); @@ -818,17 +923,22 @@ if (import.meta.webpackHot) { `; exports[`webpack5 (server, hydratable) > VariableDeclarator > ArrowFunctionExpression > should transform VariableDeclarator w/ ArrowFunctionExpression with valid Component name and params 3`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; -import { escape as _$escape } from "solid-js/web"; -import { ssrHydrationKey as _$ssrHydrationKey } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; +import { ssrRunInScope as _$ssrRunInScope } from "@solidjs/web"; +import { escape as _$escape } from "@solidjs/web"; +import { ssrHydrationKey as _$ssrHydrationKey } from "@solidjs/web"; var _tmpl$ = ["", ""]; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; const example = 'Foo'; const _REGISTRY = _$$registry(); -const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/_$ssr(_tmpl$, _$ssrHydrationKey(), _$escape(_props.v0)), { +const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/(() => { + var _v$ = _$ssrHydrationKey(), + _v$2 = _$ssrRunInScope(() => _$escape(_props.v0)); + return _$ssr(_tmpl$, _v$, _v$2); +})(), { location: "example.jsx:4:17", signature: "ae0f2a31" }); @@ -849,7 +959,7 @@ if (import.meta.webpackHot) { `; exports[`webpack5 (server, hydratable) > VariableDeclarator > ArrowFunctionExpression > should transform VariableDeclarator w/ ArrowFunctionExpression with valid Component name and params 4`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; @@ -880,16 +990,19 @@ if (import.meta.webpackHot) { `; exports[`webpack5 (server, hydratable) > VariableDeclarator > ArrowFunctionExpression > should transform VariableDeclarator w/ ArrowFunctionExpression with valid Component name and params 5`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; -import { ssrHydrationKey as _$ssrHydrationKey } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; +import { ssrHydrationKey as _$ssrHydrationKey } from "@solidjs/web"; var _tmpl$ = ["bar"], _tmpl$2 = ["foo"]; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; const _REGISTRY = _$$registry(); -const Bar_1 = _$$component(_REGISTRY, "Bar_1", _props => /*@refresh jsx-skip*/_$ssr(_tmpl$, _$ssrHydrationKey()), { +const Bar_1 = _$$component(_REGISTRY, "Bar_1", _props => /*@refresh jsx-skip*/(() => { + var _v$ = _$ssrHydrationKey(); + return _$ssr(_tmpl$, _v$); +})(), { location: "example.jsx:3:17", signature: "61dd3182" }); @@ -899,7 +1012,10 @@ const Bar = _$$component(_REGISTRY, "Bar", () => { location: "example.jsx:2:20", signature: "d1c6ca9b" }); -const Foo_1_1 = _$$component(_REGISTRY, "Foo_1_1", _props3 => /*@refresh jsx-skip*/_$ssr(_tmpl$2, _$ssrHydrationKey()), { +const Foo_1_1 = _$$component(_REGISTRY, "Foo_1_1", _props3 => /*@refresh jsx-skip*/(() => { + var _v$2 = _$ssrHydrationKey(); + return _$ssr(_tmpl$2, _v$2); +})(), { location: "example.jsx:8:14", signature: "241c14a4" }); @@ -923,13 +1039,16 @@ if (import.meta.webpackHot) { `; exports[`webpack5 (server, hydratable) > VariableDeclarator > FunctionExpression > should skip VariableDeclarator w/ FunctionExpression with @refresh reload 1`] = ` -"import { ssr as _$ssr } from "solid-js/web"; -import { ssrHydrationKey as _$ssrHydrationKey } from "solid-js/web"; +"import { ssr as _$ssr } from "@solidjs/web"; +import { ssrHydrationKey as _$ssrHydrationKey } from "@solidjs/web"; var _tmpl$ = ["Foo"]; import { $$decline as _$$decline } from "solid-refresh"; // @refresh reload const Foo = function () { - return _$ssr(_tmpl$, _$ssrHydrationKey()); + return (() => { + var _v$ = _$ssrHydrationKey(); + return _$ssr(_tmpl$, _v$); + })(); }; if (import.meta.webpackHot) { _$$decline("webpack5", import.meta.webpackHot); @@ -937,25 +1056,31 @@ if (import.meta.webpackHot) { `; exports[`webpack5 (server, hydratable) > VariableDeclarator > FunctionExpression > should skip VariableDeclarator w/ FunctionExpression with @refresh skip 1`] = ` -"import { ssr as _$ssr } from "solid-js/web"; -import { ssrHydrationKey as _$ssrHydrationKey } from "solid-js/web"; +"import { ssr as _$ssr } from "@solidjs/web"; +import { ssrHydrationKey as _$ssrHydrationKey } from "@solidjs/web"; var _tmpl$ = ["Foo"]; // @refresh skip const Foo = function () { - return _$ssr(_tmpl$, _$ssrHydrationKey()); + return (() => { + var _v$ = _$ssrHydrationKey(); + return _$ssr(_tmpl$, _v$); + })(); };" `; exports[`webpack5 (server, hydratable) > VariableDeclarator > FunctionExpression > should skip VariableDeclarator w/ FunctionExpression with invalid Component name 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; -import { ssrHydrationKey as _$ssrHydrationKey } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; +import { ssrHydrationKey as _$ssrHydrationKey } from "@solidjs/web"; var _tmpl$ = ["Foo"]; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; const _REGISTRY = _$$registry(); -const JSX_foo_1 = _$$component(_REGISTRY, "JSX_foo_1", _props => /*@refresh jsx-skip*/_$ssr(_tmpl$, _$ssrHydrationKey()), { +const JSX_foo_1 = _$$component(_REGISTRY, "JSX_foo_1", _props => /*@refresh jsx-skip*/(() => { + var _v$ = _$ssrHydrationKey(); + return _$ssr(_tmpl$, _v$); +})(), { location: "example.jsx:3:17", signature: "4b145a58" }); @@ -968,15 +1093,18 @@ if (import.meta.webpackHot) { `; exports[`webpack5 (server, hydratable) > VariableDeclarator > FunctionExpression > should skip VariableDeclarator w/ FunctionExpression with valid Component name and >1 params 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; -import { ssrHydrationKey as _$ssrHydrationKey } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; +import { ssrHydrationKey as _$ssrHydrationKey } from "@solidjs/web"; var _tmpl$ = ["Foo"]; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; const _REGISTRY = _$$registry(); -const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/_$ssr(_tmpl$, _$ssrHydrationKey()), { +const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/(() => { + var _v$ = _$ssrHydrationKey(); + return _$ssr(_tmpl$, _v$); +})(), { location: "example.jsx:3:17", signature: "4b145a58" }); @@ -989,15 +1117,18 @@ if (import.meta.webpackHot) { `; exports[`webpack5 (server, hydratable) > VariableDeclarator > FunctionExpression > should transform VariableDeclarator w/ FunctionExpression with valid Component name and params 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; -import { ssrHydrationKey as _$ssrHydrationKey } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; +import { ssrHydrationKey as _$ssrHydrationKey } from "@solidjs/web"; var _tmpl$ = ["Foo"]; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; const _REGISTRY = _$$registry(); -const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/_$ssr(_tmpl$, _$ssrHydrationKey()), { +const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/(() => { + var _v$ = _$ssrHydrationKey(); + return _$ssr(_tmpl$, _v$); +})(), { location: "example.jsx:3:17", signature: "4b145a58" }); @@ -1013,15 +1144,18 @@ if (import.meta.webpackHot) { `; exports[`webpack5 (server, hydratable) > VariableDeclarator > FunctionExpression > should transform VariableDeclarator w/ FunctionExpression with valid Component name and params 2`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; -import { ssrHydrationKey as _$ssrHydrationKey } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; +import { ssrHydrationKey as _$ssrHydrationKey } from "@solidjs/web"; var _tmpl$ = ["Foo"]; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; const _REGISTRY = _$$registry(); -const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/_$ssr(_tmpl$, _$ssrHydrationKey()), { +const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/(() => { + var _v$ = _$ssrHydrationKey(); + return _$ssr(_tmpl$, _v$); +})(), { location: "example.jsx:3:17", signature: "4b145a58" }); @@ -1037,17 +1171,22 @@ if (import.meta.webpackHot) { `; exports[`webpack5 (server, hydratable) > VariableDeclarator > FunctionExpression > should transform VariableDeclarator w/ FunctionExpression with valid Component name and params 3`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; -import { escape as _$escape } from "solid-js/web"; -import { ssrHydrationKey as _$ssrHydrationKey } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; +import { ssrRunInScope as _$ssrRunInScope } from "@solidjs/web"; +import { escape as _$escape } from "@solidjs/web"; +import { ssrHydrationKey as _$ssrHydrationKey } from "@solidjs/web"; var _tmpl$ = ["", ""]; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; const example = 'Foo'; const _REGISTRY = _$$registry(); -const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/_$ssr(_tmpl$, _$ssrHydrationKey(), _$escape(_props.v0)), { +const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/(() => { + var _v$ = _$ssrHydrationKey(), + _v$2 = _$ssrRunInScope(() => _$escape(_props.v0)); + return _$ssr(_tmpl$, _v$, _v$2); +})(), { location: "example.jsx:4:17", signature: "ae0f2a31" }); @@ -1068,7 +1207,7 @@ if (import.meta.webpackHot) { `; exports[`webpack5 (server, hydratable) > VariableDeclarator > FunctionExpression > should transform VariableDeclarator w/ FunctionExpression with valid Component name and params 4`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; @@ -1099,16 +1238,19 @@ if (import.meta.webpackHot) { `; exports[`webpack5 (server, hydratable) > VariableDeclarator > FunctionExpression > should transform VariableDeclarator w/ FunctionExpression with valid Component name and params 5`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; -import { ssrHydrationKey as _$ssrHydrationKey } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; +import { ssrHydrationKey as _$ssrHydrationKey } from "@solidjs/web"; var _tmpl$ = ["bar"], _tmpl$2 = ["foo"]; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; const _REGISTRY = _$$registry(); -const Bar_1 = _$$component(_REGISTRY, "Bar_1", _props => /*@refresh jsx-skip*/_$ssr(_tmpl$, _$ssrHydrationKey()), { +const Bar_1 = _$$component(_REGISTRY, "Bar_1", _props => /*@refresh jsx-skip*/(() => { + var _v$ = _$ssrHydrationKey(); + return _$ssr(_tmpl$, _v$); +})(), { location: "example.jsx:3:17", signature: "61dd3182" }); @@ -1118,7 +1260,10 @@ const Bar = _$$component(_REGISTRY, "Bar", function () { location: "example.jsx:2:20", signature: "1fb34faa" }); -const Foo_1_1 = _$$component(_REGISTRY, "Foo_1_1", _props3 => /*@refresh jsx-skip*/_$ssr(_tmpl$2, _$ssrHydrationKey()), { +const Foo_1_1 = _$$component(_REGISTRY, "Foo_1_1", _props3 => /*@refresh jsx-skip*/(() => { + var _v$2 = _$ssrHydrationKey(); + return _$ssr(_tmpl$2, _v$2); +})(), { location: "example.jsx:8:14", signature: "241c14a4" }); @@ -1142,15 +1287,19 @@ if (import.meta.webpackHot) { `; exports[`webpack5 (server, hydratable) > fix build > refs > should work with a function 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; -import { ssrHydrationKey as _$ssrHydrationKey } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; +import { ssrHydrationKey as _$ssrHydrationKey } from "@solidjs/web"; var _tmpl$ = ["Comp"]; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; const _REGISTRY = _$$registry(); -const Comp_1 = _$$component(_REGISTRY, "Comp_1", _props => /*@refresh jsx-skip*/_$ssr(_tmpl$, _$ssrHydrationKey()), { +const Comp_1 = _$$component(_REGISTRY, "Comp_1", _props => /*@refresh jsx-skip*/(() => { + var _v$ = _$ssrHydrationKey(), + _ref$ = _props.v0; + return _$ssr(_tmpl$, _v$); +})(), { location: "example.jsx:4:19", signature: "6f76290" }); @@ -1169,15 +1318,19 @@ if (import.meta.webpackHot) { `; exports[`webpack5 (server, hydratable) > fix build > refs > should work with a mutable variable 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; -import { ssrHydrationKey as _$ssrHydrationKey } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; +import { ssrHydrationKey as _$ssrHydrationKey } from "@solidjs/web"; var _tmpl$ = ["Comp"]; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; const _REGISTRY = _$$registry(); -const Comp_1 = _$$component(_REGISTRY, "Comp_1", _props => /*@refresh jsx-skip*/_$ssr(_tmpl$, _$ssrHydrationKey()), { +const Comp_1 = _$$component(_REGISTRY, "Comp_1", _props => /*@refresh jsx-skip*/(() => { + var _v$ = _$ssrHydrationKey(), + _ref$ = _props.v0; + return _$ssr(_tmpl$, _v$); +})(), { location: "example.jsx:4:19", signature: "6f76290" }); @@ -1202,16 +1355,20 @@ if (import.meta.webpackHot) { `; exports[`webpack5 (server, hydratable) > fix build > signals as refs > should work 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; -import { ssrHydrationKey as _$ssrHydrationKey } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; +import { ssrHydrationKey as _$ssrHydrationKey } from "@solidjs/web"; var _tmpl$ = ["Comp"]; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; import { createSignal } from 'solid-js'; const _REGISTRY = _$$registry(); -const Comp_1 = _$$component(_REGISTRY, "Comp_1", _props => /*@refresh jsx-skip*/_$ssr(_tmpl$, _$ssrHydrationKey()), { +const Comp_1 = _$$component(_REGISTRY, "Comp_1", _props => /*@refresh jsx-skip*/(() => { + var _v$ = _$ssrHydrationKey(), + _ref$ = _props.v0; + return _$ssr(_tmpl$, _v$); +})(), { location: "example.jsx:6:19", signature: "6f76290" }); @@ -1237,7 +1394,7 @@ if (import.meta.webpackHot) { `; exports[`webpack5 (server, hydratable) > fix render > @refresh reload > should work 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; import { $$decline as _$$decline } from "solid-refresh"; // @refresh reload import { render } from 'solid-js/web'; @@ -1251,7 +1408,7 @@ if (import.meta.webpackHot) { `; exports[`webpack5 (server, hydratable) > fix render > import specifiers > should work with ImportNamespaceSpecifier 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; @@ -1271,7 +1428,7 @@ if (import.meta.webpackHot) { `; exports[`webpack5 (server, hydratable) > fix render > import specifiers > should work with ImportSpecifier + Identifier 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; @@ -1291,7 +1448,7 @@ if (import.meta.webpackHot) { `; exports[`webpack5 (server, hydratable) > fix render > import specifiers > should work with ImportSpecifier + aliased Identifier 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; @@ -1311,7 +1468,7 @@ if (import.meta.webpackHot) { `; exports[`webpack5 (server, hydratable) > fix render > import specifiers > should work with ImportSpecifier + aliased Identifier from StringLiteral 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; @@ -1331,7 +1488,7 @@ if (import.meta.webpackHot) { `; exports[`webpack5 (server, hydratable) > fix render > top-level statements > should work with IfStatement 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; diff --git a/tests/server/__snapshots__/esm.test.ts.snap b/tests/server/__snapshots__/esm.test.ts.snap index 934cc90..ae21077 100644 --- a/tests/server/__snapshots__/esm.test.ts.snap +++ b/tests/server/__snapshots__/esm.test.ts.snap @@ -32,7 +32,7 @@ if (import.meta.hot) { `; exports[`esm (server, non-hydratable) > ExportDefaultDeclaration w/ FunctionExpression > should skip ExportDefaultDeclaration w/ FunctionExpression with @refresh reload 1`] = ` -"import { ssr as _$ssr } from "solid-js/web"; +"import { ssr as _$ssr } from "@solidjs/web"; var _tmpl$ = "

Foo

"; import { $$decline as _$$decline } from "solid-refresh"; // @refresh reload @@ -45,7 +45,7 @@ if (import.meta.hot) { `; exports[`esm (server, non-hydratable) > ExportDefaultDeclaration w/ FunctionExpression > should skip ExportDefaultDeclaration w/ FunctionExpression with @refresh skip 1`] = ` -"import { ssr as _$ssr } from "solid-js/web"; +"import { ssr as _$ssr } from "@solidjs/web"; var _tmpl$ = "

Foo

"; // @refresh skip export default function Foo() { @@ -54,8 +54,8 @@ export default function Foo() { `; exports[`esm (server, non-hydratable) > ExportDefaultDeclaration w/ FunctionExpression > should skip ExportDefaultDeclaration w/ FunctionExpression with invalid Component name 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; var _tmpl$ = "

Foo

"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -74,8 +74,8 @@ if (import.meta.hot) { `; exports[`esm (server, non-hydratable) > ExportDefaultDeclaration w/ FunctionExpression > should skip ExportDefaultDeclaration w/ FunctionExpression with valid Component name and >1 params 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; var _tmpl$ = "

Foo

"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -94,8 +94,8 @@ if (import.meta.hot) { `; exports[`esm (server, non-hydratable) > ExportDefaultDeclaration w/ FunctionExpression > should transform ExportDefaultDeclaration w/ FunctionExpression with valid Component name and params 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; var _tmpl$ = "

Foo

"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -118,8 +118,8 @@ if (import.meta.hot) { `; exports[`esm (server, non-hydratable) > ExportDefaultDeclaration w/ FunctionExpression > should transform ExportDefaultDeclaration w/ FunctionExpression with valid Component name and params 2`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; var _tmpl$ = "

Foo

"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -142,15 +142,19 @@ if (import.meta.hot) { `; exports[`esm (server, non-hydratable) > ExportDefaultDeclaration w/ FunctionExpression > should transform ExportDefaultDeclaration w/ FunctionExpression with valid Component name and params 3`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; -import { escape as _$escape } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; +import { ssrRunInScope as _$ssrRunInScope } from "@solidjs/web"; +import { escape as _$escape } from "@solidjs/web"; var _tmpl$ = ["

", "

"]; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; const _REGISTRY = _$$registry(); -const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/_$ssr(_tmpl$, _$escape(_props.v0)), { +const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/(() => { + var _v$ = _$ssrRunInScope(() => _$escape(_props.v0)); + return _$ssr(_tmpl$, _v$); +})(), { location: "example.jsx:4:15", signature: "ae0f2a31" }); @@ -173,7 +177,7 @@ if (import.meta.hot) { `; exports[`esm (server, non-hydratable) > ExportDefaultDeclaration w/ FunctionExpression > should transform ExportDefaultDeclaration w/ FunctionExpression with valid Component name and params 4`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; @@ -205,8 +209,8 @@ if (import.meta.hot) { `; exports[`esm (server, non-hydratable) > ExportDefaultDeclaration w/ FunctionExpression > should transform ExportDefaultDeclaration w/ FunctionExpression with valid Component name and params 5`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; var _tmpl$ = "
foo
", _tmpl$2 = "
bar
"; import { $$component as _$$component } from "solid-refresh"; @@ -248,7 +252,7 @@ if (import.meta.hot) { `; exports[`esm (server, non-hydratable) > ExportNamedDeclaration w/ FunctionExpression > should skip ExportNamedDeclaration w/ FunctionExpression with @refresh reload 1`] = ` -"import { ssr as _$ssr } from "solid-js/web"; +"import { ssr as _$ssr } from "@solidjs/web"; var _tmpl$ = "

Foo

"; import { $$decline as _$$decline } from "solid-refresh"; // @refresh reload @@ -261,7 +265,7 @@ if (import.meta.hot) { `; exports[`esm (server, non-hydratable) > ExportNamedDeclaration w/ FunctionExpression > should skip ExportNamedDeclaration w/ FunctionExpression with @refresh skip 1`] = ` -"import { ssr as _$ssr } from "solid-js/web"; +"import { ssr as _$ssr } from "@solidjs/web"; var _tmpl$ = "

Foo

"; // @refresh skip export function Foo() { @@ -270,8 +274,8 @@ export function Foo() { `; exports[`esm (server, non-hydratable) > ExportNamedDeclaration w/ FunctionExpression > should skip ExportNamedDeclaration w/ FunctionExpression with invalid Component name 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; var _tmpl$ = "

Foo

"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -294,8 +298,8 @@ if (import.meta.hot) { `; exports[`esm (server, non-hydratable) > ExportNamedDeclaration w/ FunctionExpression > should skip ExportNamedDeclaration w/ FunctionExpression with valid Component name and >1 params 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; var _tmpl$ = "

Foo

"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -314,8 +318,8 @@ if (import.meta.hot) { `; exports[`esm (server, non-hydratable) > ExportNamedDeclaration w/ FunctionExpression > should transform ExportNamedDeclaration w/ FunctionExpression with valid Component name and params 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; var _tmpl$ = "

Foo

"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -338,8 +342,8 @@ if (import.meta.hot) { `; exports[`esm (server, non-hydratable) > ExportNamedDeclaration w/ FunctionExpression > should transform ExportNamedDeclaration w/ FunctionExpression with valid Component name and params 2`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; var _tmpl$ = "

Foo

"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -362,15 +366,19 @@ if (import.meta.hot) { `; exports[`esm (server, non-hydratable) > ExportNamedDeclaration w/ FunctionExpression > should transform ExportNamedDeclaration w/ FunctionExpression with valid Component name and params 3`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; -import { escape as _$escape } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; +import { ssrRunInScope as _$ssrRunInScope } from "@solidjs/web"; +import { escape as _$escape } from "@solidjs/web"; var _tmpl$ = ["

", "

"]; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; const _REGISTRY = _$$registry(); -const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/_$ssr(_tmpl$, _$escape(_props.v0)), { +const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/(() => { + var _v$ = _$ssrRunInScope(() => _$escape(_props.v0)); + return _$ssr(_tmpl$, _v$); +})(), { location: "example.jsx:4:15", signature: "ae0f2a31" }); @@ -393,7 +401,7 @@ if (import.meta.hot) { `; exports[`esm (server, non-hydratable) > ExportNamedDeclaration w/ FunctionExpression > should transform ExportNamedDeclaration w/ FunctionExpression with valid Component name and params 4`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; @@ -425,8 +433,8 @@ if (import.meta.hot) { `; exports[`esm (server, non-hydratable) > ExportNamedDeclaration w/ FunctionExpression > should transform ExportNamedDeclaration w/ FunctionExpression with valid Component name and params 5`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; var _tmpl$ = "
bar
", _tmpl$2 = "
foo
"; import { $$component as _$$component } from "solid-refresh"; @@ -469,7 +477,7 @@ if (import.meta.hot) { `; exports[`esm (server, non-hydratable) > FunctionDeclaration > should skip FunctionDeclaration with @refresh reload 1`] = ` -"import { ssr as _$ssr } from "solid-js/web"; +"import { ssr as _$ssr } from "@solidjs/web"; var _tmpl$ = "

Foo

"; import { $$decline as _$$decline } from "solid-refresh"; // @refresh reload @@ -482,7 +490,7 @@ if (import.meta.hot) { `; exports[`esm (server, non-hydratable) > FunctionDeclaration > should skip FunctionDeclaration with @refresh skip 1`] = ` -"import { ssr as _$ssr } from "solid-js/web"; +"import { ssr as _$ssr } from "@solidjs/web"; var _tmpl$ = "

Foo

"; // @refresh skip function Foo() { @@ -491,8 +499,8 @@ function Foo() { `; exports[`esm (server, non-hydratable) > FunctionDeclaration > should skip FunctionDeclaration with invalid Component name 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; var _tmpl$ = "

Foo

"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -511,8 +519,8 @@ if (import.meta.hot) { `; exports[`esm (server, non-hydratable) > FunctionDeclaration > should skip FunctionDeclaration with valid Component name and >1 params 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; var _tmpl$ = "

Foo

"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -531,8 +539,8 @@ if (import.meta.hot) { `; exports[`esm (server, non-hydratable) > FunctionDeclaration > should transform FunctionDeclaration with valid Component name and params 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; var _tmpl$ = "

Foo

"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -554,8 +562,8 @@ if (import.meta.hot) { `; exports[`esm (server, non-hydratable) > FunctionDeclaration > should transform FunctionDeclaration with valid Component name and params 2`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; var _tmpl$ = "

Foo

"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -577,15 +585,19 @@ if (import.meta.hot) { `; exports[`esm (server, non-hydratable) > FunctionDeclaration > should transform FunctionDeclaration with valid Component name and params 3`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; -import { escape as _$escape } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; +import { ssrRunInScope as _$ssrRunInScope } from "@solidjs/web"; +import { escape as _$escape } from "@solidjs/web"; var _tmpl$ = ["

", "

"]; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; const _REGISTRY = _$$registry(); -const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/_$ssr(_tmpl$, _$escape(_props.v0)), { +const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/(() => { + var _v$ = _$ssrRunInScope(() => _$escape(_props.v0)); + return _$ssr(_tmpl$, _v$); +})(), { location: "example.jsx:4:15", signature: "ae0f2a31" }); @@ -607,7 +619,7 @@ if (import.meta.hot) { `; exports[`esm (server, non-hydratable) > FunctionDeclaration > should transform FunctionDeclaration with valid Component name and params 4`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; @@ -638,8 +650,8 @@ if (import.meta.hot) { `; exports[`esm (server, non-hydratable) > FunctionDeclaration > should transform FunctionDeclaration with valid Component name and params 5`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; var _tmpl$ = "
foo
", _tmpl$2 = "
bar
"; import { $$component as _$$component } from "solid-refresh"; @@ -680,7 +692,7 @@ if (import.meta.hot) { `; exports[`esm (server, non-hydratable) > VariableDeclarator > ArrowFunctionExpression > should skip VariableDeclarator w/ ArrowFunctionExpression with @refresh reload 1`] = ` -"import { ssr as _$ssr } from "solid-js/web"; +"import { ssr as _$ssr } from "@solidjs/web"; var _tmpl$ = "

Foo

"; import { $$decline as _$$decline } from "solid-refresh"; // @refresh reload @@ -693,7 +705,7 @@ if (import.meta.hot) { `; exports[`esm (server, non-hydratable) > VariableDeclarator > ArrowFunctionExpression > should skip VariableDeclarator w/ ArrowFunctionExpression with @refresh skip 1`] = ` -"import { ssr as _$ssr } from "solid-js/web"; +"import { ssr as _$ssr } from "@solidjs/web"; var _tmpl$ = "

Foo

"; // @refresh skip const Foo = () => { @@ -702,8 +714,8 @@ const Foo = () => { `; exports[`esm (server, non-hydratable) > VariableDeclarator > ArrowFunctionExpression > should skip VariableDeclarator w/ ArrowFunctionExpression with invalid Component name 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; var _tmpl$ = "

Foo

"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -722,8 +734,8 @@ if (import.meta.hot) { `; exports[`esm (server, non-hydratable) > VariableDeclarator > ArrowFunctionExpression > should skip VariableDeclarator w/ ArrowFunctionExpression with valid Component name and >1 params 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; var _tmpl$ = "

Foo

"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -742,8 +754,8 @@ if (import.meta.hot) { `; exports[`esm (server, non-hydratable) > VariableDeclarator > ArrowFunctionExpression > should transform VariableDeclarator w/ ArrowFunctionExpression with valid Component name and params 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; var _tmpl$ = "

Foo

"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -765,8 +777,8 @@ if (import.meta.hot) { `; exports[`esm (server, non-hydratable) > VariableDeclarator > ArrowFunctionExpression > should transform VariableDeclarator w/ ArrowFunctionExpression with valid Component name and params 2`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; var _tmpl$ = "

Foo

"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -788,16 +800,20 @@ if (import.meta.hot) { `; exports[`esm (server, non-hydratable) > VariableDeclarator > ArrowFunctionExpression > should transform VariableDeclarator w/ ArrowFunctionExpression with valid Component name and params 3`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; -import { escape as _$escape } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; +import { ssrRunInScope as _$ssrRunInScope } from "@solidjs/web"; +import { escape as _$escape } from "@solidjs/web"; var _tmpl$ = ["

", "

"]; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; const example = 'Foo'; const _REGISTRY = _$$registry(); -const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/_$ssr(_tmpl$, _$escape(_props.v0)), { +const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/(() => { + var _v$ = _$ssrRunInScope(() => _$escape(_props.v0)); + return _$ssr(_tmpl$, _v$); +})(), { location: "example.jsx:4:17", signature: "ae0f2a31" }); @@ -818,7 +834,7 @@ if (import.meta.hot) { `; exports[`esm (server, non-hydratable) > VariableDeclarator > ArrowFunctionExpression > should transform VariableDeclarator w/ ArrowFunctionExpression with valid Component name and params 4`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; @@ -849,8 +865,8 @@ if (import.meta.hot) { `; exports[`esm (server, non-hydratable) > VariableDeclarator > ArrowFunctionExpression > should transform VariableDeclarator w/ ArrowFunctionExpression with valid Component name and params 5`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; var _tmpl$ = "
bar
", _tmpl$2 = "
foo
"; import { $$component as _$$component } from "solid-refresh"; @@ -891,7 +907,7 @@ if (import.meta.hot) { `; exports[`esm (server, non-hydratable) > VariableDeclarator > FunctionExpression > should skip VariableDeclarator w/ FunctionExpression with @refresh reload 1`] = ` -"import { ssr as _$ssr } from "solid-js/web"; +"import { ssr as _$ssr } from "@solidjs/web"; var _tmpl$ = "

Foo

"; import { $$decline as _$$decline } from "solid-refresh"; // @refresh reload @@ -904,7 +920,7 @@ if (import.meta.hot) { `; exports[`esm (server, non-hydratable) > VariableDeclarator > FunctionExpression > should skip VariableDeclarator w/ FunctionExpression with @refresh skip 1`] = ` -"import { ssr as _$ssr } from "solid-js/web"; +"import { ssr as _$ssr } from "@solidjs/web"; var _tmpl$ = "

Foo

"; // @refresh skip const Foo = function () { @@ -913,8 +929,8 @@ const Foo = function () { `; exports[`esm (server, non-hydratable) > VariableDeclarator > FunctionExpression > should skip VariableDeclarator w/ FunctionExpression with invalid Component name 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; var _tmpl$ = "

Foo

"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -933,8 +949,8 @@ if (import.meta.hot) { `; exports[`esm (server, non-hydratable) > VariableDeclarator > FunctionExpression > should skip VariableDeclarator w/ FunctionExpression with valid Component name and >1 params 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; var _tmpl$ = "

Foo

"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -953,8 +969,8 @@ if (import.meta.hot) { `; exports[`esm (server, non-hydratable) > VariableDeclarator > FunctionExpression > should transform VariableDeclarator w/ FunctionExpression with valid Component name and params 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; var _tmpl$ = "

Foo

"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -976,8 +992,8 @@ if (import.meta.hot) { `; exports[`esm (server, non-hydratable) > VariableDeclarator > FunctionExpression > should transform VariableDeclarator w/ FunctionExpression with valid Component name and params 2`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; var _tmpl$ = "

Foo

"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -999,16 +1015,20 @@ if (import.meta.hot) { `; exports[`esm (server, non-hydratable) > VariableDeclarator > FunctionExpression > should transform VariableDeclarator w/ FunctionExpression with valid Component name and params 3`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; -import { escape as _$escape } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; +import { ssrRunInScope as _$ssrRunInScope } from "@solidjs/web"; +import { escape as _$escape } from "@solidjs/web"; var _tmpl$ = ["

", "

"]; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; const example = 'Foo'; const _REGISTRY = _$$registry(); -const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/_$ssr(_tmpl$, _$escape(_props.v0)), { +const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/(() => { + var _v$ = _$ssrRunInScope(() => _$escape(_props.v0)); + return _$ssr(_tmpl$, _v$); +})(), { location: "example.jsx:4:17", signature: "ae0f2a31" }); @@ -1029,7 +1049,7 @@ if (import.meta.hot) { `; exports[`esm (server, non-hydratable) > VariableDeclarator > FunctionExpression > should transform VariableDeclarator w/ FunctionExpression with valid Component name and params 4`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; @@ -1060,8 +1080,8 @@ if (import.meta.hot) { `; exports[`esm (server, non-hydratable) > VariableDeclarator > FunctionExpression > should transform VariableDeclarator w/ FunctionExpression with valid Component name and params 5`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; var _tmpl$ = "
bar
", _tmpl$2 = "
foo
"; import { $$component as _$$component } from "solid-refresh"; @@ -1102,14 +1122,17 @@ if (import.meta.hot) { `; exports[`esm (server, non-hydratable) > fix build > refs > should work with a function 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; var _tmpl$ = "
Comp
"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; const _REGISTRY = _$$registry(); -const Comp_1 = _$$component(_REGISTRY, "Comp_1", _props => /*@refresh jsx-skip*/_$ssr(_tmpl$), { +const Comp_1 = _$$component(_REGISTRY, "Comp_1", _props => /*@refresh jsx-skip*/(() => { + var _ref$ = _props.v0; + return _$ssr(_tmpl$); +})(), { location: "example.jsx:4:19", signature: "6f76290" }); @@ -1128,14 +1151,17 @@ if (import.meta.hot) { `; exports[`esm (server, non-hydratable) > fix build > refs > should work with a mutable variable 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; var _tmpl$ = "
Comp
"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; const _REGISTRY = _$$registry(); -const Comp_1 = _$$component(_REGISTRY, "Comp_1", _props => /*@refresh jsx-skip*/_$ssr(_tmpl$), { +const Comp_1 = _$$component(_REGISTRY, "Comp_1", _props => /*@refresh jsx-skip*/(() => { + var _ref$ = _props.v0; + return _$ssr(_tmpl$); +})(), { location: "example.jsx:4:19", signature: "6f76290" }); @@ -1160,15 +1186,18 @@ if (import.meta.hot) { `; exports[`esm (server, non-hydratable) > fix build > signals as refs > should work 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; var _tmpl$ = "
Comp
"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; import { createSignal } from 'solid-js'; const _REGISTRY = _$$registry(); -const Comp_1 = _$$component(_REGISTRY, "Comp_1", _props => /*@refresh jsx-skip*/_$ssr(_tmpl$), { +const Comp_1 = _$$component(_REGISTRY, "Comp_1", _props => /*@refresh jsx-skip*/(() => { + var _ref$ = _props.v0; + return _$ssr(_tmpl$); +})(), { location: "example.jsx:6:19", signature: "6f76290" }); @@ -1194,7 +1223,7 @@ if (import.meta.hot) { `; exports[`esm (server, non-hydratable) > fix render > @refresh reload > should work 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; import { $$decline as _$$decline } from "solid-refresh"; // @refresh reload import { render } from 'solid-js/web'; @@ -1208,7 +1237,7 @@ if (import.meta.hot) { `; exports[`esm (server, non-hydratable) > fix render > import specifiers > should work with ImportNamespaceSpecifier 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; @@ -1228,7 +1257,7 @@ if (import.meta.hot) { `; exports[`esm (server, non-hydratable) > fix render > import specifiers > should work with ImportSpecifier + Identifier 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; @@ -1248,7 +1277,7 @@ if (import.meta.hot) { `; exports[`esm (server, non-hydratable) > fix render > import specifiers > should work with ImportSpecifier + aliased Identifier 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; @@ -1268,7 +1297,7 @@ if (import.meta.hot) { `; exports[`esm (server, non-hydratable) > fix render > import specifiers > should work with ImportSpecifier + aliased Identifier from StringLiteral 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; @@ -1288,7 +1317,7 @@ if (import.meta.hot) { `; exports[`esm (server, non-hydratable) > fix render > top-level statements > should work with IfStatement 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; diff --git a/tests/server/__snapshots__/rspack-esm.test.ts.snap b/tests/server/__snapshots__/rspack-esm.test.ts.snap index 8e5c37c..f1c90cc 100644 --- a/tests/server/__snapshots__/rspack-esm.test.ts.snap +++ b/tests/server/__snapshots__/rspack-esm.test.ts.snap @@ -32,7 +32,7 @@ if (import.meta.webpackHot) { `; exports[`rspack-esm (server, non-hydratable) > ExportDefaultDeclaration w/ FunctionExpression > should skip ExportDefaultDeclaration w/ FunctionExpression with @refresh reload 1`] = ` -"import { ssr as _$ssr } from "solid-js/web"; +"import { ssr as _$ssr } from "@solidjs/web"; var _tmpl$ = "

Foo

"; import { $$decline as _$$decline } from "solid-refresh"; // @refresh reload @@ -45,7 +45,7 @@ if (import.meta.webpackHot) { `; exports[`rspack-esm (server, non-hydratable) > ExportDefaultDeclaration w/ FunctionExpression > should skip ExportDefaultDeclaration w/ FunctionExpression with @refresh skip 1`] = ` -"import { ssr as _$ssr } from "solid-js/web"; +"import { ssr as _$ssr } from "@solidjs/web"; var _tmpl$ = "

Foo

"; // @refresh skip export default function Foo() { @@ -54,8 +54,8 @@ export default function Foo() { `; exports[`rspack-esm (server, non-hydratable) > ExportDefaultDeclaration w/ FunctionExpression > should skip ExportDefaultDeclaration w/ FunctionExpression with invalid Component name 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; var _tmpl$ = "

Foo

"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -74,8 +74,8 @@ if (import.meta.webpackHot) { `; exports[`rspack-esm (server, non-hydratable) > ExportDefaultDeclaration w/ FunctionExpression > should skip ExportDefaultDeclaration w/ FunctionExpression with valid Component name and >1 params 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; var _tmpl$ = "

Foo

"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -94,8 +94,8 @@ if (import.meta.webpackHot) { `; exports[`rspack-esm (server, non-hydratable) > ExportDefaultDeclaration w/ FunctionExpression > should transform ExportDefaultDeclaration w/ FunctionExpression with valid Component name and params 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; var _tmpl$ = "

Foo

"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -118,8 +118,8 @@ if (import.meta.webpackHot) { `; exports[`rspack-esm (server, non-hydratable) > ExportDefaultDeclaration w/ FunctionExpression > should transform ExportDefaultDeclaration w/ FunctionExpression with valid Component name and params 2`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; var _tmpl$ = "

Foo

"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -142,15 +142,19 @@ if (import.meta.webpackHot) { `; exports[`rspack-esm (server, non-hydratable) > ExportDefaultDeclaration w/ FunctionExpression > should transform ExportDefaultDeclaration w/ FunctionExpression with valid Component name and params 3`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; -import { escape as _$escape } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; +import { ssrRunInScope as _$ssrRunInScope } from "@solidjs/web"; +import { escape as _$escape } from "@solidjs/web"; var _tmpl$ = ["

", "

"]; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; const _REGISTRY = _$$registry(); -const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/_$ssr(_tmpl$, _$escape(_props.v0)), { +const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/(() => { + var _v$ = _$ssrRunInScope(() => _$escape(_props.v0)); + return _$ssr(_tmpl$, _v$); +})(), { location: "example.jsx:4:15", signature: "ae0f2a31" }); @@ -173,7 +177,7 @@ if (import.meta.webpackHot) { `; exports[`rspack-esm (server, non-hydratable) > ExportDefaultDeclaration w/ FunctionExpression > should transform ExportDefaultDeclaration w/ FunctionExpression with valid Component name and params 4`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; @@ -205,8 +209,8 @@ if (import.meta.webpackHot) { `; exports[`rspack-esm (server, non-hydratable) > ExportDefaultDeclaration w/ FunctionExpression > should transform ExportDefaultDeclaration w/ FunctionExpression with valid Component name and params 5`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; var _tmpl$ = "
foo
", _tmpl$2 = "
bar
"; import { $$component as _$$component } from "solid-refresh"; @@ -248,7 +252,7 @@ if (import.meta.webpackHot) { `; exports[`rspack-esm (server, non-hydratable) > ExportNamedDeclaration w/ FunctionExpression > should skip ExportNamedDeclaration w/ FunctionExpression with @refresh reload 1`] = ` -"import { ssr as _$ssr } from "solid-js/web"; +"import { ssr as _$ssr } from "@solidjs/web"; var _tmpl$ = "

Foo

"; import { $$decline as _$$decline } from "solid-refresh"; // @refresh reload @@ -261,7 +265,7 @@ if (import.meta.webpackHot) { `; exports[`rspack-esm (server, non-hydratable) > ExportNamedDeclaration w/ FunctionExpression > should skip ExportNamedDeclaration w/ FunctionExpression with @refresh skip 1`] = ` -"import { ssr as _$ssr } from "solid-js/web"; +"import { ssr as _$ssr } from "@solidjs/web"; var _tmpl$ = "

Foo

"; // @refresh skip export function Foo() { @@ -270,8 +274,8 @@ export function Foo() { `; exports[`rspack-esm (server, non-hydratable) > ExportNamedDeclaration w/ FunctionExpression > should skip ExportNamedDeclaration w/ FunctionExpression with invalid Component name 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; var _tmpl$ = "

Foo

"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -294,8 +298,8 @@ if (import.meta.webpackHot) { `; exports[`rspack-esm (server, non-hydratable) > ExportNamedDeclaration w/ FunctionExpression > should skip ExportNamedDeclaration w/ FunctionExpression with valid Component name and >1 params 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; var _tmpl$ = "

Foo

"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -314,8 +318,8 @@ if (import.meta.webpackHot) { `; exports[`rspack-esm (server, non-hydratable) > ExportNamedDeclaration w/ FunctionExpression > should transform ExportNamedDeclaration w/ FunctionExpression with valid Component name and params 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; var _tmpl$ = "

Foo

"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -338,8 +342,8 @@ if (import.meta.webpackHot) { `; exports[`rspack-esm (server, non-hydratable) > ExportNamedDeclaration w/ FunctionExpression > should transform ExportNamedDeclaration w/ FunctionExpression with valid Component name and params 2`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; var _tmpl$ = "

Foo

"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -362,15 +366,19 @@ if (import.meta.webpackHot) { `; exports[`rspack-esm (server, non-hydratable) > ExportNamedDeclaration w/ FunctionExpression > should transform ExportNamedDeclaration w/ FunctionExpression with valid Component name and params 3`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; -import { escape as _$escape } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; +import { ssrRunInScope as _$ssrRunInScope } from "@solidjs/web"; +import { escape as _$escape } from "@solidjs/web"; var _tmpl$ = ["

", "

"]; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; const _REGISTRY = _$$registry(); -const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/_$ssr(_tmpl$, _$escape(_props.v0)), { +const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/(() => { + var _v$ = _$ssrRunInScope(() => _$escape(_props.v0)); + return _$ssr(_tmpl$, _v$); +})(), { location: "example.jsx:4:15", signature: "ae0f2a31" }); @@ -393,7 +401,7 @@ if (import.meta.webpackHot) { `; exports[`rspack-esm (server, non-hydratable) > ExportNamedDeclaration w/ FunctionExpression > should transform ExportNamedDeclaration w/ FunctionExpression with valid Component name and params 4`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; @@ -425,8 +433,8 @@ if (import.meta.webpackHot) { `; exports[`rspack-esm (server, non-hydratable) > ExportNamedDeclaration w/ FunctionExpression > should transform ExportNamedDeclaration w/ FunctionExpression with valid Component name and params 5`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; var _tmpl$ = "
bar
", _tmpl$2 = "
foo
"; import { $$component as _$$component } from "solid-refresh"; @@ -469,7 +477,7 @@ if (import.meta.webpackHot) { `; exports[`rspack-esm (server, non-hydratable) > FunctionDeclaration > should skip FunctionDeclaration with @refresh reload 1`] = ` -"import { ssr as _$ssr } from "solid-js/web"; +"import { ssr as _$ssr } from "@solidjs/web"; var _tmpl$ = "

Foo

"; import { $$decline as _$$decline } from "solid-refresh"; // @refresh reload @@ -482,7 +490,7 @@ if (import.meta.webpackHot) { `; exports[`rspack-esm (server, non-hydratable) > FunctionDeclaration > should skip FunctionDeclaration with @refresh skip 1`] = ` -"import { ssr as _$ssr } from "solid-js/web"; +"import { ssr as _$ssr } from "@solidjs/web"; var _tmpl$ = "

Foo

"; // @refresh skip function Foo() { @@ -491,8 +499,8 @@ function Foo() { `; exports[`rspack-esm (server, non-hydratable) > FunctionDeclaration > should skip FunctionDeclaration with invalid Component name 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; var _tmpl$ = "

Foo

"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -511,8 +519,8 @@ if (import.meta.webpackHot) { `; exports[`rspack-esm (server, non-hydratable) > FunctionDeclaration > should skip FunctionDeclaration with valid Component name and >1 params 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; var _tmpl$ = "

Foo

"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -531,8 +539,8 @@ if (import.meta.webpackHot) { `; exports[`rspack-esm (server, non-hydratable) > FunctionDeclaration > should transform FunctionDeclaration with valid Component name and params 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; var _tmpl$ = "

Foo

"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -554,8 +562,8 @@ if (import.meta.webpackHot) { `; exports[`rspack-esm (server, non-hydratable) > FunctionDeclaration > should transform FunctionDeclaration with valid Component name and params 2`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; var _tmpl$ = "

Foo

"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -577,15 +585,19 @@ if (import.meta.webpackHot) { `; exports[`rspack-esm (server, non-hydratable) > FunctionDeclaration > should transform FunctionDeclaration with valid Component name and params 3`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; -import { escape as _$escape } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; +import { ssrRunInScope as _$ssrRunInScope } from "@solidjs/web"; +import { escape as _$escape } from "@solidjs/web"; var _tmpl$ = ["

", "

"]; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; const _REGISTRY = _$$registry(); -const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/_$ssr(_tmpl$, _$escape(_props.v0)), { +const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/(() => { + var _v$ = _$ssrRunInScope(() => _$escape(_props.v0)); + return _$ssr(_tmpl$, _v$); +})(), { location: "example.jsx:4:15", signature: "ae0f2a31" }); @@ -607,7 +619,7 @@ if (import.meta.webpackHot) { `; exports[`rspack-esm (server, non-hydratable) > FunctionDeclaration > should transform FunctionDeclaration with valid Component name and params 4`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; @@ -638,8 +650,8 @@ if (import.meta.webpackHot) { `; exports[`rspack-esm (server, non-hydratable) > FunctionDeclaration > should transform FunctionDeclaration with valid Component name and params 5`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; var _tmpl$ = "
foo
", _tmpl$2 = "
bar
"; import { $$component as _$$component } from "solid-refresh"; @@ -680,7 +692,7 @@ if (import.meta.webpackHot) { `; exports[`rspack-esm (server, non-hydratable) > VariableDeclarator > ArrowFunctionExpression > should skip VariableDeclarator w/ ArrowFunctionExpression with @refresh reload 1`] = ` -"import { ssr as _$ssr } from "solid-js/web"; +"import { ssr as _$ssr } from "@solidjs/web"; var _tmpl$ = "

Foo

"; import { $$decline as _$$decline } from "solid-refresh"; // @refresh reload @@ -693,7 +705,7 @@ if (import.meta.webpackHot) { `; exports[`rspack-esm (server, non-hydratable) > VariableDeclarator > ArrowFunctionExpression > should skip VariableDeclarator w/ ArrowFunctionExpression with @refresh skip 1`] = ` -"import { ssr as _$ssr } from "solid-js/web"; +"import { ssr as _$ssr } from "@solidjs/web"; var _tmpl$ = "

Foo

"; // @refresh skip const Foo = () => { @@ -702,8 +714,8 @@ const Foo = () => { `; exports[`rspack-esm (server, non-hydratable) > VariableDeclarator > ArrowFunctionExpression > should skip VariableDeclarator w/ ArrowFunctionExpression with invalid Component name 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; var _tmpl$ = "

Foo

"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -722,8 +734,8 @@ if (import.meta.webpackHot) { `; exports[`rspack-esm (server, non-hydratable) > VariableDeclarator > ArrowFunctionExpression > should skip VariableDeclarator w/ ArrowFunctionExpression with valid Component name and >1 params 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; var _tmpl$ = "

Foo

"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -742,8 +754,8 @@ if (import.meta.webpackHot) { `; exports[`rspack-esm (server, non-hydratable) > VariableDeclarator > ArrowFunctionExpression > should transform VariableDeclarator w/ ArrowFunctionExpression with valid Component name and params 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; var _tmpl$ = "

Foo

"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -765,8 +777,8 @@ if (import.meta.webpackHot) { `; exports[`rspack-esm (server, non-hydratable) > VariableDeclarator > ArrowFunctionExpression > should transform VariableDeclarator w/ ArrowFunctionExpression with valid Component name and params 2`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; var _tmpl$ = "

Foo

"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -788,16 +800,20 @@ if (import.meta.webpackHot) { `; exports[`rspack-esm (server, non-hydratable) > VariableDeclarator > ArrowFunctionExpression > should transform VariableDeclarator w/ ArrowFunctionExpression with valid Component name and params 3`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; -import { escape as _$escape } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; +import { ssrRunInScope as _$ssrRunInScope } from "@solidjs/web"; +import { escape as _$escape } from "@solidjs/web"; var _tmpl$ = ["

", "

"]; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; const example = 'Foo'; const _REGISTRY = _$$registry(); -const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/_$ssr(_tmpl$, _$escape(_props.v0)), { +const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/(() => { + var _v$ = _$ssrRunInScope(() => _$escape(_props.v0)); + return _$ssr(_tmpl$, _v$); +})(), { location: "example.jsx:4:17", signature: "ae0f2a31" }); @@ -818,7 +834,7 @@ if (import.meta.webpackHot) { `; exports[`rspack-esm (server, non-hydratable) > VariableDeclarator > ArrowFunctionExpression > should transform VariableDeclarator w/ ArrowFunctionExpression with valid Component name and params 4`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; @@ -849,8 +865,8 @@ if (import.meta.webpackHot) { `; exports[`rspack-esm (server, non-hydratable) > VariableDeclarator > ArrowFunctionExpression > should transform VariableDeclarator w/ ArrowFunctionExpression with valid Component name and params 5`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; var _tmpl$ = "
bar
", _tmpl$2 = "
foo
"; import { $$component as _$$component } from "solid-refresh"; @@ -891,7 +907,7 @@ if (import.meta.webpackHot) { `; exports[`rspack-esm (server, non-hydratable) > VariableDeclarator > FunctionExpression > should skip VariableDeclarator w/ FunctionExpression with @refresh reload 1`] = ` -"import { ssr as _$ssr } from "solid-js/web"; +"import { ssr as _$ssr } from "@solidjs/web"; var _tmpl$ = "

Foo

"; import { $$decline as _$$decline } from "solid-refresh"; // @refresh reload @@ -904,7 +920,7 @@ if (import.meta.webpackHot) { `; exports[`rspack-esm (server, non-hydratable) > VariableDeclarator > FunctionExpression > should skip VariableDeclarator w/ FunctionExpression with @refresh skip 1`] = ` -"import { ssr as _$ssr } from "solid-js/web"; +"import { ssr as _$ssr } from "@solidjs/web"; var _tmpl$ = "

Foo

"; // @refresh skip const Foo = function () { @@ -913,8 +929,8 @@ const Foo = function () { `; exports[`rspack-esm (server, non-hydratable) > VariableDeclarator > FunctionExpression > should skip VariableDeclarator w/ FunctionExpression with invalid Component name 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; var _tmpl$ = "

Foo

"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -933,8 +949,8 @@ if (import.meta.webpackHot) { `; exports[`rspack-esm (server, non-hydratable) > VariableDeclarator > FunctionExpression > should skip VariableDeclarator w/ FunctionExpression with valid Component name and >1 params 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; var _tmpl$ = "

Foo

"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -953,8 +969,8 @@ if (import.meta.webpackHot) { `; exports[`rspack-esm (server, non-hydratable) > VariableDeclarator > FunctionExpression > should transform VariableDeclarator w/ FunctionExpression with valid Component name and params 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; var _tmpl$ = "

Foo

"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -976,8 +992,8 @@ if (import.meta.webpackHot) { `; exports[`rspack-esm (server, non-hydratable) > VariableDeclarator > FunctionExpression > should transform VariableDeclarator w/ FunctionExpression with valid Component name and params 2`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; var _tmpl$ = "

Foo

"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -999,16 +1015,20 @@ if (import.meta.webpackHot) { `; exports[`rspack-esm (server, non-hydratable) > VariableDeclarator > FunctionExpression > should transform VariableDeclarator w/ FunctionExpression with valid Component name and params 3`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; -import { escape as _$escape } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; +import { ssrRunInScope as _$ssrRunInScope } from "@solidjs/web"; +import { escape as _$escape } from "@solidjs/web"; var _tmpl$ = ["

", "

"]; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; const example = 'Foo'; const _REGISTRY = _$$registry(); -const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/_$ssr(_tmpl$, _$escape(_props.v0)), { +const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/(() => { + var _v$ = _$ssrRunInScope(() => _$escape(_props.v0)); + return _$ssr(_tmpl$, _v$); +})(), { location: "example.jsx:4:17", signature: "ae0f2a31" }); @@ -1029,7 +1049,7 @@ if (import.meta.webpackHot) { `; exports[`rspack-esm (server, non-hydratable) > VariableDeclarator > FunctionExpression > should transform VariableDeclarator w/ FunctionExpression with valid Component name and params 4`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; @@ -1060,8 +1080,8 @@ if (import.meta.webpackHot) { `; exports[`rspack-esm (server, non-hydratable) > VariableDeclarator > FunctionExpression > should transform VariableDeclarator w/ FunctionExpression with valid Component name and params 5`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; var _tmpl$ = "
bar
", _tmpl$2 = "
foo
"; import { $$component as _$$component } from "solid-refresh"; @@ -1102,14 +1122,17 @@ if (import.meta.webpackHot) { `; exports[`rspack-esm (server, non-hydratable) > fix build > refs > should work with a function 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; var _tmpl$ = "
Comp
"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; const _REGISTRY = _$$registry(); -const Comp_1 = _$$component(_REGISTRY, "Comp_1", _props => /*@refresh jsx-skip*/_$ssr(_tmpl$), { +const Comp_1 = _$$component(_REGISTRY, "Comp_1", _props => /*@refresh jsx-skip*/(() => { + var _ref$ = _props.v0; + return _$ssr(_tmpl$); +})(), { location: "example.jsx:4:19", signature: "6f76290" }); @@ -1128,14 +1151,17 @@ if (import.meta.webpackHot) { `; exports[`rspack-esm (server, non-hydratable) > fix build > refs > should work with a mutable variable 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; var _tmpl$ = "
Comp
"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; const _REGISTRY = _$$registry(); -const Comp_1 = _$$component(_REGISTRY, "Comp_1", _props => /*@refresh jsx-skip*/_$ssr(_tmpl$), { +const Comp_1 = _$$component(_REGISTRY, "Comp_1", _props => /*@refresh jsx-skip*/(() => { + var _ref$ = _props.v0; + return _$ssr(_tmpl$); +})(), { location: "example.jsx:4:19", signature: "6f76290" }); @@ -1160,15 +1186,18 @@ if (import.meta.webpackHot) { `; exports[`rspack-esm (server, non-hydratable) > fix build > signals as refs > should work 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; var _tmpl$ = "
Comp
"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; import { createSignal } from 'solid-js'; const _REGISTRY = _$$registry(); -const Comp_1 = _$$component(_REGISTRY, "Comp_1", _props => /*@refresh jsx-skip*/_$ssr(_tmpl$), { +const Comp_1 = _$$component(_REGISTRY, "Comp_1", _props => /*@refresh jsx-skip*/(() => { + var _ref$ = _props.v0; + return _$ssr(_tmpl$); +})(), { location: "example.jsx:6:19", signature: "6f76290" }); @@ -1194,7 +1223,7 @@ if (import.meta.webpackHot) { `; exports[`rspack-esm (server, non-hydratable) > fix render > @refresh reload > should work 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; import { $$decline as _$$decline } from "solid-refresh"; // @refresh reload import { render } from 'solid-js/web'; @@ -1208,7 +1237,7 @@ if (import.meta.webpackHot) { `; exports[`rspack-esm (server, non-hydratable) > fix render > import specifiers > should work with ImportNamespaceSpecifier 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; @@ -1228,7 +1257,7 @@ if (import.meta.webpackHot) { `; exports[`rspack-esm (server, non-hydratable) > fix render > import specifiers > should work with ImportSpecifier + Identifier 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; @@ -1248,7 +1277,7 @@ if (import.meta.webpackHot) { `; exports[`rspack-esm (server, non-hydratable) > fix render > import specifiers > should work with ImportSpecifier + aliased Identifier 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; @@ -1268,7 +1297,7 @@ if (import.meta.webpackHot) { `; exports[`rspack-esm (server, non-hydratable) > fix render > import specifiers > should work with ImportSpecifier + aliased Identifier from StringLiteral 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; @@ -1288,7 +1317,7 @@ if (import.meta.webpackHot) { `; exports[`rspack-esm (server, non-hydratable) > fix render > top-level statements > should work with IfStatement 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; diff --git a/tests/server/__snapshots__/standard.test.ts.snap b/tests/server/__snapshots__/standard.test.ts.snap index 3b28f5c..773cd0b 100644 --- a/tests/server/__snapshots__/standard.test.ts.snap +++ b/tests/server/__snapshots__/standard.test.ts.snap @@ -32,7 +32,7 @@ if (module.hot) { `; exports[`standard (server, non-hydratable) > ExportDefaultDeclaration w/ FunctionExpression > should skip ExportDefaultDeclaration w/ FunctionExpression with @refresh reload 1`] = ` -"import { ssr as _$ssr } from "solid-js/web"; +"import { ssr as _$ssr } from "@solidjs/web"; var _tmpl$ = "

Foo

"; import { $$decline as _$$decline } from "solid-refresh"; // @refresh reload @@ -45,7 +45,7 @@ if (module.hot) { `; exports[`standard (server, non-hydratable) > ExportDefaultDeclaration w/ FunctionExpression > should skip ExportDefaultDeclaration w/ FunctionExpression with @refresh skip 1`] = ` -"import { ssr as _$ssr } from "solid-js/web"; +"import { ssr as _$ssr } from "@solidjs/web"; var _tmpl$ = "

Foo

"; // @refresh skip export default function Foo() { @@ -54,8 +54,8 @@ export default function Foo() { `; exports[`standard (server, non-hydratable) > ExportDefaultDeclaration w/ FunctionExpression > should skip ExportDefaultDeclaration w/ FunctionExpression with invalid Component name 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; var _tmpl$ = "

Foo

"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -74,8 +74,8 @@ if (module.hot) { `; exports[`standard (server, non-hydratable) > ExportDefaultDeclaration w/ FunctionExpression > should skip ExportDefaultDeclaration w/ FunctionExpression with valid Component name and >1 params 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; var _tmpl$ = "

Foo

"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -94,8 +94,8 @@ if (module.hot) { `; exports[`standard (server, non-hydratable) > ExportDefaultDeclaration w/ FunctionExpression > should transform ExportDefaultDeclaration w/ FunctionExpression with valid Component name and params 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; var _tmpl$ = "

Foo

"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -118,8 +118,8 @@ if (module.hot) { `; exports[`standard (server, non-hydratable) > ExportDefaultDeclaration w/ FunctionExpression > should transform ExportDefaultDeclaration w/ FunctionExpression with valid Component name and params 2`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; var _tmpl$ = "

Foo

"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -142,15 +142,19 @@ if (module.hot) { `; exports[`standard (server, non-hydratable) > ExportDefaultDeclaration w/ FunctionExpression > should transform ExportDefaultDeclaration w/ FunctionExpression with valid Component name and params 3`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; -import { escape as _$escape } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; +import { ssrRunInScope as _$ssrRunInScope } from "@solidjs/web"; +import { escape as _$escape } from "@solidjs/web"; var _tmpl$ = ["

", "

"]; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; const _REGISTRY = _$$registry(); -const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/_$ssr(_tmpl$, _$escape(_props.v0)), { +const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/(() => { + var _v$ = _$ssrRunInScope(() => _$escape(_props.v0)); + return _$ssr(_tmpl$, _v$); +})(), { location: "example.jsx:4:15", signature: "ae0f2a31" }); @@ -173,7 +177,7 @@ if (module.hot) { `; exports[`standard (server, non-hydratable) > ExportDefaultDeclaration w/ FunctionExpression > should transform ExportDefaultDeclaration w/ FunctionExpression with valid Component name and params 4`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; @@ -205,8 +209,8 @@ if (module.hot) { `; exports[`standard (server, non-hydratable) > ExportDefaultDeclaration w/ FunctionExpression > should transform ExportDefaultDeclaration w/ FunctionExpression with valid Component name and params 5`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; var _tmpl$ = "
foo
", _tmpl$2 = "
bar
"; import { $$component as _$$component } from "solid-refresh"; @@ -248,7 +252,7 @@ if (module.hot) { `; exports[`standard (server, non-hydratable) > ExportNamedDeclaration w/ FunctionExpression > should skip ExportNamedDeclaration w/ FunctionExpression with @refresh reload 1`] = ` -"import { ssr as _$ssr } from "solid-js/web"; +"import { ssr as _$ssr } from "@solidjs/web"; var _tmpl$ = "

Foo

"; import { $$decline as _$$decline } from "solid-refresh"; // @refresh reload @@ -261,7 +265,7 @@ if (module.hot) { `; exports[`standard (server, non-hydratable) > ExportNamedDeclaration w/ FunctionExpression > should skip ExportNamedDeclaration w/ FunctionExpression with @refresh skip 1`] = ` -"import { ssr as _$ssr } from "solid-js/web"; +"import { ssr as _$ssr } from "@solidjs/web"; var _tmpl$ = "

Foo

"; // @refresh skip export function Foo() { @@ -270,8 +274,8 @@ export function Foo() { `; exports[`standard (server, non-hydratable) > ExportNamedDeclaration w/ FunctionExpression > should skip ExportNamedDeclaration w/ FunctionExpression with invalid Component name 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; var _tmpl$ = "

Foo

"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -294,8 +298,8 @@ if (module.hot) { `; exports[`standard (server, non-hydratable) > ExportNamedDeclaration w/ FunctionExpression > should skip ExportNamedDeclaration w/ FunctionExpression with valid Component name and >1 params 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; var _tmpl$ = "

Foo

"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -314,8 +318,8 @@ if (module.hot) { `; exports[`standard (server, non-hydratable) > ExportNamedDeclaration w/ FunctionExpression > should transform ExportNamedDeclaration w/ FunctionExpression with valid Component name and params 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; var _tmpl$ = "

Foo

"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -338,8 +342,8 @@ if (module.hot) { `; exports[`standard (server, non-hydratable) > ExportNamedDeclaration w/ FunctionExpression > should transform ExportNamedDeclaration w/ FunctionExpression with valid Component name and params 2`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; var _tmpl$ = "

Foo

"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -362,15 +366,19 @@ if (module.hot) { `; exports[`standard (server, non-hydratable) > ExportNamedDeclaration w/ FunctionExpression > should transform ExportNamedDeclaration w/ FunctionExpression with valid Component name and params 3`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; -import { escape as _$escape } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; +import { ssrRunInScope as _$ssrRunInScope } from "@solidjs/web"; +import { escape as _$escape } from "@solidjs/web"; var _tmpl$ = ["

", "

"]; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; const _REGISTRY = _$$registry(); -const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/_$ssr(_tmpl$, _$escape(_props.v0)), { +const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/(() => { + var _v$ = _$ssrRunInScope(() => _$escape(_props.v0)); + return _$ssr(_tmpl$, _v$); +})(), { location: "example.jsx:4:15", signature: "ae0f2a31" }); @@ -393,7 +401,7 @@ if (module.hot) { `; exports[`standard (server, non-hydratable) > ExportNamedDeclaration w/ FunctionExpression > should transform ExportNamedDeclaration w/ FunctionExpression with valid Component name and params 4`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; @@ -425,8 +433,8 @@ if (module.hot) { `; exports[`standard (server, non-hydratable) > ExportNamedDeclaration w/ FunctionExpression > should transform ExportNamedDeclaration w/ FunctionExpression with valid Component name and params 5`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; var _tmpl$ = "
bar
", _tmpl$2 = "
foo
"; import { $$component as _$$component } from "solid-refresh"; @@ -469,7 +477,7 @@ if (module.hot) { `; exports[`standard (server, non-hydratable) > FunctionDeclaration > should skip FunctionDeclaration with @refresh reload 1`] = ` -"import { ssr as _$ssr } from "solid-js/web"; +"import { ssr as _$ssr } from "@solidjs/web"; var _tmpl$ = "

Foo

"; import { $$decline as _$$decline } from "solid-refresh"; // @refresh reload @@ -482,7 +490,7 @@ if (module.hot) { `; exports[`standard (server, non-hydratable) > FunctionDeclaration > should skip FunctionDeclaration with @refresh skip 1`] = ` -"import { ssr as _$ssr } from "solid-js/web"; +"import { ssr as _$ssr } from "@solidjs/web"; var _tmpl$ = "

Foo

"; // @refresh skip function Foo() { @@ -491,8 +499,8 @@ function Foo() { `; exports[`standard (server, non-hydratable) > FunctionDeclaration > should skip FunctionDeclaration with invalid Component name 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; var _tmpl$ = "

Foo

"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -511,8 +519,8 @@ if (module.hot) { `; exports[`standard (server, non-hydratable) > FunctionDeclaration > should skip FunctionDeclaration with valid Component name and >1 params 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; var _tmpl$ = "

Foo

"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -531,8 +539,8 @@ if (module.hot) { `; exports[`standard (server, non-hydratable) > FunctionDeclaration > should transform FunctionDeclaration with valid Component name and params 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; var _tmpl$ = "

Foo

"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -554,8 +562,8 @@ if (module.hot) { `; exports[`standard (server, non-hydratable) > FunctionDeclaration > should transform FunctionDeclaration with valid Component name and params 2`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; var _tmpl$ = "

Foo

"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -577,15 +585,19 @@ if (module.hot) { `; exports[`standard (server, non-hydratable) > FunctionDeclaration > should transform FunctionDeclaration with valid Component name and params 3`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; -import { escape as _$escape } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; +import { ssrRunInScope as _$ssrRunInScope } from "@solidjs/web"; +import { escape as _$escape } from "@solidjs/web"; var _tmpl$ = ["

", "

"]; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; const _REGISTRY = _$$registry(); -const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/_$ssr(_tmpl$, _$escape(_props.v0)), { +const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/(() => { + var _v$ = _$ssrRunInScope(() => _$escape(_props.v0)); + return _$ssr(_tmpl$, _v$); +})(), { location: "example.jsx:4:15", signature: "ae0f2a31" }); @@ -607,7 +619,7 @@ if (module.hot) { `; exports[`standard (server, non-hydratable) > FunctionDeclaration > should transform FunctionDeclaration with valid Component name and params 4`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; @@ -638,8 +650,8 @@ if (module.hot) { `; exports[`standard (server, non-hydratable) > FunctionDeclaration > should transform FunctionDeclaration with valid Component name and params 5`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; var _tmpl$ = "
foo
", _tmpl$2 = "
bar
"; import { $$component as _$$component } from "solid-refresh"; @@ -680,7 +692,7 @@ if (module.hot) { `; exports[`standard (server, non-hydratable) > VariableDeclarator > ArrowFunctionExpression > should skip VariableDeclarator w/ ArrowFunctionExpression with @refresh reload 1`] = ` -"import { ssr as _$ssr } from "solid-js/web"; +"import { ssr as _$ssr } from "@solidjs/web"; var _tmpl$ = "

Foo

"; import { $$decline as _$$decline } from "solid-refresh"; // @refresh reload @@ -693,7 +705,7 @@ if (module.hot) { `; exports[`standard (server, non-hydratable) > VariableDeclarator > ArrowFunctionExpression > should skip VariableDeclarator w/ ArrowFunctionExpression with @refresh skip 1`] = ` -"import { ssr as _$ssr } from "solid-js/web"; +"import { ssr as _$ssr } from "@solidjs/web"; var _tmpl$ = "

Foo

"; // @refresh skip const Foo = () => { @@ -702,8 +714,8 @@ const Foo = () => { `; exports[`standard (server, non-hydratable) > VariableDeclarator > ArrowFunctionExpression > should skip VariableDeclarator w/ ArrowFunctionExpression with invalid Component name 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; var _tmpl$ = "

Foo

"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -722,8 +734,8 @@ if (module.hot) { `; exports[`standard (server, non-hydratable) > VariableDeclarator > ArrowFunctionExpression > should skip VariableDeclarator w/ ArrowFunctionExpression with valid Component name and >1 params 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; var _tmpl$ = "

Foo

"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -742,8 +754,8 @@ if (module.hot) { `; exports[`standard (server, non-hydratable) > VariableDeclarator > ArrowFunctionExpression > should transform VariableDeclarator w/ ArrowFunctionExpression with valid Component name and params 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; var _tmpl$ = "

Foo

"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -765,8 +777,8 @@ if (module.hot) { `; exports[`standard (server, non-hydratable) > VariableDeclarator > ArrowFunctionExpression > should transform VariableDeclarator w/ ArrowFunctionExpression with valid Component name and params 2`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; var _tmpl$ = "

Foo

"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -788,16 +800,20 @@ if (module.hot) { `; exports[`standard (server, non-hydratable) > VariableDeclarator > ArrowFunctionExpression > should transform VariableDeclarator w/ ArrowFunctionExpression with valid Component name and params 3`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; -import { escape as _$escape } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; +import { ssrRunInScope as _$ssrRunInScope } from "@solidjs/web"; +import { escape as _$escape } from "@solidjs/web"; var _tmpl$ = ["

", "

"]; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; const example = 'Foo'; const _REGISTRY = _$$registry(); -const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/_$ssr(_tmpl$, _$escape(_props.v0)), { +const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/(() => { + var _v$ = _$ssrRunInScope(() => _$escape(_props.v0)); + return _$ssr(_tmpl$, _v$); +})(), { location: "example.jsx:4:17", signature: "ae0f2a31" }); @@ -818,7 +834,7 @@ if (module.hot) { `; exports[`standard (server, non-hydratable) > VariableDeclarator > ArrowFunctionExpression > should transform VariableDeclarator w/ ArrowFunctionExpression with valid Component name and params 4`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; @@ -849,8 +865,8 @@ if (module.hot) { `; exports[`standard (server, non-hydratable) > VariableDeclarator > ArrowFunctionExpression > should transform VariableDeclarator w/ ArrowFunctionExpression with valid Component name and params 5`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; var _tmpl$ = "
bar
", _tmpl$2 = "
foo
"; import { $$component as _$$component } from "solid-refresh"; @@ -891,7 +907,7 @@ if (module.hot) { `; exports[`standard (server, non-hydratable) > VariableDeclarator > FunctionExpression > should skip VariableDeclarator w/ FunctionExpression with @refresh reload 1`] = ` -"import { ssr as _$ssr } from "solid-js/web"; +"import { ssr as _$ssr } from "@solidjs/web"; var _tmpl$ = "

Foo

"; import { $$decline as _$$decline } from "solid-refresh"; // @refresh reload @@ -904,7 +920,7 @@ if (module.hot) { `; exports[`standard (server, non-hydratable) > VariableDeclarator > FunctionExpression > should skip VariableDeclarator w/ FunctionExpression with @refresh skip 1`] = ` -"import { ssr as _$ssr } from "solid-js/web"; +"import { ssr as _$ssr } from "@solidjs/web"; var _tmpl$ = "

Foo

"; // @refresh skip const Foo = function () { @@ -913,8 +929,8 @@ const Foo = function () { `; exports[`standard (server, non-hydratable) > VariableDeclarator > FunctionExpression > should skip VariableDeclarator w/ FunctionExpression with invalid Component name 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; var _tmpl$ = "

Foo

"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -933,8 +949,8 @@ if (module.hot) { `; exports[`standard (server, non-hydratable) > VariableDeclarator > FunctionExpression > should skip VariableDeclarator w/ FunctionExpression with valid Component name and >1 params 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; var _tmpl$ = "

Foo

"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -953,8 +969,8 @@ if (module.hot) { `; exports[`standard (server, non-hydratable) > VariableDeclarator > FunctionExpression > should transform VariableDeclarator w/ FunctionExpression with valid Component name and params 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; var _tmpl$ = "

Foo

"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -976,8 +992,8 @@ if (module.hot) { `; exports[`standard (server, non-hydratable) > VariableDeclarator > FunctionExpression > should transform VariableDeclarator w/ FunctionExpression with valid Component name and params 2`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; var _tmpl$ = "

Foo

"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -999,16 +1015,20 @@ if (module.hot) { `; exports[`standard (server, non-hydratable) > VariableDeclarator > FunctionExpression > should transform VariableDeclarator w/ FunctionExpression with valid Component name and params 3`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; -import { escape as _$escape } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; +import { ssrRunInScope as _$ssrRunInScope } from "@solidjs/web"; +import { escape as _$escape } from "@solidjs/web"; var _tmpl$ = ["

", "

"]; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; const example = 'Foo'; const _REGISTRY = _$$registry(); -const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/_$ssr(_tmpl$, _$escape(_props.v0)), { +const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/(() => { + var _v$ = _$ssrRunInScope(() => _$escape(_props.v0)); + return _$ssr(_tmpl$, _v$); +})(), { location: "example.jsx:4:17", signature: "ae0f2a31" }); @@ -1029,7 +1049,7 @@ if (module.hot) { `; exports[`standard (server, non-hydratable) > VariableDeclarator > FunctionExpression > should transform VariableDeclarator w/ FunctionExpression with valid Component name and params 4`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; @@ -1060,8 +1080,8 @@ if (module.hot) { `; exports[`standard (server, non-hydratable) > VariableDeclarator > FunctionExpression > should transform VariableDeclarator w/ FunctionExpression with valid Component name and params 5`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; var _tmpl$ = "
bar
", _tmpl$2 = "
foo
"; import { $$component as _$$component } from "solid-refresh"; @@ -1102,14 +1122,17 @@ if (module.hot) { `; exports[`standard (server, non-hydratable) > fix build > refs > should work with a function 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; var _tmpl$ = "
Comp
"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; const _REGISTRY = _$$registry(); -const Comp_1 = _$$component(_REGISTRY, "Comp_1", _props => /*@refresh jsx-skip*/_$ssr(_tmpl$), { +const Comp_1 = _$$component(_REGISTRY, "Comp_1", _props => /*@refresh jsx-skip*/(() => { + var _ref$ = _props.v0; + return _$ssr(_tmpl$); +})(), { location: "example.jsx:4:19", signature: "6f76290" }); @@ -1128,14 +1151,17 @@ if (module.hot) { `; exports[`standard (server, non-hydratable) > fix build > refs > should work with a mutable variable 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; var _tmpl$ = "
Comp
"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; const _REGISTRY = _$$registry(); -const Comp_1 = _$$component(_REGISTRY, "Comp_1", _props => /*@refresh jsx-skip*/_$ssr(_tmpl$), { +const Comp_1 = _$$component(_REGISTRY, "Comp_1", _props => /*@refresh jsx-skip*/(() => { + var _ref$ = _props.v0; + return _$ssr(_tmpl$); +})(), { location: "example.jsx:4:19", signature: "6f76290" }); @@ -1160,15 +1186,18 @@ if (module.hot) { `; exports[`standard (server, non-hydratable) > fix build > signals as refs > should work 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; var _tmpl$ = "
Comp
"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; import { createSignal } from 'solid-js'; const _REGISTRY = _$$registry(); -const Comp_1 = _$$component(_REGISTRY, "Comp_1", _props => /*@refresh jsx-skip*/_$ssr(_tmpl$), { +const Comp_1 = _$$component(_REGISTRY, "Comp_1", _props => /*@refresh jsx-skip*/(() => { + var _ref$ = _props.v0; + return _$ssr(_tmpl$); +})(), { location: "example.jsx:6:19", signature: "6f76290" }); @@ -1194,7 +1223,7 @@ if (module.hot) { `; exports[`standard (server, non-hydratable) > fix render > @refresh reload > should work 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; import { $$decline as _$$decline } from "solid-refresh"; // @refresh reload import { render } from 'solid-js/web'; @@ -1208,7 +1237,7 @@ if (module.hot) { `; exports[`standard (server, non-hydratable) > fix render > import specifiers > should work with ImportNamespaceSpecifier 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; @@ -1228,7 +1257,7 @@ if (module.hot) { `; exports[`standard (server, non-hydratable) > fix render > import specifiers > should work with ImportSpecifier + Identifier 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; @@ -1248,7 +1277,7 @@ if (module.hot) { `; exports[`standard (server, non-hydratable) > fix render > import specifiers > should work with ImportSpecifier + aliased Identifier 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; @@ -1268,7 +1297,7 @@ if (module.hot) { `; exports[`standard (server, non-hydratable) > fix render > import specifiers > should work with ImportSpecifier + aliased Identifier from StringLiteral 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; @@ -1288,7 +1317,7 @@ if (module.hot) { `; exports[`standard (server, non-hydratable) > fix render > top-level statements > should work with IfStatement 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; diff --git a/tests/server/__snapshots__/vite.test.ts.snap b/tests/server/__snapshots__/vite.test.ts.snap index 33cfa1b..7374545 100644 --- a/tests/server/__snapshots__/vite.test.ts.snap +++ b/tests/server/__snapshots__/vite.test.ts.snap @@ -34,7 +34,7 @@ if (import.meta.hot) { `; exports[`vite (server, non-hydratable) > ExportDefaultDeclaration w/ FunctionExpression > should skip ExportDefaultDeclaration w/ FunctionExpression with @refresh reload 1`] = ` -"import { ssr as _$ssr } from "solid-js/web"; +"import { ssr as _$ssr } from "@solidjs/web"; var _tmpl$ = "

Foo

"; // @refresh reload export default function Foo() { @@ -46,7 +46,7 @@ if (import.meta.hot) { `; exports[`vite (server, non-hydratable) > ExportDefaultDeclaration w/ FunctionExpression > should skip ExportDefaultDeclaration w/ FunctionExpression with @refresh skip 1`] = ` -"import { ssr as _$ssr } from "solid-js/web"; +"import { ssr as _$ssr } from "@solidjs/web"; var _tmpl$ = "

Foo

"; // @refresh skip export default function Foo() { @@ -55,8 +55,8 @@ export default function Foo() { `; exports[`vite (server, non-hydratable) > ExportDefaultDeclaration w/ FunctionExpression > should skip ExportDefaultDeclaration w/ FunctionExpression with invalid Component name 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; var _tmpl$ = "

Foo

"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -76,8 +76,8 @@ if (import.meta.hot) { `; exports[`vite (server, non-hydratable) > ExportDefaultDeclaration w/ FunctionExpression > should skip ExportDefaultDeclaration w/ FunctionExpression with valid Component name and >1 params 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; var _tmpl$ = "

Foo

"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -97,8 +97,8 @@ if (import.meta.hot) { `; exports[`vite (server, non-hydratable) > ExportDefaultDeclaration w/ FunctionExpression > should transform ExportDefaultDeclaration w/ FunctionExpression with valid Component name and params 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; var _tmpl$ = "

Foo

"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -122,8 +122,8 @@ if (import.meta.hot) { `; exports[`vite (server, non-hydratable) > ExportDefaultDeclaration w/ FunctionExpression > should transform ExportDefaultDeclaration w/ FunctionExpression with valid Component name and params 2`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; var _tmpl$ = "

Foo

"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -147,15 +147,19 @@ if (import.meta.hot) { `; exports[`vite (server, non-hydratable) > ExportDefaultDeclaration w/ FunctionExpression > should transform ExportDefaultDeclaration w/ FunctionExpression with valid Component name and params 3`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; -import { escape as _$escape } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; +import { ssrRunInScope as _$ssrRunInScope } from "@solidjs/web"; +import { escape as _$escape } from "@solidjs/web"; var _tmpl$ = ["

", "

"]; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; const _REGISTRY = _$$registry(); -const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/_$ssr(_tmpl$, _$escape(_props.v0)), { +const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/(() => { + var _v$ = _$ssrRunInScope(() => _$escape(_props.v0)); + return _$ssr(_tmpl$, _v$); +})(), { location: "example.jsx:4:15", signature: "ae0f2a31" }); @@ -179,7 +183,7 @@ if (import.meta.hot) { `; exports[`vite (server, non-hydratable) > ExportDefaultDeclaration w/ FunctionExpression > should transform ExportDefaultDeclaration w/ FunctionExpression with valid Component name and params 4`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; @@ -212,8 +216,8 @@ if (import.meta.hot) { `; exports[`vite (server, non-hydratable) > ExportDefaultDeclaration w/ FunctionExpression > should transform ExportDefaultDeclaration w/ FunctionExpression with valid Component name and params 5`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; var _tmpl$ = "
foo
", _tmpl$2 = "
bar
"; import { $$component as _$$component } from "solid-refresh"; @@ -256,7 +260,7 @@ if (import.meta.hot) { `; exports[`vite (server, non-hydratable) > ExportNamedDeclaration w/ FunctionExpression > should skip ExportNamedDeclaration w/ FunctionExpression with @refresh reload 1`] = ` -"import { ssr as _$ssr } from "solid-js/web"; +"import { ssr as _$ssr } from "@solidjs/web"; var _tmpl$ = "

Foo

"; // @refresh reload export function Foo() { @@ -268,7 +272,7 @@ if (import.meta.hot) { `; exports[`vite (server, non-hydratable) > ExportNamedDeclaration w/ FunctionExpression > should skip ExportNamedDeclaration w/ FunctionExpression with @refresh skip 1`] = ` -"import { ssr as _$ssr } from "solid-js/web"; +"import { ssr as _$ssr } from "@solidjs/web"; var _tmpl$ = "

Foo

"; // @refresh skip export function Foo() { @@ -277,8 +281,8 @@ export function Foo() { `; exports[`vite (server, non-hydratable) > ExportNamedDeclaration w/ FunctionExpression > should skip ExportNamedDeclaration w/ FunctionExpression with invalid Component name 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; var _tmpl$ = "

Foo

"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -302,8 +306,8 @@ if (import.meta.hot) { `; exports[`vite (server, non-hydratable) > ExportNamedDeclaration w/ FunctionExpression > should skip ExportNamedDeclaration w/ FunctionExpression with valid Component name and >1 params 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; var _tmpl$ = "

Foo

"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -323,8 +327,8 @@ if (import.meta.hot) { `; exports[`vite (server, non-hydratable) > ExportNamedDeclaration w/ FunctionExpression > should transform ExportNamedDeclaration w/ FunctionExpression with valid Component name and params 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; var _tmpl$ = "

Foo

"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -348,8 +352,8 @@ if (import.meta.hot) { `; exports[`vite (server, non-hydratable) > ExportNamedDeclaration w/ FunctionExpression > should transform ExportNamedDeclaration w/ FunctionExpression with valid Component name and params 2`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; var _tmpl$ = "

Foo

"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -373,15 +377,19 @@ if (import.meta.hot) { `; exports[`vite (server, non-hydratable) > ExportNamedDeclaration w/ FunctionExpression > should transform ExportNamedDeclaration w/ FunctionExpression with valid Component name and params 3`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; -import { escape as _$escape } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; +import { ssrRunInScope as _$ssrRunInScope } from "@solidjs/web"; +import { escape as _$escape } from "@solidjs/web"; var _tmpl$ = ["

", "

"]; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; const _REGISTRY = _$$registry(); -const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/_$ssr(_tmpl$, _$escape(_props.v0)), { +const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/(() => { + var _v$ = _$ssrRunInScope(() => _$escape(_props.v0)); + return _$ssr(_tmpl$, _v$); +})(), { location: "example.jsx:4:15", signature: "ae0f2a31" }); @@ -405,7 +413,7 @@ if (import.meta.hot) { `; exports[`vite (server, non-hydratable) > ExportNamedDeclaration w/ FunctionExpression > should transform ExportNamedDeclaration w/ FunctionExpression with valid Component name and params 4`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; @@ -438,8 +446,8 @@ if (import.meta.hot) { `; exports[`vite (server, non-hydratable) > ExportNamedDeclaration w/ FunctionExpression > should transform ExportNamedDeclaration w/ FunctionExpression with valid Component name and params 5`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; var _tmpl$ = "
bar
", _tmpl$2 = "
foo
"; import { $$component as _$$component } from "solid-refresh"; @@ -483,7 +491,7 @@ if (import.meta.hot) { `; exports[`vite (server, non-hydratable) > FunctionDeclaration > should skip FunctionDeclaration with @refresh reload 1`] = ` -"import { ssr as _$ssr } from "solid-js/web"; +"import { ssr as _$ssr } from "@solidjs/web"; var _tmpl$ = "

Foo

"; // @refresh reload function Foo() { @@ -495,7 +503,7 @@ if (import.meta.hot) { `; exports[`vite (server, non-hydratable) > FunctionDeclaration > should skip FunctionDeclaration with @refresh skip 1`] = ` -"import { ssr as _$ssr } from "solid-js/web"; +"import { ssr as _$ssr } from "@solidjs/web"; var _tmpl$ = "

Foo

"; // @refresh skip function Foo() { @@ -504,8 +512,8 @@ function Foo() { `; exports[`vite (server, non-hydratable) > FunctionDeclaration > should skip FunctionDeclaration with invalid Component name 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; var _tmpl$ = "

Foo

"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -525,8 +533,8 @@ if (import.meta.hot) { `; exports[`vite (server, non-hydratable) > FunctionDeclaration > should skip FunctionDeclaration with valid Component name and >1 params 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; var _tmpl$ = "

Foo

"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -546,8 +554,8 @@ if (import.meta.hot) { `; exports[`vite (server, non-hydratable) > FunctionDeclaration > should transform FunctionDeclaration with valid Component name and params 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; var _tmpl$ = "

Foo

"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -570,8 +578,8 @@ if (import.meta.hot) { `; exports[`vite (server, non-hydratable) > FunctionDeclaration > should transform FunctionDeclaration with valid Component name and params 2`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; var _tmpl$ = "

Foo

"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -594,15 +602,19 @@ if (import.meta.hot) { `; exports[`vite (server, non-hydratable) > FunctionDeclaration > should transform FunctionDeclaration with valid Component name and params 3`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; -import { escape as _$escape } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; +import { ssrRunInScope as _$ssrRunInScope } from "@solidjs/web"; +import { escape as _$escape } from "@solidjs/web"; var _tmpl$ = ["

", "

"]; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; const _REGISTRY = _$$registry(); -const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/_$ssr(_tmpl$, _$escape(_props.v0)), { +const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/(() => { + var _v$ = _$ssrRunInScope(() => _$escape(_props.v0)); + return _$ssr(_tmpl$, _v$); +})(), { location: "example.jsx:4:15", signature: "ae0f2a31" }); @@ -625,7 +637,7 @@ if (import.meta.hot) { `; exports[`vite (server, non-hydratable) > FunctionDeclaration > should transform FunctionDeclaration with valid Component name and params 4`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; @@ -657,8 +669,8 @@ if (import.meta.hot) { `; exports[`vite (server, non-hydratable) > FunctionDeclaration > should transform FunctionDeclaration with valid Component name and params 5`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; var _tmpl$ = "
foo
", _tmpl$2 = "
bar
"; import { $$component as _$$component } from "solid-refresh"; @@ -700,7 +712,7 @@ if (import.meta.hot) { `; exports[`vite (server, non-hydratable) > VariableDeclarator > ArrowFunctionExpression > should skip VariableDeclarator w/ ArrowFunctionExpression with @refresh reload 1`] = ` -"import { ssr as _$ssr } from "solid-js/web"; +"import { ssr as _$ssr } from "@solidjs/web"; var _tmpl$ = "

Foo

"; // @refresh reload const Foo = () => { @@ -712,7 +724,7 @@ if (import.meta.hot) { `; exports[`vite (server, non-hydratable) > VariableDeclarator > ArrowFunctionExpression > should skip VariableDeclarator w/ ArrowFunctionExpression with @refresh skip 1`] = ` -"import { ssr as _$ssr } from "solid-js/web"; +"import { ssr as _$ssr } from "@solidjs/web"; var _tmpl$ = "

Foo

"; // @refresh skip const Foo = () => { @@ -721,8 +733,8 @@ const Foo = () => { `; exports[`vite (server, non-hydratable) > VariableDeclarator > ArrowFunctionExpression > should skip VariableDeclarator w/ ArrowFunctionExpression with invalid Component name 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; var _tmpl$ = "

Foo

"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -742,8 +754,8 @@ if (import.meta.hot) { `; exports[`vite (server, non-hydratable) > VariableDeclarator > ArrowFunctionExpression > should skip VariableDeclarator w/ ArrowFunctionExpression with valid Component name and >1 params 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; var _tmpl$ = "

Foo

"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -763,8 +775,8 @@ if (import.meta.hot) { `; exports[`vite (server, non-hydratable) > VariableDeclarator > ArrowFunctionExpression > should transform VariableDeclarator w/ ArrowFunctionExpression with valid Component name and params 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; var _tmpl$ = "

Foo

"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -787,8 +799,8 @@ if (import.meta.hot) { `; exports[`vite (server, non-hydratable) > VariableDeclarator > ArrowFunctionExpression > should transform VariableDeclarator w/ ArrowFunctionExpression with valid Component name and params 2`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; var _tmpl$ = "

Foo

"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -811,16 +823,20 @@ if (import.meta.hot) { `; exports[`vite (server, non-hydratable) > VariableDeclarator > ArrowFunctionExpression > should transform VariableDeclarator w/ ArrowFunctionExpression with valid Component name and params 3`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; -import { escape as _$escape } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; +import { ssrRunInScope as _$ssrRunInScope } from "@solidjs/web"; +import { escape as _$escape } from "@solidjs/web"; var _tmpl$ = ["

", "

"]; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; const example = 'Foo'; const _REGISTRY = _$$registry(); -const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/_$ssr(_tmpl$, _$escape(_props.v0)), { +const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/(() => { + var _v$ = _$ssrRunInScope(() => _$escape(_props.v0)); + return _$ssr(_tmpl$, _v$); +})(), { location: "example.jsx:4:17", signature: "ae0f2a31" }); @@ -842,7 +858,7 @@ if (import.meta.hot) { `; exports[`vite (server, non-hydratable) > VariableDeclarator > ArrowFunctionExpression > should transform VariableDeclarator w/ ArrowFunctionExpression with valid Component name and params 4`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; @@ -874,8 +890,8 @@ if (import.meta.hot) { `; exports[`vite (server, non-hydratable) > VariableDeclarator > ArrowFunctionExpression > should transform VariableDeclarator w/ ArrowFunctionExpression with valid Component name and params 5`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; var _tmpl$ = "
bar
", _tmpl$2 = "
foo
"; import { $$component as _$$component } from "solid-refresh"; @@ -917,7 +933,7 @@ if (import.meta.hot) { `; exports[`vite (server, non-hydratable) > VariableDeclarator > FunctionExpression > should skip VariableDeclarator w/ FunctionExpression with @refresh reload 1`] = ` -"import { ssr as _$ssr } from "solid-js/web"; +"import { ssr as _$ssr } from "@solidjs/web"; var _tmpl$ = "

Foo

"; // @refresh reload const Foo = function () { @@ -929,7 +945,7 @@ if (import.meta.hot) { `; exports[`vite (server, non-hydratable) > VariableDeclarator > FunctionExpression > should skip VariableDeclarator w/ FunctionExpression with @refresh skip 1`] = ` -"import { ssr as _$ssr } from "solid-js/web"; +"import { ssr as _$ssr } from "@solidjs/web"; var _tmpl$ = "

Foo

"; // @refresh skip const Foo = function () { @@ -938,8 +954,8 @@ const Foo = function () { `; exports[`vite (server, non-hydratable) > VariableDeclarator > FunctionExpression > should skip VariableDeclarator w/ FunctionExpression with invalid Component name 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; var _tmpl$ = "

Foo

"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -959,8 +975,8 @@ if (import.meta.hot) { `; exports[`vite (server, non-hydratable) > VariableDeclarator > FunctionExpression > should skip VariableDeclarator w/ FunctionExpression with valid Component name and >1 params 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; var _tmpl$ = "

Foo

"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -980,8 +996,8 @@ if (import.meta.hot) { `; exports[`vite (server, non-hydratable) > VariableDeclarator > FunctionExpression > should transform VariableDeclarator w/ FunctionExpression with valid Component name and params 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; var _tmpl$ = "

Foo

"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -1004,8 +1020,8 @@ if (import.meta.hot) { `; exports[`vite (server, non-hydratable) > VariableDeclarator > FunctionExpression > should transform VariableDeclarator w/ FunctionExpression with valid Component name and params 2`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; var _tmpl$ = "

Foo

"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -1028,16 +1044,20 @@ if (import.meta.hot) { `; exports[`vite (server, non-hydratable) > VariableDeclarator > FunctionExpression > should transform VariableDeclarator w/ FunctionExpression with valid Component name and params 3`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; -import { escape as _$escape } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; +import { ssrRunInScope as _$ssrRunInScope } from "@solidjs/web"; +import { escape as _$escape } from "@solidjs/web"; var _tmpl$ = ["

", "

"]; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; const example = 'Foo'; const _REGISTRY = _$$registry(); -const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/_$ssr(_tmpl$, _$escape(_props.v0)), { +const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/(() => { + var _v$ = _$ssrRunInScope(() => _$escape(_props.v0)); + return _$ssr(_tmpl$, _v$); +})(), { location: "example.jsx:4:17", signature: "ae0f2a31" }); @@ -1059,7 +1079,7 @@ if (import.meta.hot) { `; exports[`vite (server, non-hydratable) > VariableDeclarator > FunctionExpression > should transform VariableDeclarator w/ FunctionExpression with valid Component name and params 4`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; @@ -1091,8 +1111,8 @@ if (import.meta.hot) { `; exports[`vite (server, non-hydratable) > VariableDeclarator > FunctionExpression > should transform VariableDeclarator w/ FunctionExpression with valid Component name and params 5`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; var _tmpl$ = "
bar
", _tmpl$2 = "
foo
"; import { $$component as _$$component } from "solid-refresh"; @@ -1134,14 +1154,17 @@ if (import.meta.hot) { `; exports[`vite (server, non-hydratable) > fix build > refs > should work with a function 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; var _tmpl$ = "
Comp
"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; const _REGISTRY = _$$registry(); -const Comp_1 = _$$component(_REGISTRY, "Comp_1", _props => /*@refresh jsx-skip*/_$ssr(_tmpl$), { +const Comp_1 = _$$component(_REGISTRY, "Comp_1", _props => /*@refresh jsx-skip*/(() => { + var _ref$ = _props.v0; + return _$ssr(_tmpl$); +})(), { location: "example.jsx:4:19", signature: "6f76290" }); @@ -1161,14 +1184,17 @@ if (import.meta.hot) { `; exports[`vite (server, non-hydratable) > fix build > refs > should work with a mutable variable 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; var _tmpl$ = "
Comp
"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; const _REGISTRY = _$$registry(); -const Comp_1 = _$$component(_REGISTRY, "Comp_1", _props => /*@refresh jsx-skip*/_$ssr(_tmpl$), { +const Comp_1 = _$$component(_REGISTRY, "Comp_1", _props => /*@refresh jsx-skip*/(() => { + var _ref$ = _props.v0; + return _$ssr(_tmpl$); +})(), { location: "example.jsx:4:19", signature: "6f76290" }); @@ -1194,15 +1220,18 @@ if (import.meta.hot) { `; exports[`vite (server, non-hydratable) > fix build > signals as refs > should work 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; var _tmpl$ = "
Comp
"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; import { createSignal } from 'solid-js'; const _REGISTRY = _$$registry(); -const Comp_1 = _$$component(_REGISTRY, "Comp_1", _props => /*@refresh jsx-skip*/_$ssr(_tmpl$), { +const Comp_1 = _$$component(_REGISTRY, "Comp_1", _props => /*@refresh jsx-skip*/(() => { + var _ref$ = _props.v0; + return _$ssr(_tmpl$); +})(), { location: "example.jsx:6:19", signature: "6f76290" }); @@ -1229,7 +1258,7 @@ if (import.meta.hot) { `; exports[`vite (server, non-hydratable) > fix render > @refresh reload > should work 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; // @refresh reload import { render } from 'solid-js/web'; if (root) { @@ -1242,7 +1271,7 @@ if (import.meta.hot) { `; exports[`vite (server, non-hydratable) > fix render > import specifiers > should work with ImportNamespaceSpecifier 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; @@ -1263,7 +1292,7 @@ if (import.meta.hot) { `; exports[`vite (server, non-hydratable) > fix render > import specifiers > should work with ImportSpecifier + Identifier 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; @@ -1284,7 +1313,7 @@ if (import.meta.hot) { `; exports[`vite (server, non-hydratable) > fix render > import specifiers > should work with ImportSpecifier + aliased Identifier 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; @@ -1305,7 +1334,7 @@ if (import.meta.hot) { `; exports[`vite (server, non-hydratable) > fix render > import specifiers > should work with ImportSpecifier + aliased Identifier from StringLiteral 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; @@ -1326,7 +1355,7 @@ if (import.meta.hot) { `; exports[`vite (server, non-hydratable) > fix render > top-level statements > should work with IfStatement 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; diff --git a/tests/server/__snapshots__/webpack5.test.ts.snap b/tests/server/__snapshots__/webpack5.test.ts.snap index 669e2b3..0b95155 100644 --- a/tests/server/__snapshots__/webpack5.test.ts.snap +++ b/tests/server/__snapshots__/webpack5.test.ts.snap @@ -32,7 +32,7 @@ if (import.meta.webpackHot) { `; exports[`webpack5 (server, non-hydratable) > ExportDefaultDeclaration w/ FunctionExpression > should skip ExportDefaultDeclaration w/ FunctionExpression with @refresh reload 1`] = ` -"import { ssr as _$ssr } from "solid-js/web"; +"import { ssr as _$ssr } from "@solidjs/web"; var _tmpl$ = "

Foo

"; import { $$decline as _$$decline } from "solid-refresh"; // @refresh reload @@ -45,7 +45,7 @@ if (import.meta.webpackHot) { `; exports[`webpack5 (server, non-hydratable) > ExportDefaultDeclaration w/ FunctionExpression > should skip ExportDefaultDeclaration w/ FunctionExpression with @refresh skip 1`] = ` -"import { ssr as _$ssr } from "solid-js/web"; +"import { ssr as _$ssr } from "@solidjs/web"; var _tmpl$ = "

Foo

"; // @refresh skip export default function Foo() { @@ -54,8 +54,8 @@ export default function Foo() { `; exports[`webpack5 (server, non-hydratable) > ExportDefaultDeclaration w/ FunctionExpression > should skip ExportDefaultDeclaration w/ FunctionExpression with invalid Component name 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; var _tmpl$ = "

Foo

"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -74,8 +74,8 @@ if (import.meta.webpackHot) { `; exports[`webpack5 (server, non-hydratable) > ExportDefaultDeclaration w/ FunctionExpression > should skip ExportDefaultDeclaration w/ FunctionExpression with valid Component name and >1 params 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; var _tmpl$ = "

Foo

"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -94,8 +94,8 @@ if (import.meta.webpackHot) { `; exports[`webpack5 (server, non-hydratable) > ExportDefaultDeclaration w/ FunctionExpression > should transform ExportDefaultDeclaration w/ FunctionExpression with valid Component name and params 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; var _tmpl$ = "

Foo

"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -118,8 +118,8 @@ if (import.meta.webpackHot) { `; exports[`webpack5 (server, non-hydratable) > ExportDefaultDeclaration w/ FunctionExpression > should transform ExportDefaultDeclaration w/ FunctionExpression with valid Component name and params 2`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; var _tmpl$ = "

Foo

"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -142,15 +142,19 @@ if (import.meta.webpackHot) { `; exports[`webpack5 (server, non-hydratable) > ExportDefaultDeclaration w/ FunctionExpression > should transform ExportDefaultDeclaration w/ FunctionExpression with valid Component name and params 3`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; -import { escape as _$escape } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; +import { ssrRunInScope as _$ssrRunInScope } from "@solidjs/web"; +import { escape as _$escape } from "@solidjs/web"; var _tmpl$ = ["

", "

"]; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; const _REGISTRY = _$$registry(); -const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/_$ssr(_tmpl$, _$escape(_props.v0)), { +const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/(() => { + var _v$ = _$ssrRunInScope(() => _$escape(_props.v0)); + return _$ssr(_tmpl$, _v$); +})(), { location: "example.jsx:4:15", signature: "ae0f2a31" }); @@ -173,7 +177,7 @@ if (import.meta.webpackHot) { `; exports[`webpack5 (server, non-hydratable) > ExportDefaultDeclaration w/ FunctionExpression > should transform ExportDefaultDeclaration w/ FunctionExpression with valid Component name and params 4`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; @@ -205,8 +209,8 @@ if (import.meta.webpackHot) { `; exports[`webpack5 (server, non-hydratable) > ExportDefaultDeclaration w/ FunctionExpression > should transform ExportDefaultDeclaration w/ FunctionExpression with valid Component name and params 5`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; var _tmpl$ = "
foo
", _tmpl$2 = "
bar
"; import { $$component as _$$component } from "solid-refresh"; @@ -248,7 +252,7 @@ if (import.meta.webpackHot) { `; exports[`webpack5 (server, non-hydratable) > ExportNamedDeclaration w/ FunctionExpression > should skip ExportNamedDeclaration w/ FunctionExpression with @refresh reload 1`] = ` -"import { ssr as _$ssr } from "solid-js/web"; +"import { ssr as _$ssr } from "@solidjs/web"; var _tmpl$ = "

Foo

"; import { $$decline as _$$decline } from "solid-refresh"; // @refresh reload @@ -261,7 +265,7 @@ if (import.meta.webpackHot) { `; exports[`webpack5 (server, non-hydratable) > ExportNamedDeclaration w/ FunctionExpression > should skip ExportNamedDeclaration w/ FunctionExpression with @refresh skip 1`] = ` -"import { ssr as _$ssr } from "solid-js/web"; +"import { ssr as _$ssr } from "@solidjs/web"; var _tmpl$ = "

Foo

"; // @refresh skip export function Foo() { @@ -270,8 +274,8 @@ export function Foo() { `; exports[`webpack5 (server, non-hydratable) > ExportNamedDeclaration w/ FunctionExpression > should skip ExportNamedDeclaration w/ FunctionExpression with invalid Component name 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; var _tmpl$ = "

Foo

"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -294,8 +298,8 @@ if (import.meta.webpackHot) { `; exports[`webpack5 (server, non-hydratable) > ExportNamedDeclaration w/ FunctionExpression > should skip ExportNamedDeclaration w/ FunctionExpression with valid Component name and >1 params 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; var _tmpl$ = "

Foo

"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -314,8 +318,8 @@ if (import.meta.webpackHot) { `; exports[`webpack5 (server, non-hydratable) > ExportNamedDeclaration w/ FunctionExpression > should transform ExportNamedDeclaration w/ FunctionExpression with valid Component name and params 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; var _tmpl$ = "

Foo

"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -338,8 +342,8 @@ if (import.meta.webpackHot) { `; exports[`webpack5 (server, non-hydratable) > ExportNamedDeclaration w/ FunctionExpression > should transform ExportNamedDeclaration w/ FunctionExpression with valid Component name and params 2`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; var _tmpl$ = "

Foo

"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -362,15 +366,19 @@ if (import.meta.webpackHot) { `; exports[`webpack5 (server, non-hydratable) > ExportNamedDeclaration w/ FunctionExpression > should transform ExportNamedDeclaration w/ FunctionExpression with valid Component name and params 3`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; -import { escape as _$escape } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; +import { ssrRunInScope as _$ssrRunInScope } from "@solidjs/web"; +import { escape as _$escape } from "@solidjs/web"; var _tmpl$ = ["

", "

"]; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; const _REGISTRY = _$$registry(); -const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/_$ssr(_tmpl$, _$escape(_props.v0)), { +const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/(() => { + var _v$ = _$ssrRunInScope(() => _$escape(_props.v0)); + return _$ssr(_tmpl$, _v$); +})(), { location: "example.jsx:4:15", signature: "ae0f2a31" }); @@ -393,7 +401,7 @@ if (import.meta.webpackHot) { `; exports[`webpack5 (server, non-hydratable) > ExportNamedDeclaration w/ FunctionExpression > should transform ExportNamedDeclaration w/ FunctionExpression with valid Component name and params 4`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; @@ -425,8 +433,8 @@ if (import.meta.webpackHot) { `; exports[`webpack5 (server, non-hydratable) > ExportNamedDeclaration w/ FunctionExpression > should transform ExportNamedDeclaration w/ FunctionExpression with valid Component name and params 5`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; var _tmpl$ = "
bar
", _tmpl$2 = "
foo
"; import { $$component as _$$component } from "solid-refresh"; @@ -469,7 +477,7 @@ if (import.meta.webpackHot) { `; exports[`webpack5 (server, non-hydratable) > FunctionDeclaration > should skip FunctionDeclaration with @refresh reload 1`] = ` -"import { ssr as _$ssr } from "solid-js/web"; +"import { ssr as _$ssr } from "@solidjs/web"; var _tmpl$ = "

Foo

"; import { $$decline as _$$decline } from "solid-refresh"; // @refresh reload @@ -482,7 +490,7 @@ if (import.meta.webpackHot) { `; exports[`webpack5 (server, non-hydratable) > FunctionDeclaration > should skip FunctionDeclaration with @refresh skip 1`] = ` -"import { ssr as _$ssr } from "solid-js/web"; +"import { ssr as _$ssr } from "@solidjs/web"; var _tmpl$ = "

Foo

"; // @refresh skip function Foo() { @@ -491,8 +499,8 @@ function Foo() { `; exports[`webpack5 (server, non-hydratable) > FunctionDeclaration > should skip FunctionDeclaration with invalid Component name 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; var _tmpl$ = "

Foo

"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -511,8 +519,8 @@ if (import.meta.webpackHot) { `; exports[`webpack5 (server, non-hydratable) > FunctionDeclaration > should skip FunctionDeclaration with valid Component name and >1 params 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; var _tmpl$ = "

Foo

"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -531,8 +539,8 @@ if (import.meta.webpackHot) { `; exports[`webpack5 (server, non-hydratable) > FunctionDeclaration > should transform FunctionDeclaration with valid Component name and params 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; var _tmpl$ = "

Foo

"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -554,8 +562,8 @@ if (import.meta.webpackHot) { `; exports[`webpack5 (server, non-hydratable) > FunctionDeclaration > should transform FunctionDeclaration with valid Component name and params 2`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; var _tmpl$ = "

Foo

"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -577,15 +585,19 @@ if (import.meta.webpackHot) { `; exports[`webpack5 (server, non-hydratable) > FunctionDeclaration > should transform FunctionDeclaration with valid Component name and params 3`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; -import { escape as _$escape } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; +import { ssrRunInScope as _$ssrRunInScope } from "@solidjs/web"; +import { escape as _$escape } from "@solidjs/web"; var _tmpl$ = ["

", "

"]; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; const _REGISTRY = _$$registry(); -const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/_$ssr(_tmpl$, _$escape(_props.v0)), { +const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/(() => { + var _v$ = _$ssrRunInScope(() => _$escape(_props.v0)); + return _$ssr(_tmpl$, _v$); +})(), { location: "example.jsx:4:15", signature: "ae0f2a31" }); @@ -607,7 +619,7 @@ if (import.meta.webpackHot) { `; exports[`webpack5 (server, non-hydratable) > FunctionDeclaration > should transform FunctionDeclaration with valid Component name and params 4`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; @@ -638,8 +650,8 @@ if (import.meta.webpackHot) { `; exports[`webpack5 (server, non-hydratable) > FunctionDeclaration > should transform FunctionDeclaration with valid Component name and params 5`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; var _tmpl$ = "
foo
", _tmpl$2 = "
bar
"; import { $$component as _$$component } from "solid-refresh"; @@ -680,7 +692,7 @@ if (import.meta.webpackHot) { `; exports[`webpack5 (server, non-hydratable) > VariableDeclarator > ArrowFunctionExpression > should skip VariableDeclarator w/ ArrowFunctionExpression with @refresh reload 1`] = ` -"import { ssr as _$ssr } from "solid-js/web"; +"import { ssr as _$ssr } from "@solidjs/web"; var _tmpl$ = "

Foo

"; import { $$decline as _$$decline } from "solid-refresh"; // @refresh reload @@ -693,7 +705,7 @@ if (import.meta.webpackHot) { `; exports[`webpack5 (server, non-hydratable) > VariableDeclarator > ArrowFunctionExpression > should skip VariableDeclarator w/ ArrowFunctionExpression with @refresh skip 1`] = ` -"import { ssr as _$ssr } from "solid-js/web"; +"import { ssr as _$ssr } from "@solidjs/web"; var _tmpl$ = "

Foo

"; // @refresh skip const Foo = () => { @@ -702,8 +714,8 @@ const Foo = () => { `; exports[`webpack5 (server, non-hydratable) > VariableDeclarator > ArrowFunctionExpression > should skip VariableDeclarator w/ ArrowFunctionExpression with invalid Component name 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; var _tmpl$ = "

Foo

"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -722,8 +734,8 @@ if (import.meta.webpackHot) { `; exports[`webpack5 (server, non-hydratable) > VariableDeclarator > ArrowFunctionExpression > should skip VariableDeclarator w/ ArrowFunctionExpression with valid Component name and >1 params 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; var _tmpl$ = "

Foo

"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -742,8 +754,8 @@ if (import.meta.webpackHot) { `; exports[`webpack5 (server, non-hydratable) > VariableDeclarator > ArrowFunctionExpression > should transform VariableDeclarator w/ ArrowFunctionExpression with valid Component name and params 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; var _tmpl$ = "

Foo

"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -765,8 +777,8 @@ if (import.meta.webpackHot) { `; exports[`webpack5 (server, non-hydratable) > VariableDeclarator > ArrowFunctionExpression > should transform VariableDeclarator w/ ArrowFunctionExpression with valid Component name and params 2`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; var _tmpl$ = "

Foo

"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -788,16 +800,20 @@ if (import.meta.webpackHot) { `; exports[`webpack5 (server, non-hydratable) > VariableDeclarator > ArrowFunctionExpression > should transform VariableDeclarator w/ ArrowFunctionExpression with valid Component name and params 3`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; -import { escape as _$escape } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; +import { ssrRunInScope as _$ssrRunInScope } from "@solidjs/web"; +import { escape as _$escape } from "@solidjs/web"; var _tmpl$ = ["

", "

"]; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; const example = 'Foo'; const _REGISTRY = _$$registry(); -const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/_$ssr(_tmpl$, _$escape(_props.v0)), { +const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/(() => { + var _v$ = _$ssrRunInScope(() => _$escape(_props.v0)); + return _$ssr(_tmpl$, _v$); +})(), { location: "example.jsx:4:17", signature: "ae0f2a31" }); @@ -818,7 +834,7 @@ if (import.meta.webpackHot) { `; exports[`webpack5 (server, non-hydratable) > VariableDeclarator > ArrowFunctionExpression > should transform VariableDeclarator w/ ArrowFunctionExpression with valid Component name and params 4`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; @@ -849,8 +865,8 @@ if (import.meta.webpackHot) { `; exports[`webpack5 (server, non-hydratable) > VariableDeclarator > ArrowFunctionExpression > should transform VariableDeclarator w/ ArrowFunctionExpression with valid Component name and params 5`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; var _tmpl$ = "
bar
", _tmpl$2 = "
foo
"; import { $$component as _$$component } from "solid-refresh"; @@ -891,7 +907,7 @@ if (import.meta.webpackHot) { `; exports[`webpack5 (server, non-hydratable) > VariableDeclarator > FunctionExpression > should skip VariableDeclarator w/ FunctionExpression with @refresh reload 1`] = ` -"import { ssr as _$ssr } from "solid-js/web"; +"import { ssr as _$ssr } from "@solidjs/web"; var _tmpl$ = "

Foo

"; import { $$decline as _$$decline } from "solid-refresh"; // @refresh reload @@ -904,7 +920,7 @@ if (import.meta.webpackHot) { `; exports[`webpack5 (server, non-hydratable) > VariableDeclarator > FunctionExpression > should skip VariableDeclarator w/ FunctionExpression with @refresh skip 1`] = ` -"import { ssr as _$ssr } from "solid-js/web"; +"import { ssr as _$ssr } from "@solidjs/web"; var _tmpl$ = "

Foo

"; // @refresh skip const Foo = function () { @@ -913,8 +929,8 @@ const Foo = function () { `; exports[`webpack5 (server, non-hydratable) > VariableDeclarator > FunctionExpression > should skip VariableDeclarator w/ FunctionExpression with invalid Component name 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; var _tmpl$ = "

Foo

"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -933,8 +949,8 @@ if (import.meta.webpackHot) { `; exports[`webpack5 (server, non-hydratable) > VariableDeclarator > FunctionExpression > should skip VariableDeclarator w/ FunctionExpression with valid Component name and >1 params 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; var _tmpl$ = "

Foo

"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -953,8 +969,8 @@ if (import.meta.webpackHot) { `; exports[`webpack5 (server, non-hydratable) > VariableDeclarator > FunctionExpression > should transform VariableDeclarator w/ FunctionExpression with valid Component name and params 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; var _tmpl$ = "

Foo

"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -976,8 +992,8 @@ if (import.meta.webpackHot) { `; exports[`webpack5 (server, non-hydratable) > VariableDeclarator > FunctionExpression > should transform VariableDeclarator w/ FunctionExpression with valid Component name and params 2`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; var _tmpl$ = "

Foo

"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; @@ -999,16 +1015,20 @@ if (import.meta.webpackHot) { `; exports[`webpack5 (server, non-hydratable) > VariableDeclarator > FunctionExpression > should transform VariableDeclarator w/ FunctionExpression with valid Component name and params 3`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; -import { escape as _$escape } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; +import { ssrRunInScope as _$ssrRunInScope } from "@solidjs/web"; +import { escape as _$escape } from "@solidjs/web"; var _tmpl$ = ["

", "

"]; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; const example = 'Foo'; const _REGISTRY = _$$registry(); -const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/_$ssr(_tmpl$, _$escape(_props.v0)), { +const Foo_1 = _$$component(_REGISTRY, "Foo_1", _props => /*@refresh jsx-skip*/(() => { + var _v$ = _$ssrRunInScope(() => _$escape(_props.v0)); + return _$ssr(_tmpl$, _v$); +})(), { location: "example.jsx:4:17", signature: "ae0f2a31" }); @@ -1029,7 +1049,7 @@ if (import.meta.webpackHot) { `; exports[`webpack5 (server, non-hydratable) > VariableDeclarator > FunctionExpression > should transform VariableDeclarator w/ FunctionExpression with valid Component name and params 4`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; @@ -1060,8 +1080,8 @@ if (import.meta.webpackHot) { `; exports[`webpack5 (server, non-hydratable) > VariableDeclarator > FunctionExpression > should transform VariableDeclarator w/ FunctionExpression with valid Component name and params 5`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; var _tmpl$ = "
bar
", _tmpl$2 = "
foo
"; import { $$component as _$$component } from "solid-refresh"; @@ -1102,14 +1122,17 @@ if (import.meta.webpackHot) { `; exports[`webpack5 (server, non-hydratable) > fix build > refs > should work with a function 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; var _tmpl$ = "
Comp
"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; const _REGISTRY = _$$registry(); -const Comp_1 = _$$component(_REGISTRY, "Comp_1", _props => /*@refresh jsx-skip*/_$ssr(_tmpl$), { +const Comp_1 = _$$component(_REGISTRY, "Comp_1", _props => /*@refresh jsx-skip*/(() => { + var _ref$ = _props.v0; + return _$ssr(_tmpl$); +})(), { location: "example.jsx:4:19", signature: "6f76290" }); @@ -1128,14 +1151,17 @@ if (import.meta.webpackHot) { `; exports[`webpack5 (server, non-hydratable) > fix build > refs > should work with a mutable variable 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; var _tmpl$ = "
Comp
"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; const _REGISTRY = _$$registry(); -const Comp_1 = _$$component(_REGISTRY, "Comp_1", _props => /*@refresh jsx-skip*/_$ssr(_tmpl$), { +const Comp_1 = _$$component(_REGISTRY, "Comp_1", _props => /*@refresh jsx-skip*/(() => { + var _ref$ = _props.v0; + return _$ssr(_tmpl$); +})(), { location: "example.jsx:4:19", signature: "6f76290" }); @@ -1160,15 +1186,18 @@ if (import.meta.webpackHot) { `; exports[`webpack5 (server, non-hydratable) > fix build > signals as refs > should work 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; -import { ssr as _$ssr } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; +import { ssr as _$ssr } from "@solidjs/web"; var _tmpl$ = "
Comp
"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; import { createSignal } from 'solid-js'; const _REGISTRY = _$$registry(); -const Comp_1 = _$$component(_REGISTRY, "Comp_1", _props => /*@refresh jsx-skip*/_$ssr(_tmpl$), { +const Comp_1 = _$$component(_REGISTRY, "Comp_1", _props => /*@refresh jsx-skip*/(() => { + var _ref$ = _props.v0; + return _$ssr(_tmpl$); +})(), { location: "example.jsx:6:19", signature: "6f76290" }); @@ -1194,7 +1223,7 @@ if (import.meta.webpackHot) { `; exports[`webpack5 (server, non-hydratable) > fix render > @refresh reload > should work 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; import { $$decline as _$$decline } from "solid-refresh"; // @refresh reload import { render } from 'solid-js/web'; @@ -1208,7 +1237,7 @@ if (import.meta.webpackHot) { `; exports[`webpack5 (server, non-hydratable) > fix render > import specifiers > should work with ImportNamespaceSpecifier 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; @@ -1228,7 +1257,7 @@ if (import.meta.webpackHot) { `; exports[`webpack5 (server, non-hydratable) > fix render > import specifiers > should work with ImportSpecifier + Identifier 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; @@ -1248,7 +1277,7 @@ if (import.meta.webpackHot) { `; exports[`webpack5 (server, non-hydratable) > fix render > import specifiers > should work with ImportSpecifier + aliased Identifier 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; @@ -1268,7 +1297,7 @@ if (import.meta.webpackHot) { `; exports[`webpack5 (server, non-hydratable) > fix render > import specifiers > should work with ImportSpecifier + aliased Identifier from StringLiteral 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; @@ -1288,7 +1317,7 @@ if (import.meta.webpackHot) { `; exports[`webpack5 (server, non-hydratable) > fix render > top-level statements > should work with IfStatement 1`] = ` -"import { createComponent as _$createComponent } from "solid-js/web"; +"import { createComponent as _$createComponent } from "@solidjs/web"; import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; From ce0bee8db7ac83f18c030f8ed01553ce85efec0c Mon Sep 17 00:00:00 2001 From: Ryan Carniato Date: Wed, 4 Mar 2026 10:45:32 -0800 Subject: [PATCH 06/16] v0.8.0-next.2 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 5b9b028..2682bdd 100644 --- a/package.json +++ b/package.json @@ -4,7 +4,7 @@ "description": "Universal HMR for SolidJS", "author": "Ryan Carniato", "license": "MIT", - "version": "0.8.0-next.1", + "version": "0.8.0-next.2", "homepage": "https://github.com/solidjs/solid-refresh#readme", "repository": { "type": "git", From 8edf4d0d815b8b5d3c064c7459b6f0395e58ba6e Mon Sep 17 00:00:00 2001 From: Ryan Carniato Date: Tue, 10 Mar 2026 12:12:22 -0700 Subject: [PATCH 07/16] fix: pass strictRead label to untrack in HMR proxy Use untrack(fn, label) instead of separate setStrictRead calls, matching the updated API in @solidjs/signals where strictRead is now an optional parameter on untrack. Made-with: Cursor --- src/runtime/create-proxy.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/runtime/create-proxy.ts b/src/runtime/create-proxy.ts index 298fce7..fee2da0 100644 --- a/src/runtime/create-proxy.ts +++ b/src/runtime/create-proxy.ts @@ -39,7 +39,10 @@ export default function createProxy, P>( () => { const c = source(); if (c) { - return untrack(() => c(props)); + return (untrack as Function)( + () => c(props), + (c as any)[$DEVCOMP] && `<${c.name || 'Anonymous'}>`, + ); } return undefined; }, From 69d013f3622d9490f2a3354fed240fd820687b3f Mon Sep 17 00:00:00 2001 From: Ryan Carniato Date: Tue, 10 Mar 2026 12:15:06 -0700 Subject: [PATCH 08/16] v0.8.0-next.3 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 2682bdd..fb2b560 100644 --- a/package.json +++ b/package.json @@ -4,7 +4,7 @@ "description": "Universal HMR for SolidJS", "author": "Ryan Carniato", "license": "MIT", - "version": "0.8.0-next.2", + "version": "0.8.0-next.3", "homepage": "https://github.com/solidjs/solid-refresh#readme", "repository": { "type": "git", From c8f062066e51216ba33326a61bde76e24de718b1 Mon Sep 17 00:00:00 2001 From: Ryan Carniato Date: Thu, 12 Mar 2026 14:45:04 -0700 Subject: [PATCH 09/16] fix: untrack source() reads in proxy traps to suppress false strict-read warnings The proxy get/set traps read source() which triggered "top level read" warnings in dev mode when accessed inside a strictRead context. These reads were already non-reactive in practice (component bodies run inside untrack), so wrapping with untrack() suppresses the false positive without any behavioral change. Made-with: Cursor --- src/runtime/create-proxy.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/runtime/create-proxy.ts b/src/runtime/create-proxy.ts index fee2da0..b049afc 100644 --- a/src/runtime/create-proxy.ts +++ b/src/runtime/create-proxy.ts @@ -67,10 +67,10 @@ export default function createProxy, P>( if (property === 'location' || property === 'name') { return (HMRComp as any)[property]; } - return source()[property as keyof C]; + return untrack(source)[property as keyof C]; }, set(_, property, value) { - source()[property as keyof C] = value; + untrack(source)[property as keyof C] = value; return true; }, }); From 27651bd4b1c2ed335dc66c45b69858f30a6b23a3 Mon Sep 17 00:00:00 2001 From: Ryan Carniato Date: Thu, 12 Mar 2026 14:53:19 -0700 Subject: [PATCH 10/16] v0.8.0-next.4 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index fb2b560..fc51c1e 100644 --- a/package.json +++ b/package.json @@ -4,7 +4,7 @@ "description": "Universal HMR for SolidJS", "author": "Ryan Carniato", "license": "MIT", - "version": "0.8.0-next.3", + "version": "0.8.0-next.4", "homepage": "https://github.com/solidjs/solid-refresh#readme", "repository": { "type": "git", From 3ce2e04a049556cdb333da2dde61df7ff6bedb2c Mon Sep 17 00:00:00 2001 From: Ryan Carniato Date: Fri, 20 Mar 2026 23:38:49 -0700 Subject: [PATCH 11/16] fix: use stable transform name for strictRead label instead of function .name Bundlers like esbuild (used by Vite) can rename function expressions to avoid shadowing (e.g. function Counter -> Counter2), which caused the strictRead warning label to show mangled names. Use the name parameter from the babel transform which is always the correct identifier. Made-with: Cursor --- src/runtime/create-proxy.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/runtime/create-proxy.ts b/src/runtime/create-proxy.ts index b049afc..55869d1 100644 --- a/src/runtime/create-proxy.ts +++ b/src/runtime/create-proxy.ts @@ -41,7 +41,7 @@ export default function createProxy, P>( if (c) { return (untrack as Function)( () => c(props), - (c as any)[$DEVCOMP] && `<${c.name || 'Anonymous'}>`, + (c as any)[$DEVCOMP] && `<${name}>`, ); } return undefined; From 18564536765e990a2d876029a283f4c537f2300b Mon Sep 17 00:00:00 2001 From: Ryan Carniato Date: Fri, 20 Mar 2026 23:43:57 -0700 Subject: [PATCH 12/16] v0.8.0-next.5 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index fc51c1e..db91c5d 100644 --- a/package.json +++ b/package.json @@ -4,7 +4,7 @@ "description": "Universal HMR for SolidJS", "author": "Ryan Carniato", "license": "MIT", - "version": "0.8.0-next.4", + "version": "0.8.0-next.5", "homepage": "https://github.com/solidjs/solid-refresh#readme", "repository": { "type": "git", From d52cf4957ef30cb6f3c1face940ee8d66c668cda Mon Sep 17 00:00:00 2001 From: Ryan Carniato Date: Fri, 27 Mar 2026 23:19:13 -0700 Subject: [PATCH 13/16] fix: recognize @solidjs/web render imports Treat Solid 2's @solidjs/web entrypoint as the canonical render import so refresh cleanup hooks still attach. Update the mirrored transform tests and snapshots to reflect the new import source. Made-with: Cursor --- src/babel/core/constants.ts | 4 ++-- .../client-hydratable/__snapshots__/esm.test.ts.snap | 12 ++++++------ .../__snapshots__/rspack-esm.test.ts.snap | 12 ++++++------ .../__snapshots__/standard.test.ts.snap | 12 ++++++------ .../__snapshots__/vite.test.ts.snap | 12 ++++++------ .../__snapshots__/webpack5.test.ts.snap | 12 ++++++------ tests/client-hydratable/esm.test.ts | 12 ++++++------ tests/client-hydratable/rspack-esm.test.ts | 12 ++++++------ tests/client-hydratable/standard.test.ts | 12 ++++++------ tests/client-hydratable/vite.test.ts | 12 ++++++------ tests/client-hydratable/webpack5.test.ts | 12 ++++++------ tests/client/__snapshots__/esm.test.ts.snap | 12 ++++++------ tests/client/__snapshots__/rspack-esm.test.ts.snap | 12 ++++++------ tests/client/__snapshots__/standard.test.ts.snap | 12 ++++++------ tests/client/__snapshots__/vite.test.ts.snap | 12 ++++++------ tests/client/__snapshots__/webpack5.test.ts.snap | 12 ++++++------ tests/client/esm.test.ts | 12 ++++++------ tests/client/rspack-esm.test.ts | 12 ++++++------ tests/client/standard.test.ts | 12 ++++++------ tests/client/vite.test.ts | 12 ++++++------ tests/client/webpack5.test.ts | 12 ++++++------ .../server-hydratable/__snapshots__/esm.test.ts.snap | 12 ++++++------ .../__snapshots__/rspack-esm.test.ts.snap | 12 ++++++------ .../__snapshots__/standard.test.ts.snap | 12 ++++++------ .../__snapshots__/vite.test.ts.snap | 12 ++++++------ .../__snapshots__/webpack5.test.ts.snap | 12 ++++++------ tests/server-hydratable/esm.test.ts | 12 ++++++------ tests/server-hydratable/rspack-esm.test.ts | 12 ++++++------ tests/server-hydratable/standard.test.ts | 12 ++++++------ tests/server-hydratable/vite.test.ts | 12 ++++++------ tests/server-hydratable/webpack5.test.ts | 12 ++++++------ tests/server/__snapshots__/esm.test.ts.snap | 12 ++++++------ tests/server/__snapshots__/rspack-esm.test.ts.snap | 12 ++++++------ tests/server/__snapshots__/standard.test.ts.snap | 12 ++++++------ tests/server/__snapshots__/vite.test.ts.snap | 12 ++++++------ tests/server/__snapshots__/webpack5.test.ts.snap | 12 ++++++------ tests/server/esm.test.ts | 12 ++++++------ tests/server/rspack-esm.test.ts | 12 ++++++------ tests/server/standard.test.ts | 12 ++++++------ tests/server/vite.test.ts | 12 ++++++------ tests/server/webpack5.test.ts | 12 ++++++------ 41 files changed, 242 insertions(+), 242 deletions(-) diff --git a/src/babel/core/constants.ts b/src/babel/core/constants.ts index 1bf965f..fcd107e 100644 --- a/src/babel/core/constants.ts +++ b/src/babel/core/constants.ts @@ -37,11 +37,11 @@ export const IMPORT_DECLINE: ImportDefinition = { export const IMPORT_SPECIFIERS: ImportIdentifierSpecifier[] = [ { type: 'render', - definition: { name: 'render', kind: 'named', source: 'solid-js/web' }, + definition: { name: 'render', kind: 'named', source: '@solidjs/web' }, }, { type: 'render', - definition: { name: 'hydrate', kind: 'named', source: 'solid-js/web' }, + definition: { name: 'hydrate', kind: 'named', source: '@solidjs/web' }, }, { type: 'createContext', diff --git a/tests/client-hydratable/__snapshots__/esm.test.ts.snap b/tests/client-hydratable/__snapshots__/esm.test.ts.snap index 4dded8c..4d1b5d1 100644 --- a/tests/client-hydratable/__snapshots__/esm.test.ts.snap +++ b/tests/client-hydratable/__snapshots__/esm.test.ts.snap @@ -1278,7 +1278,7 @@ exports[`esm (client, hydratable) > fix render > @refresh reload > should work 1 "import { createComponent as _$createComponent } from "@solidjs/web"; import { $$decline as _$$decline } from "solid-refresh"; // @refresh reload -import { render } from 'solid-js/web'; +import { render } from '@solidjs/web'; if (root) { const _cleanup = render(() => _$createComponent(App, {}), root); if (import.meta.hot) import.meta.hot.dispose(_cleanup); @@ -1293,7 +1293,7 @@ exports[`esm (client, hydratable) > fix render > import specifiers > should work import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; -import * as solidWeb from 'solid-js/web'; +import * as solidWeb from '@solidjs/web'; const _REGISTRY = _$$registry(); const JSX__cleanup_1 = _$$component(_REGISTRY, "JSX__cleanup_1", _props => /*@refresh jsx-skip*/_$createComponent(_props.v0, {}), { location: "example.jsx:4:32", @@ -1313,7 +1313,7 @@ exports[`esm (client, hydratable) > fix render > import specifiers > should work import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; -import { render } from 'solid-js/web'; +import { render } from '@solidjs/web'; const _REGISTRY = _$$registry(); const JSX__cleanup_1 = _$$component(_REGISTRY, "JSX__cleanup_1", _props => /*@refresh jsx-skip*/_$createComponent(_props.v0, {}), { location: "example.jsx:4:23", @@ -1333,7 +1333,7 @@ exports[`esm (client, hydratable) > fix render > import specifiers > should work import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; -import { render as Render } from 'solid-js/web'; +import { render as Render } from '@solidjs/web'; const _REGISTRY = _$$registry(); const JSX__cleanup_1 = _$$component(_REGISTRY, "JSX__cleanup_1", _props => /*@refresh jsx-skip*/_$createComponent(_props.v0, {}), { location: "example.jsx:4:23", @@ -1353,7 +1353,7 @@ exports[`esm (client, hydratable) > fix render > import specifiers > should work import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; -import { 'render' as Render } from 'solid-js/web'; +import { 'render' as Render } from '@solidjs/web'; const _REGISTRY = _$$registry(); const JSX__cleanup_1 = _$$component(_REGISTRY, "JSX__cleanup_1", _props => /*@refresh jsx-skip*/_$createComponent(_props.v0, {}), { location: "example.jsx:4:23", @@ -1373,7 +1373,7 @@ exports[`esm (client, hydratable) > fix render > top-level statements > should w import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; -import { render } from 'solid-js/web'; +import { render } from '@solidjs/web'; const _REGISTRY = _$$registry(); const JSX__cleanup_1 = _$$component(_REGISTRY, "JSX__cleanup_1", _props => /*@refresh jsx-skip*/_$createComponent(_props.v0, {}), { location: "example.jsx:5:25", diff --git a/tests/client-hydratable/__snapshots__/rspack-esm.test.ts.snap b/tests/client-hydratable/__snapshots__/rspack-esm.test.ts.snap index 55c5041..b06e426 100644 --- a/tests/client-hydratable/__snapshots__/rspack-esm.test.ts.snap +++ b/tests/client-hydratable/__snapshots__/rspack-esm.test.ts.snap @@ -1278,7 +1278,7 @@ exports[`rspack-esm (client, hydratable) > fix render > @refresh reload > should "import { createComponent as _$createComponent } from "@solidjs/web"; import { $$decline as _$$decline } from "solid-refresh"; // @refresh reload -import { render } from 'solid-js/web'; +import { render } from '@solidjs/web'; if (root) { const _cleanup = render(() => _$createComponent(App, {}), root); if (import.meta.webpackHot) import.meta.webpackHot.dispose(_cleanup); @@ -1293,7 +1293,7 @@ exports[`rspack-esm (client, hydratable) > fix render > import specifiers > shou import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; -import * as solidWeb from 'solid-js/web'; +import * as solidWeb from '@solidjs/web'; const _REGISTRY = _$$registry(); const JSX__cleanup_1 = _$$component(_REGISTRY, "JSX__cleanup_1", _props => /*@refresh jsx-skip*/_$createComponent(_props.v0, {}), { location: "example.jsx:4:32", @@ -1313,7 +1313,7 @@ exports[`rspack-esm (client, hydratable) > fix render > import specifiers > shou import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; -import { render } from 'solid-js/web'; +import { render } from '@solidjs/web'; const _REGISTRY = _$$registry(); const JSX__cleanup_1 = _$$component(_REGISTRY, "JSX__cleanup_1", _props => /*@refresh jsx-skip*/_$createComponent(_props.v0, {}), { location: "example.jsx:4:23", @@ -1333,7 +1333,7 @@ exports[`rspack-esm (client, hydratable) > fix render > import specifiers > shou import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; -import { render as Render } from 'solid-js/web'; +import { render as Render } from '@solidjs/web'; const _REGISTRY = _$$registry(); const JSX__cleanup_1 = _$$component(_REGISTRY, "JSX__cleanup_1", _props => /*@refresh jsx-skip*/_$createComponent(_props.v0, {}), { location: "example.jsx:4:23", @@ -1353,7 +1353,7 @@ exports[`rspack-esm (client, hydratable) > fix render > import specifiers > shou import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; -import { 'render' as Render } from 'solid-js/web'; +import { 'render' as Render } from '@solidjs/web'; const _REGISTRY = _$$registry(); const JSX__cleanup_1 = _$$component(_REGISTRY, "JSX__cleanup_1", _props => /*@refresh jsx-skip*/_$createComponent(_props.v0, {}), { location: "example.jsx:4:23", @@ -1373,7 +1373,7 @@ exports[`rspack-esm (client, hydratable) > fix render > top-level statements > s import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; -import { render } from 'solid-js/web'; +import { render } from '@solidjs/web'; const _REGISTRY = _$$registry(); const JSX__cleanup_1 = _$$component(_REGISTRY, "JSX__cleanup_1", _props => /*@refresh jsx-skip*/_$createComponent(_props.v0, {}), { location: "example.jsx:5:25", diff --git a/tests/client-hydratable/__snapshots__/standard.test.ts.snap b/tests/client-hydratable/__snapshots__/standard.test.ts.snap index 50266ad..981d6e0 100644 --- a/tests/client-hydratable/__snapshots__/standard.test.ts.snap +++ b/tests/client-hydratable/__snapshots__/standard.test.ts.snap @@ -1278,7 +1278,7 @@ exports[`standard (client, hydratable) > fix render > @refresh reload > should w "import { createComponent as _$createComponent } from "@solidjs/web"; import { $$decline as _$$decline } from "solid-refresh"; // @refresh reload -import { render } from 'solid-js/web'; +import { render } from '@solidjs/web'; if (root) { const _cleanup = render(() => _$createComponent(App, {}), root); if (module.hot) module.hot.dispose(_cleanup); @@ -1293,7 +1293,7 @@ exports[`standard (client, hydratable) > fix render > import specifiers > should import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; -import * as solidWeb from 'solid-js/web'; +import * as solidWeb from '@solidjs/web'; const _REGISTRY = _$$registry(); const JSX__cleanup_1 = _$$component(_REGISTRY, "JSX__cleanup_1", _props => /*@refresh jsx-skip*/_$createComponent(_props.v0, {}), { location: "example.jsx:4:32", @@ -1313,7 +1313,7 @@ exports[`standard (client, hydratable) > fix render > import specifiers > should import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; -import { render } from 'solid-js/web'; +import { render } from '@solidjs/web'; const _REGISTRY = _$$registry(); const JSX__cleanup_1 = _$$component(_REGISTRY, "JSX__cleanup_1", _props => /*@refresh jsx-skip*/_$createComponent(_props.v0, {}), { location: "example.jsx:4:23", @@ -1333,7 +1333,7 @@ exports[`standard (client, hydratable) > fix render > import specifiers > should import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; -import { render as Render } from 'solid-js/web'; +import { render as Render } from '@solidjs/web'; const _REGISTRY = _$$registry(); const JSX__cleanup_1 = _$$component(_REGISTRY, "JSX__cleanup_1", _props => /*@refresh jsx-skip*/_$createComponent(_props.v0, {}), { location: "example.jsx:4:23", @@ -1353,7 +1353,7 @@ exports[`standard (client, hydratable) > fix render > import specifiers > should import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; -import { 'render' as Render } from 'solid-js/web'; +import { 'render' as Render } from '@solidjs/web'; const _REGISTRY = _$$registry(); const JSX__cleanup_1 = _$$component(_REGISTRY, "JSX__cleanup_1", _props => /*@refresh jsx-skip*/_$createComponent(_props.v0, {}), { location: "example.jsx:4:23", @@ -1373,7 +1373,7 @@ exports[`standard (client, hydratable) > fix render > top-level statements > sho import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; -import { render } from 'solid-js/web'; +import { render } from '@solidjs/web'; const _REGISTRY = _$$registry(); const JSX__cleanup_1 = _$$component(_REGISTRY, "JSX__cleanup_1", _props => /*@refresh jsx-skip*/_$createComponent(_props.v0, {}), { location: "example.jsx:5:25", diff --git a/tests/client-hydratable/__snapshots__/vite.test.ts.snap b/tests/client-hydratable/__snapshots__/vite.test.ts.snap index 6e1df11..a2cb9d7 100644 --- a/tests/client-hydratable/__snapshots__/vite.test.ts.snap +++ b/tests/client-hydratable/__snapshots__/vite.test.ts.snap @@ -1312,7 +1312,7 @@ if (import.meta.hot) { exports[`vite (client, hydratable) > fix render > @refresh reload > should work 1`] = ` "import { createComponent as _$createComponent } from "@solidjs/web"; // @refresh reload -import { render } from 'solid-js/web'; +import { render } from '@solidjs/web'; if (root) { const _cleanup = render(() => _$createComponent(App, {}), root); if (import.meta.hot) import.meta.hot.dispose(_cleanup); @@ -1327,7 +1327,7 @@ exports[`vite (client, hydratable) > fix render > import specifiers > should wor import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; -import * as solidWeb from 'solid-js/web'; +import * as solidWeb from '@solidjs/web'; const _REGISTRY = _$$registry(); const JSX__cleanup_1 = _$$component(_REGISTRY, "JSX__cleanup_1", _props => /*@refresh jsx-skip*/_$createComponent(_props.v0, {}), { location: "example.jsx:4:32", @@ -1348,7 +1348,7 @@ exports[`vite (client, hydratable) > fix render > import specifiers > should wor import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; -import { render } from 'solid-js/web'; +import { render } from '@solidjs/web'; const _REGISTRY = _$$registry(); const JSX__cleanup_1 = _$$component(_REGISTRY, "JSX__cleanup_1", _props => /*@refresh jsx-skip*/_$createComponent(_props.v0, {}), { location: "example.jsx:4:23", @@ -1369,7 +1369,7 @@ exports[`vite (client, hydratable) > fix render > import specifiers > should wor import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; -import { render as Render } from 'solid-js/web'; +import { render as Render } from '@solidjs/web'; const _REGISTRY = _$$registry(); const JSX__cleanup_1 = _$$component(_REGISTRY, "JSX__cleanup_1", _props => /*@refresh jsx-skip*/_$createComponent(_props.v0, {}), { location: "example.jsx:4:23", @@ -1390,7 +1390,7 @@ exports[`vite (client, hydratable) > fix render > import specifiers > should wor import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; -import { 'render' as Render } from 'solid-js/web'; +import { 'render' as Render } from '@solidjs/web'; const _REGISTRY = _$$registry(); const JSX__cleanup_1 = _$$component(_REGISTRY, "JSX__cleanup_1", _props => /*@refresh jsx-skip*/_$createComponent(_props.v0, {}), { location: "example.jsx:4:23", @@ -1411,7 +1411,7 @@ exports[`vite (client, hydratable) > fix render > top-level statements > should import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; -import { render } from 'solid-js/web'; +import { render } from '@solidjs/web'; const _REGISTRY = _$$registry(); const JSX__cleanup_1 = _$$component(_REGISTRY, "JSX__cleanup_1", _props => /*@refresh jsx-skip*/_$createComponent(_props.v0, {}), { location: "example.jsx:5:25", diff --git a/tests/client-hydratable/__snapshots__/webpack5.test.ts.snap b/tests/client-hydratable/__snapshots__/webpack5.test.ts.snap index e40fba2..21c8b63 100644 --- a/tests/client-hydratable/__snapshots__/webpack5.test.ts.snap +++ b/tests/client-hydratable/__snapshots__/webpack5.test.ts.snap @@ -1278,7 +1278,7 @@ exports[`webpack5 (client, hydratable) > fix render > @refresh reload > should w "import { createComponent as _$createComponent } from "@solidjs/web"; import { $$decline as _$$decline } from "solid-refresh"; // @refresh reload -import { render } from 'solid-js/web'; +import { render } from '@solidjs/web'; if (root) { const _cleanup = render(() => _$createComponent(App, {}), root); if (import.meta.webpackHot) import.meta.webpackHot.dispose(_cleanup); @@ -1293,7 +1293,7 @@ exports[`webpack5 (client, hydratable) > fix render > import specifiers > should import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; -import * as solidWeb from 'solid-js/web'; +import * as solidWeb from '@solidjs/web'; const _REGISTRY = _$$registry(); const JSX__cleanup_1 = _$$component(_REGISTRY, "JSX__cleanup_1", _props => /*@refresh jsx-skip*/_$createComponent(_props.v0, {}), { location: "example.jsx:4:32", @@ -1313,7 +1313,7 @@ exports[`webpack5 (client, hydratable) > fix render > import specifiers > should import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; -import { render } from 'solid-js/web'; +import { render } from '@solidjs/web'; const _REGISTRY = _$$registry(); const JSX__cleanup_1 = _$$component(_REGISTRY, "JSX__cleanup_1", _props => /*@refresh jsx-skip*/_$createComponent(_props.v0, {}), { location: "example.jsx:4:23", @@ -1333,7 +1333,7 @@ exports[`webpack5 (client, hydratable) > fix render > import specifiers > should import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; -import { render as Render } from 'solid-js/web'; +import { render as Render } from '@solidjs/web'; const _REGISTRY = _$$registry(); const JSX__cleanup_1 = _$$component(_REGISTRY, "JSX__cleanup_1", _props => /*@refresh jsx-skip*/_$createComponent(_props.v0, {}), { location: "example.jsx:4:23", @@ -1353,7 +1353,7 @@ exports[`webpack5 (client, hydratable) > fix render > import specifiers > should import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; -import { 'render' as Render } from 'solid-js/web'; +import { 'render' as Render } from '@solidjs/web'; const _REGISTRY = _$$registry(); const JSX__cleanup_1 = _$$component(_REGISTRY, "JSX__cleanup_1", _props => /*@refresh jsx-skip*/_$createComponent(_props.v0, {}), { location: "example.jsx:4:23", @@ -1373,7 +1373,7 @@ exports[`webpack5 (client, hydratable) > fix render > top-level statements > sho import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; -import { render } from 'solid-js/web'; +import { render } from '@solidjs/web'; const _REGISTRY = _$$registry(); const JSX__cleanup_1 = _$$component(_REGISTRY, "JSX__cleanup_1", _props => /*@refresh jsx-skip*/_$createComponent(_props.v0, {}), { location: "example.jsx:5:25", diff --git a/tests/client-hydratable/esm.test.ts b/tests/client-hydratable/esm.test.ts index b2b9240..eadbd7e 100644 --- a/tests/client-hydratable/esm.test.ts +++ b/tests/client-hydratable/esm.test.ts @@ -719,7 +719,7 @@ describe('esm (client, hydratable)', () => { expect( await transform( ` - import { render } from 'solid-js/web'; + import { render } from '@solidjs/web'; render(() => , root); `, @@ -733,7 +733,7 @@ describe('esm (client, hydratable)', () => { expect( await transform( ` - import { render as Render } from 'solid-js/web'; + import { render as Render } from '@solidjs/web'; Render(() => , root); `, @@ -747,7 +747,7 @@ describe('esm (client, hydratable)', () => { expect( await transform( ` - import { 'render' as Render } from 'solid-js/web'; + import { 'render' as Render } from '@solidjs/web'; Render(() => , root); `, @@ -761,7 +761,7 @@ describe('esm (client, hydratable)', () => { expect( await transform( ` - import * as solidWeb from 'solid-js/web'; + import * as solidWeb from '@solidjs/web'; solidWeb.render(() => , root); `, @@ -777,7 +777,7 @@ describe('esm (client, hydratable)', () => { expect( await transform( ` - import { render } from 'solid-js/web'; + import { render } from '@solidjs/web'; if (root) { render(() => , root); @@ -796,7 +796,7 @@ describe('esm (client, hydratable)', () => { await transform( ` // @refresh reload - import { render } from 'solid-js/web'; + import { render } from '@solidjs/web'; if (root) { render(() => , root); diff --git a/tests/client-hydratable/rspack-esm.test.ts b/tests/client-hydratable/rspack-esm.test.ts index a265e1c..0a31ac7 100644 --- a/tests/client-hydratable/rspack-esm.test.ts +++ b/tests/client-hydratable/rspack-esm.test.ts @@ -719,7 +719,7 @@ describe('rspack-esm (client, hydratable)', () => { expect( await transform( ` - import { render } from 'solid-js/web'; + import { render } from '@solidjs/web'; render(() => , root); `, @@ -733,7 +733,7 @@ describe('rspack-esm (client, hydratable)', () => { expect( await transform( ` - import { render as Render } from 'solid-js/web'; + import { render as Render } from '@solidjs/web'; Render(() => , root); `, @@ -747,7 +747,7 @@ describe('rspack-esm (client, hydratable)', () => { expect( await transform( ` - import { 'render' as Render } from 'solid-js/web'; + import { 'render' as Render } from '@solidjs/web'; Render(() => , root); `, @@ -761,7 +761,7 @@ describe('rspack-esm (client, hydratable)', () => { expect( await transform( ` - import * as solidWeb from 'solid-js/web'; + import * as solidWeb from '@solidjs/web'; solidWeb.render(() => , root); `, @@ -777,7 +777,7 @@ describe('rspack-esm (client, hydratable)', () => { expect( await transform( ` - import { render } from 'solid-js/web'; + import { render } from '@solidjs/web'; if (root) { render(() => , root); @@ -796,7 +796,7 @@ describe('rspack-esm (client, hydratable)', () => { await transform( ` // @refresh reload - import { render } from 'solid-js/web'; + import { render } from '@solidjs/web'; if (root) { render(() => , root); diff --git a/tests/client-hydratable/standard.test.ts b/tests/client-hydratable/standard.test.ts index b03423c..eed1a7b 100644 --- a/tests/client-hydratable/standard.test.ts +++ b/tests/client-hydratable/standard.test.ts @@ -719,7 +719,7 @@ describe('standard (client, hydratable)', () => { expect( await transform( ` - import { render } from 'solid-js/web'; + import { render } from '@solidjs/web'; render(() => , root); `, @@ -733,7 +733,7 @@ describe('standard (client, hydratable)', () => { expect( await transform( ` - import { render as Render } from 'solid-js/web'; + import { render as Render } from '@solidjs/web'; Render(() => , root); `, @@ -747,7 +747,7 @@ describe('standard (client, hydratable)', () => { expect( await transform( ` - import { 'render' as Render } from 'solid-js/web'; + import { 'render' as Render } from '@solidjs/web'; Render(() => , root); `, @@ -761,7 +761,7 @@ describe('standard (client, hydratable)', () => { expect( await transform( ` - import * as solidWeb from 'solid-js/web'; + import * as solidWeb from '@solidjs/web'; solidWeb.render(() => , root); `, @@ -777,7 +777,7 @@ describe('standard (client, hydratable)', () => { expect( await transform( ` - import { render } from 'solid-js/web'; + import { render } from '@solidjs/web'; if (root) { render(() => , root); @@ -796,7 +796,7 @@ describe('standard (client, hydratable)', () => { await transform( ` // @refresh reload - import { render } from 'solid-js/web'; + import { render } from '@solidjs/web'; if (root) { render(() => , root); diff --git a/tests/client-hydratable/vite.test.ts b/tests/client-hydratable/vite.test.ts index 5de1ca1..c4ac9c1 100644 --- a/tests/client-hydratable/vite.test.ts +++ b/tests/client-hydratable/vite.test.ts @@ -719,7 +719,7 @@ describe('vite (client, hydratable)', () => { expect( await transform( ` - import { render } from 'solid-js/web'; + import { render } from '@solidjs/web'; render(() => , root); `, @@ -733,7 +733,7 @@ describe('vite (client, hydratable)', () => { expect( await transform( ` - import { render as Render } from 'solid-js/web'; + import { render as Render } from '@solidjs/web'; Render(() => , root); `, @@ -747,7 +747,7 @@ describe('vite (client, hydratable)', () => { expect( await transform( ` - import { 'render' as Render } from 'solid-js/web'; + import { 'render' as Render } from '@solidjs/web'; Render(() => , root); `, @@ -761,7 +761,7 @@ describe('vite (client, hydratable)', () => { expect( await transform( ` - import * as solidWeb from 'solid-js/web'; + import * as solidWeb from '@solidjs/web'; solidWeb.render(() => , root); `, @@ -777,7 +777,7 @@ describe('vite (client, hydratable)', () => { expect( await transform( ` - import { render } from 'solid-js/web'; + import { render } from '@solidjs/web'; if (root) { render(() => , root); @@ -796,7 +796,7 @@ describe('vite (client, hydratable)', () => { await transform( ` // @refresh reload - import { render } from 'solid-js/web'; + import { render } from '@solidjs/web'; if (root) { render(() => , root); diff --git a/tests/client-hydratable/webpack5.test.ts b/tests/client-hydratable/webpack5.test.ts index 1286338..530f518 100644 --- a/tests/client-hydratable/webpack5.test.ts +++ b/tests/client-hydratable/webpack5.test.ts @@ -719,7 +719,7 @@ describe('webpack5 (client, hydratable)', () => { expect( await transform( ` - import { render } from 'solid-js/web'; + import { render } from '@solidjs/web'; render(() => , root); `, @@ -733,7 +733,7 @@ describe('webpack5 (client, hydratable)', () => { expect( await transform( ` - import { render as Render } from 'solid-js/web'; + import { render as Render } from '@solidjs/web'; Render(() => , root); `, @@ -747,7 +747,7 @@ describe('webpack5 (client, hydratable)', () => { expect( await transform( ` - import { 'render' as Render } from 'solid-js/web'; + import { 'render' as Render } from '@solidjs/web'; Render(() => , root); `, @@ -761,7 +761,7 @@ describe('webpack5 (client, hydratable)', () => { expect( await transform( ` - import * as solidWeb from 'solid-js/web'; + import * as solidWeb from '@solidjs/web'; solidWeb.render(() => , root); `, @@ -777,7 +777,7 @@ describe('webpack5 (client, hydratable)', () => { expect( await transform( ` - import { render } from 'solid-js/web'; + import { render } from '@solidjs/web'; if (root) { render(() => , root); @@ -796,7 +796,7 @@ describe('webpack5 (client, hydratable)', () => { await transform( ` // @refresh reload - import { render } from 'solid-js/web'; + import { render } from '@solidjs/web'; if (root) { render(() => , root); diff --git a/tests/client/__snapshots__/esm.test.ts.snap b/tests/client/__snapshots__/esm.test.ts.snap index c370c5e..4fa2750 100644 --- a/tests/client/__snapshots__/esm.test.ts.snap +++ b/tests/client/__snapshots__/esm.test.ts.snap @@ -1235,7 +1235,7 @@ exports[`esm (client, non-hydratable) > fix render > @refresh reload > should wo "import { createComponent as _$createComponent } from "@solidjs/web"; import { $$decline as _$$decline } from "solid-refresh"; // @refresh reload -import { render } from 'solid-js/web'; +import { render } from '@solidjs/web'; if (root) { const _cleanup = render(() => _$createComponent(App, {}), root); if (import.meta.hot) import.meta.hot.dispose(_cleanup); @@ -1250,7 +1250,7 @@ exports[`esm (client, non-hydratable) > fix render > import specifiers > should import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; -import * as solidWeb from 'solid-js/web'; +import * as solidWeb from '@solidjs/web'; const _REGISTRY = _$$registry(); const JSX__cleanup_1 = _$$component(_REGISTRY, "JSX__cleanup_1", _props => /*@refresh jsx-skip*/_$createComponent(_props.v0, {}), { location: "example.jsx:4:32", @@ -1270,7 +1270,7 @@ exports[`esm (client, non-hydratable) > fix render > import specifiers > should import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; -import { render } from 'solid-js/web'; +import { render } from '@solidjs/web'; const _REGISTRY = _$$registry(); const JSX__cleanup_1 = _$$component(_REGISTRY, "JSX__cleanup_1", _props => /*@refresh jsx-skip*/_$createComponent(_props.v0, {}), { location: "example.jsx:4:23", @@ -1290,7 +1290,7 @@ exports[`esm (client, non-hydratable) > fix render > import specifiers > should import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; -import { render as Render } from 'solid-js/web'; +import { render as Render } from '@solidjs/web'; const _REGISTRY = _$$registry(); const JSX__cleanup_1 = _$$component(_REGISTRY, "JSX__cleanup_1", _props => /*@refresh jsx-skip*/_$createComponent(_props.v0, {}), { location: "example.jsx:4:23", @@ -1310,7 +1310,7 @@ exports[`esm (client, non-hydratable) > fix render > import specifiers > should import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; -import { 'render' as Render } from 'solid-js/web'; +import { 'render' as Render } from '@solidjs/web'; const _REGISTRY = _$$registry(); const JSX__cleanup_1 = _$$component(_REGISTRY, "JSX__cleanup_1", _props => /*@refresh jsx-skip*/_$createComponent(_props.v0, {}), { location: "example.jsx:4:23", @@ -1330,7 +1330,7 @@ exports[`esm (client, non-hydratable) > fix render > top-level statements > shou import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; -import { render } from 'solid-js/web'; +import { render } from '@solidjs/web'; const _REGISTRY = _$$registry(); const JSX__cleanup_1 = _$$component(_REGISTRY, "JSX__cleanup_1", _props => /*@refresh jsx-skip*/_$createComponent(_props.v0, {}), { location: "example.jsx:5:25", diff --git a/tests/client/__snapshots__/rspack-esm.test.ts.snap b/tests/client/__snapshots__/rspack-esm.test.ts.snap index e5098ff..93df840 100644 --- a/tests/client/__snapshots__/rspack-esm.test.ts.snap +++ b/tests/client/__snapshots__/rspack-esm.test.ts.snap @@ -1235,7 +1235,7 @@ exports[`rspack-esm (client, non-hydratable) > fix render > @refresh reload > sh "import { createComponent as _$createComponent } from "@solidjs/web"; import { $$decline as _$$decline } from "solid-refresh"; // @refresh reload -import { render } from 'solid-js/web'; +import { render } from '@solidjs/web'; if (root) { const _cleanup = render(() => _$createComponent(App, {}), root); if (import.meta.webpackHot) import.meta.webpackHot.dispose(_cleanup); @@ -1250,7 +1250,7 @@ exports[`rspack-esm (client, non-hydratable) > fix render > import specifiers > import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; -import * as solidWeb from 'solid-js/web'; +import * as solidWeb from '@solidjs/web'; const _REGISTRY = _$$registry(); const JSX__cleanup_1 = _$$component(_REGISTRY, "JSX__cleanup_1", _props => /*@refresh jsx-skip*/_$createComponent(_props.v0, {}), { location: "example.jsx:4:32", @@ -1270,7 +1270,7 @@ exports[`rspack-esm (client, non-hydratable) > fix render > import specifiers > import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; -import { render } from 'solid-js/web'; +import { render } from '@solidjs/web'; const _REGISTRY = _$$registry(); const JSX__cleanup_1 = _$$component(_REGISTRY, "JSX__cleanup_1", _props => /*@refresh jsx-skip*/_$createComponent(_props.v0, {}), { location: "example.jsx:4:23", @@ -1290,7 +1290,7 @@ exports[`rspack-esm (client, non-hydratable) > fix render > import specifiers > import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; -import { render as Render } from 'solid-js/web'; +import { render as Render } from '@solidjs/web'; const _REGISTRY = _$$registry(); const JSX__cleanup_1 = _$$component(_REGISTRY, "JSX__cleanup_1", _props => /*@refresh jsx-skip*/_$createComponent(_props.v0, {}), { location: "example.jsx:4:23", @@ -1310,7 +1310,7 @@ exports[`rspack-esm (client, non-hydratable) > fix render > import specifiers > import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; -import { 'render' as Render } from 'solid-js/web'; +import { 'render' as Render } from '@solidjs/web'; const _REGISTRY = _$$registry(); const JSX__cleanup_1 = _$$component(_REGISTRY, "JSX__cleanup_1", _props => /*@refresh jsx-skip*/_$createComponent(_props.v0, {}), { location: "example.jsx:4:23", @@ -1330,7 +1330,7 @@ exports[`rspack-esm (client, non-hydratable) > fix render > top-level statements import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; -import { render } from 'solid-js/web'; +import { render } from '@solidjs/web'; const _REGISTRY = _$$registry(); const JSX__cleanup_1 = _$$component(_REGISTRY, "JSX__cleanup_1", _props => /*@refresh jsx-skip*/_$createComponent(_props.v0, {}), { location: "example.jsx:5:25", diff --git a/tests/client/__snapshots__/standard.test.ts.snap b/tests/client/__snapshots__/standard.test.ts.snap index aa6594f..8e894bd 100644 --- a/tests/client/__snapshots__/standard.test.ts.snap +++ b/tests/client/__snapshots__/standard.test.ts.snap @@ -1235,7 +1235,7 @@ exports[`standard (client, non-hydratable) > fix render > @refresh reload > shou "import { createComponent as _$createComponent } from "@solidjs/web"; import { $$decline as _$$decline } from "solid-refresh"; // @refresh reload -import { render } from 'solid-js/web'; +import { render } from '@solidjs/web'; if (root) { const _cleanup = render(() => _$createComponent(App, {}), root); if (module.hot) module.hot.dispose(_cleanup); @@ -1250,7 +1250,7 @@ exports[`standard (client, non-hydratable) > fix render > import specifiers > sh import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; -import * as solidWeb from 'solid-js/web'; +import * as solidWeb from '@solidjs/web'; const _REGISTRY = _$$registry(); const JSX__cleanup_1 = _$$component(_REGISTRY, "JSX__cleanup_1", _props => /*@refresh jsx-skip*/_$createComponent(_props.v0, {}), { location: "example.jsx:4:32", @@ -1270,7 +1270,7 @@ exports[`standard (client, non-hydratable) > fix render > import specifiers > sh import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; -import { render } from 'solid-js/web'; +import { render } from '@solidjs/web'; const _REGISTRY = _$$registry(); const JSX__cleanup_1 = _$$component(_REGISTRY, "JSX__cleanup_1", _props => /*@refresh jsx-skip*/_$createComponent(_props.v0, {}), { location: "example.jsx:4:23", @@ -1290,7 +1290,7 @@ exports[`standard (client, non-hydratable) > fix render > import specifiers > sh import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; -import { render as Render } from 'solid-js/web'; +import { render as Render } from '@solidjs/web'; const _REGISTRY = _$$registry(); const JSX__cleanup_1 = _$$component(_REGISTRY, "JSX__cleanup_1", _props => /*@refresh jsx-skip*/_$createComponent(_props.v0, {}), { location: "example.jsx:4:23", @@ -1310,7 +1310,7 @@ exports[`standard (client, non-hydratable) > fix render > import specifiers > sh import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; -import { 'render' as Render } from 'solid-js/web'; +import { 'render' as Render } from '@solidjs/web'; const _REGISTRY = _$$registry(); const JSX__cleanup_1 = _$$component(_REGISTRY, "JSX__cleanup_1", _props => /*@refresh jsx-skip*/_$createComponent(_props.v0, {}), { location: "example.jsx:4:23", @@ -1330,7 +1330,7 @@ exports[`standard (client, non-hydratable) > fix render > top-level statements > import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; -import { render } from 'solid-js/web'; +import { render } from '@solidjs/web'; const _REGISTRY = _$$registry(); const JSX__cleanup_1 = _$$component(_REGISTRY, "JSX__cleanup_1", _props => /*@refresh jsx-skip*/_$createComponent(_props.v0, {}), { location: "example.jsx:5:25", diff --git a/tests/client/__snapshots__/vite.test.ts.snap b/tests/client/__snapshots__/vite.test.ts.snap index 3771ffa..cb31b0d 100644 --- a/tests/client/__snapshots__/vite.test.ts.snap +++ b/tests/client/__snapshots__/vite.test.ts.snap @@ -1269,7 +1269,7 @@ if (import.meta.hot) { exports[`vite (client, non-hydratable) > fix render > @refresh reload > should work 1`] = ` "import { createComponent as _$createComponent } from "@solidjs/web"; // @refresh reload -import { render } from 'solid-js/web'; +import { render } from '@solidjs/web'; if (root) { const _cleanup = render(() => _$createComponent(App, {}), root); if (import.meta.hot) import.meta.hot.dispose(_cleanup); @@ -1284,7 +1284,7 @@ exports[`vite (client, non-hydratable) > fix render > import specifiers > should import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; -import * as solidWeb from 'solid-js/web'; +import * as solidWeb from '@solidjs/web'; const _REGISTRY = _$$registry(); const JSX__cleanup_1 = _$$component(_REGISTRY, "JSX__cleanup_1", _props => /*@refresh jsx-skip*/_$createComponent(_props.v0, {}), { location: "example.jsx:4:32", @@ -1305,7 +1305,7 @@ exports[`vite (client, non-hydratable) > fix render > import specifiers > should import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; -import { render } from 'solid-js/web'; +import { render } from '@solidjs/web'; const _REGISTRY = _$$registry(); const JSX__cleanup_1 = _$$component(_REGISTRY, "JSX__cleanup_1", _props => /*@refresh jsx-skip*/_$createComponent(_props.v0, {}), { location: "example.jsx:4:23", @@ -1326,7 +1326,7 @@ exports[`vite (client, non-hydratable) > fix render > import specifiers > should import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; -import { render as Render } from 'solid-js/web'; +import { render as Render } from '@solidjs/web'; const _REGISTRY = _$$registry(); const JSX__cleanup_1 = _$$component(_REGISTRY, "JSX__cleanup_1", _props => /*@refresh jsx-skip*/_$createComponent(_props.v0, {}), { location: "example.jsx:4:23", @@ -1347,7 +1347,7 @@ exports[`vite (client, non-hydratable) > fix render > import specifiers > should import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; -import { 'render' as Render } from 'solid-js/web'; +import { 'render' as Render } from '@solidjs/web'; const _REGISTRY = _$$registry(); const JSX__cleanup_1 = _$$component(_REGISTRY, "JSX__cleanup_1", _props => /*@refresh jsx-skip*/_$createComponent(_props.v0, {}), { location: "example.jsx:4:23", @@ -1368,7 +1368,7 @@ exports[`vite (client, non-hydratable) > fix render > top-level statements > sho import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; -import { render } from 'solid-js/web'; +import { render } from '@solidjs/web'; const _REGISTRY = _$$registry(); const JSX__cleanup_1 = _$$component(_REGISTRY, "JSX__cleanup_1", _props => /*@refresh jsx-skip*/_$createComponent(_props.v0, {}), { location: "example.jsx:5:25", diff --git a/tests/client/__snapshots__/webpack5.test.ts.snap b/tests/client/__snapshots__/webpack5.test.ts.snap index 3b8dee2..d6909f1 100644 --- a/tests/client/__snapshots__/webpack5.test.ts.snap +++ b/tests/client/__snapshots__/webpack5.test.ts.snap @@ -1235,7 +1235,7 @@ exports[`webpack5 (client, non-hydratable) > fix render > @refresh reload > shou "import { createComponent as _$createComponent } from "@solidjs/web"; import { $$decline as _$$decline } from "solid-refresh"; // @refresh reload -import { render } from 'solid-js/web'; +import { render } from '@solidjs/web'; if (root) { const _cleanup = render(() => _$createComponent(App, {}), root); if (import.meta.webpackHot) import.meta.webpackHot.dispose(_cleanup); @@ -1250,7 +1250,7 @@ exports[`webpack5 (client, non-hydratable) > fix render > import specifiers > sh import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; -import * as solidWeb from 'solid-js/web'; +import * as solidWeb from '@solidjs/web'; const _REGISTRY = _$$registry(); const JSX__cleanup_1 = _$$component(_REGISTRY, "JSX__cleanup_1", _props => /*@refresh jsx-skip*/_$createComponent(_props.v0, {}), { location: "example.jsx:4:32", @@ -1270,7 +1270,7 @@ exports[`webpack5 (client, non-hydratable) > fix render > import specifiers > sh import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; -import { render } from 'solid-js/web'; +import { render } from '@solidjs/web'; const _REGISTRY = _$$registry(); const JSX__cleanup_1 = _$$component(_REGISTRY, "JSX__cleanup_1", _props => /*@refresh jsx-skip*/_$createComponent(_props.v0, {}), { location: "example.jsx:4:23", @@ -1290,7 +1290,7 @@ exports[`webpack5 (client, non-hydratable) > fix render > import specifiers > sh import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; -import { render as Render } from 'solid-js/web'; +import { render as Render } from '@solidjs/web'; const _REGISTRY = _$$registry(); const JSX__cleanup_1 = _$$component(_REGISTRY, "JSX__cleanup_1", _props => /*@refresh jsx-skip*/_$createComponent(_props.v0, {}), { location: "example.jsx:4:23", @@ -1310,7 +1310,7 @@ exports[`webpack5 (client, non-hydratable) > fix render > import specifiers > sh import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; -import { 'render' as Render } from 'solid-js/web'; +import { 'render' as Render } from '@solidjs/web'; const _REGISTRY = _$$registry(); const JSX__cleanup_1 = _$$component(_REGISTRY, "JSX__cleanup_1", _props => /*@refresh jsx-skip*/_$createComponent(_props.v0, {}), { location: "example.jsx:4:23", @@ -1330,7 +1330,7 @@ exports[`webpack5 (client, non-hydratable) > fix render > top-level statements > import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; -import { render } from 'solid-js/web'; +import { render } from '@solidjs/web'; const _REGISTRY = _$$registry(); const JSX__cleanup_1 = _$$component(_REGISTRY, "JSX__cleanup_1", _props => /*@refresh jsx-skip*/_$createComponent(_props.v0, {}), { location: "example.jsx:5:25", diff --git a/tests/client/esm.test.ts b/tests/client/esm.test.ts index c6a38ef..72336f1 100644 --- a/tests/client/esm.test.ts +++ b/tests/client/esm.test.ts @@ -719,7 +719,7 @@ describe('esm (client, non-hydratable)', () => { expect( await transform( ` - import { render } from 'solid-js/web'; + import { render } from '@solidjs/web'; render(() => , root); `, @@ -733,7 +733,7 @@ describe('esm (client, non-hydratable)', () => { expect( await transform( ` - import { render as Render } from 'solid-js/web'; + import { render as Render } from '@solidjs/web'; Render(() => , root); `, @@ -747,7 +747,7 @@ describe('esm (client, non-hydratable)', () => { expect( await transform( ` - import { 'render' as Render } from 'solid-js/web'; + import { 'render' as Render } from '@solidjs/web'; Render(() => , root); `, @@ -761,7 +761,7 @@ describe('esm (client, non-hydratable)', () => { expect( await transform( ` - import * as solidWeb from 'solid-js/web'; + import * as solidWeb from '@solidjs/web'; solidWeb.render(() => , root); `, @@ -777,7 +777,7 @@ describe('esm (client, non-hydratable)', () => { expect( await transform( ` - import { render } from 'solid-js/web'; + import { render } from '@solidjs/web'; if (root) { render(() => , root); @@ -796,7 +796,7 @@ describe('esm (client, non-hydratable)', () => { await transform( ` // @refresh reload - import { render } from 'solid-js/web'; + import { render } from '@solidjs/web'; if (root) { render(() => , root); diff --git a/tests/client/rspack-esm.test.ts b/tests/client/rspack-esm.test.ts index ead438c..9a18c50 100644 --- a/tests/client/rspack-esm.test.ts +++ b/tests/client/rspack-esm.test.ts @@ -719,7 +719,7 @@ describe('rspack-esm (client, non-hydratable)', () => { expect( await transform( ` - import { render } from 'solid-js/web'; + import { render } from '@solidjs/web'; render(() => , root); `, @@ -733,7 +733,7 @@ describe('rspack-esm (client, non-hydratable)', () => { expect( await transform( ` - import { render as Render } from 'solid-js/web'; + import { render as Render } from '@solidjs/web'; Render(() => , root); `, @@ -747,7 +747,7 @@ describe('rspack-esm (client, non-hydratable)', () => { expect( await transform( ` - import { 'render' as Render } from 'solid-js/web'; + import { 'render' as Render } from '@solidjs/web'; Render(() => , root); `, @@ -761,7 +761,7 @@ describe('rspack-esm (client, non-hydratable)', () => { expect( await transform( ` - import * as solidWeb from 'solid-js/web'; + import * as solidWeb from '@solidjs/web'; solidWeb.render(() => , root); `, @@ -777,7 +777,7 @@ describe('rspack-esm (client, non-hydratable)', () => { expect( await transform( ` - import { render } from 'solid-js/web'; + import { render } from '@solidjs/web'; if (root) { render(() => , root); @@ -796,7 +796,7 @@ describe('rspack-esm (client, non-hydratable)', () => { await transform( ` // @refresh reload - import { render } from 'solid-js/web'; + import { render } from '@solidjs/web'; if (root) { render(() => , root); diff --git a/tests/client/standard.test.ts b/tests/client/standard.test.ts index f076189..e046d94 100644 --- a/tests/client/standard.test.ts +++ b/tests/client/standard.test.ts @@ -719,7 +719,7 @@ describe('standard (client, non-hydratable)', () => { expect( await transform( ` - import { render } from 'solid-js/web'; + import { render } from '@solidjs/web'; render(() => , root); `, @@ -733,7 +733,7 @@ describe('standard (client, non-hydratable)', () => { expect( await transform( ` - import { render as Render } from 'solid-js/web'; + import { render as Render } from '@solidjs/web'; Render(() => , root); `, @@ -747,7 +747,7 @@ describe('standard (client, non-hydratable)', () => { expect( await transform( ` - import { 'render' as Render } from 'solid-js/web'; + import { 'render' as Render } from '@solidjs/web'; Render(() => , root); `, @@ -761,7 +761,7 @@ describe('standard (client, non-hydratable)', () => { expect( await transform( ` - import * as solidWeb from 'solid-js/web'; + import * as solidWeb from '@solidjs/web'; solidWeb.render(() => , root); `, @@ -777,7 +777,7 @@ describe('standard (client, non-hydratable)', () => { expect( await transform( ` - import { render } from 'solid-js/web'; + import { render } from '@solidjs/web'; if (root) { render(() => , root); @@ -796,7 +796,7 @@ describe('standard (client, non-hydratable)', () => { await transform( ` // @refresh reload - import { render } from 'solid-js/web'; + import { render } from '@solidjs/web'; if (root) { render(() => , root); diff --git a/tests/client/vite.test.ts b/tests/client/vite.test.ts index e581070..b934d1c 100644 --- a/tests/client/vite.test.ts +++ b/tests/client/vite.test.ts @@ -719,7 +719,7 @@ describe('vite (client, non-hydratable)', () => { expect( await transform( ` - import { render } from 'solid-js/web'; + import { render } from '@solidjs/web'; render(() => , root); `, @@ -733,7 +733,7 @@ describe('vite (client, non-hydratable)', () => { expect( await transform( ` - import { render as Render } from 'solid-js/web'; + import { render as Render } from '@solidjs/web'; Render(() => , root); `, @@ -747,7 +747,7 @@ describe('vite (client, non-hydratable)', () => { expect( await transform( ` - import { 'render' as Render } from 'solid-js/web'; + import { 'render' as Render } from '@solidjs/web'; Render(() => , root); `, @@ -761,7 +761,7 @@ describe('vite (client, non-hydratable)', () => { expect( await transform( ` - import * as solidWeb from 'solid-js/web'; + import * as solidWeb from '@solidjs/web'; solidWeb.render(() => , root); `, @@ -777,7 +777,7 @@ describe('vite (client, non-hydratable)', () => { expect( await transform( ` - import { render } from 'solid-js/web'; + import { render } from '@solidjs/web'; if (root) { render(() => , root); @@ -796,7 +796,7 @@ describe('vite (client, non-hydratable)', () => { await transform( ` // @refresh reload - import { render } from 'solid-js/web'; + import { render } from '@solidjs/web'; if (root) { render(() => , root); diff --git a/tests/client/webpack5.test.ts b/tests/client/webpack5.test.ts index 29cde94..dbcae04 100644 --- a/tests/client/webpack5.test.ts +++ b/tests/client/webpack5.test.ts @@ -719,7 +719,7 @@ describe('webpack5 (client, non-hydratable)', () => { expect( await transform( ` - import { render } from 'solid-js/web'; + import { render } from '@solidjs/web'; render(() => , root); `, @@ -733,7 +733,7 @@ describe('webpack5 (client, non-hydratable)', () => { expect( await transform( ` - import { render as Render } from 'solid-js/web'; + import { render as Render } from '@solidjs/web'; Render(() => , root); `, @@ -747,7 +747,7 @@ describe('webpack5 (client, non-hydratable)', () => { expect( await transform( ` - import { 'render' as Render } from 'solid-js/web'; + import { 'render' as Render } from '@solidjs/web'; Render(() => , root); `, @@ -761,7 +761,7 @@ describe('webpack5 (client, non-hydratable)', () => { expect( await transform( ` - import * as solidWeb from 'solid-js/web'; + import * as solidWeb from '@solidjs/web'; solidWeb.render(() => , root); `, @@ -777,7 +777,7 @@ describe('webpack5 (client, non-hydratable)', () => { expect( await transform( ` - import { render } from 'solid-js/web'; + import { render } from '@solidjs/web'; if (root) { render(() => , root); @@ -796,7 +796,7 @@ describe('webpack5 (client, non-hydratable)', () => { await transform( ` // @refresh reload - import { render } from 'solid-js/web'; + import { render } from '@solidjs/web'; if (root) { render(() => , root); diff --git a/tests/server-hydratable/__snapshots__/esm.test.ts.snap b/tests/server-hydratable/__snapshots__/esm.test.ts.snap index f0f8746..5898611 100644 --- a/tests/server-hydratable/__snapshots__/esm.test.ts.snap +++ b/tests/server-hydratable/__snapshots__/esm.test.ts.snap @@ -1397,7 +1397,7 @@ exports[`esm (server, hydratable) > fix render > @refresh reload > should work 1 "import { createComponent as _$createComponent } from "@solidjs/web"; import { $$decline as _$$decline } from "solid-refresh"; // @refresh reload -import { render } from 'solid-js/web'; +import { render } from '@solidjs/web'; if (root) { const _cleanup = render(() => _$createComponent(App, {}), root); if (import.meta.hot) import.meta.hot.dispose(_cleanup); @@ -1412,7 +1412,7 @@ exports[`esm (server, hydratable) > fix render > import specifiers > should work import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; -import * as solidWeb from 'solid-js/web'; +import * as solidWeb from '@solidjs/web'; const _REGISTRY = _$$registry(); const JSX__cleanup_1 = _$$component(_REGISTRY, "JSX__cleanup_1", _props => /*@refresh jsx-skip*/_$createComponent(_props.v0, {}), { location: "example.jsx:4:32", @@ -1432,7 +1432,7 @@ exports[`esm (server, hydratable) > fix render > import specifiers > should work import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; -import { render } from 'solid-js/web'; +import { render } from '@solidjs/web'; const _REGISTRY = _$$registry(); const JSX__cleanup_1 = _$$component(_REGISTRY, "JSX__cleanup_1", _props => /*@refresh jsx-skip*/_$createComponent(_props.v0, {}), { location: "example.jsx:4:23", @@ -1452,7 +1452,7 @@ exports[`esm (server, hydratable) > fix render > import specifiers > should work import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; -import { render as Render } from 'solid-js/web'; +import { render as Render } from '@solidjs/web'; const _REGISTRY = _$$registry(); const JSX__cleanup_1 = _$$component(_REGISTRY, "JSX__cleanup_1", _props => /*@refresh jsx-skip*/_$createComponent(_props.v0, {}), { location: "example.jsx:4:23", @@ -1472,7 +1472,7 @@ exports[`esm (server, hydratable) > fix render > import specifiers > should work import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; -import { 'render' as Render } from 'solid-js/web'; +import { 'render' as Render } from '@solidjs/web'; const _REGISTRY = _$$registry(); const JSX__cleanup_1 = _$$component(_REGISTRY, "JSX__cleanup_1", _props => /*@refresh jsx-skip*/_$createComponent(_props.v0, {}), { location: "example.jsx:4:23", @@ -1492,7 +1492,7 @@ exports[`esm (server, hydratable) > fix render > top-level statements > should w import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; -import { render } from 'solid-js/web'; +import { render } from '@solidjs/web'; const _REGISTRY = _$$registry(); const JSX__cleanup_1 = _$$component(_REGISTRY, "JSX__cleanup_1", _props => /*@refresh jsx-skip*/_$createComponent(_props.v0, {}), { location: "example.jsx:5:25", diff --git a/tests/server-hydratable/__snapshots__/rspack-esm.test.ts.snap b/tests/server-hydratable/__snapshots__/rspack-esm.test.ts.snap index 167b908..b1da04e 100644 --- a/tests/server-hydratable/__snapshots__/rspack-esm.test.ts.snap +++ b/tests/server-hydratable/__snapshots__/rspack-esm.test.ts.snap @@ -1397,7 +1397,7 @@ exports[`esm (server, hydratable) > fix render > @refresh reload > should work 1 "import { createComponent as _$createComponent } from "@solidjs/web"; import { $$decline as _$$decline } from "solid-refresh"; // @refresh reload -import { render } from 'solid-js/web'; +import { render } from '@solidjs/web'; if (root) { const _cleanup = render(() => _$createComponent(App, {}), root); if (import.meta.hot) import.meta.hot.dispose(_cleanup); @@ -1412,7 +1412,7 @@ exports[`esm (server, hydratable) > fix render > import specifiers > should work import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; -import * as solidWeb from 'solid-js/web'; +import * as solidWeb from '@solidjs/web'; const _REGISTRY = _$$registry(); const JSX__cleanup_1 = _$$component(_REGISTRY, "JSX__cleanup_1", _props => /*@refresh jsx-skip*/_$createComponent(_props.v0, {}), { location: "example.jsx:4:32", @@ -1432,7 +1432,7 @@ exports[`esm (server, hydratable) > fix render > import specifiers > should work import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; -import { render } from 'solid-js/web'; +import { render } from '@solidjs/web'; const _REGISTRY = _$$registry(); const JSX__cleanup_1 = _$$component(_REGISTRY, "JSX__cleanup_1", _props => /*@refresh jsx-skip*/_$createComponent(_props.v0, {}), { location: "example.jsx:4:23", @@ -1452,7 +1452,7 @@ exports[`esm (server, hydratable) > fix render > import specifiers > should work import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; -import { render as Render } from 'solid-js/web'; +import { render as Render } from '@solidjs/web'; const _REGISTRY = _$$registry(); const JSX__cleanup_1 = _$$component(_REGISTRY, "JSX__cleanup_1", _props => /*@refresh jsx-skip*/_$createComponent(_props.v0, {}), { location: "example.jsx:4:23", @@ -1472,7 +1472,7 @@ exports[`esm (server, hydratable) > fix render > import specifiers > should work import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; -import { 'render' as Render } from 'solid-js/web'; +import { 'render' as Render } from '@solidjs/web'; const _REGISTRY = _$$registry(); const JSX__cleanup_1 = _$$component(_REGISTRY, "JSX__cleanup_1", _props => /*@refresh jsx-skip*/_$createComponent(_props.v0, {}), { location: "example.jsx:4:23", @@ -1492,7 +1492,7 @@ exports[`esm (server, hydratable) > fix render > top-level statements > should w import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; -import { render } from 'solid-js/web'; +import { render } from '@solidjs/web'; const _REGISTRY = _$$registry(); const JSX__cleanup_1 = _$$component(_REGISTRY, "JSX__cleanup_1", _props => /*@refresh jsx-skip*/_$createComponent(_props.v0, {}), { location: "example.jsx:5:25", diff --git a/tests/server-hydratable/__snapshots__/standard.test.ts.snap b/tests/server-hydratable/__snapshots__/standard.test.ts.snap index 3a0b63a..190e3f6 100644 --- a/tests/server-hydratable/__snapshots__/standard.test.ts.snap +++ b/tests/server-hydratable/__snapshots__/standard.test.ts.snap @@ -1397,7 +1397,7 @@ exports[`standard (server, hydratable) > fix render > @refresh reload > should w "import { createComponent as _$createComponent } from "@solidjs/web"; import { $$decline as _$$decline } from "solid-refresh"; // @refresh reload -import { render } from 'solid-js/web'; +import { render } from '@solidjs/web'; if (root) { const _cleanup = render(() => _$createComponent(App, {}), root); if (module.hot) module.hot.dispose(_cleanup); @@ -1412,7 +1412,7 @@ exports[`standard (server, hydratable) > fix render > import specifiers > should import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; -import * as solidWeb from 'solid-js/web'; +import * as solidWeb from '@solidjs/web'; const _REGISTRY = _$$registry(); const JSX__cleanup_1 = _$$component(_REGISTRY, "JSX__cleanup_1", _props => /*@refresh jsx-skip*/_$createComponent(_props.v0, {}), { location: "example.jsx:4:32", @@ -1432,7 +1432,7 @@ exports[`standard (server, hydratable) > fix render > import specifiers > should import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; -import { render } from 'solid-js/web'; +import { render } from '@solidjs/web'; const _REGISTRY = _$$registry(); const JSX__cleanup_1 = _$$component(_REGISTRY, "JSX__cleanup_1", _props => /*@refresh jsx-skip*/_$createComponent(_props.v0, {}), { location: "example.jsx:4:23", @@ -1452,7 +1452,7 @@ exports[`standard (server, hydratable) > fix render > import specifiers > should import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; -import { render as Render } from 'solid-js/web'; +import { render as Render } from '@solidjs/web'; const _REGISTRY = _$$registry(); const JSX__cleanup_1 = _$$component(_REGISTRY, "JSX__cleanup_1", _props => /*@refresh jsx-skip*/_$createComponent(_props.v0, {}), { location: "example.jsx:4:23", @@ -1472,7 +1472,7 @@ exports[`standard (server, hydratable) > fix render > import specifiers > should import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; -import { 'render' as Render } from 'solid-js/web'; +import { 'render' as Render } from '@solidjs/web'; const _REGISTRY = _$$registry(); const JSX__cleanup_1 = _$$component(_REGISTRY, "JSX__cleanup_1", _props => /*@refresh jsx-skip*/_$createComponent(_props.v0, {}), { location: "example.jsx:4:23", @@ -1492,7 +1492,7 @@ exports[`standard (server, hydratable) > fix render > top-level statements > sho import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; -import { render } from 'solid-js/web'; +import { render } from '@solidjs/web'; const _REGISTRY = _$$registry(); const JSX__cleanup_1 = _$$component(_REGISTRY, "JSX__cleanup_1", _props => /*@refresh jsx-skip*/_$createComponent(_props.v0, {}), { location: "example.jsx:5:25", diff --git a/tests/server-hydratable/__snapshots__/vite.test.ts.snap b/tests/server-hydratable/__snapshots__/vite.test.ts.snap index ec1ead1..905fe31 100644 --- a/tests/server-hydratable/__snapshots__/vite.test.ts.snap +++ b/tests/server-hydratable/__snapshots__/vite.test.ts.snap @@ -1431,7 +1431,7 @@ if (import.meta.hot) { exports[`vite (server, hydratable) > fix render > @refresh reload > should work 1`] = ` "import { createComponent as _$createComponent } from "@solidjs/web"; // @refresh reload -import { render } from 'solid-js/web'; +import { render } from '@solidjs/web'; if (root) { const _cleanup = render(() => _$createComponent(App, {}), root); if (import.meta.hot) import.meta.hot.dispose(_cleanup); @@ -1446,7 +1446,7 @@ exports[`vite (server, hydratable) > fix render > import specifiers > should wor import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; -import * as solidWeb from 'solid-js/web'; +import * as solidWeb from '@solidjs/web'; const _REGISTRY = _$$registry(); const JSX__cleanup_1 = _$$component(_REGISTRY, "JSX__cleanup_1", _props => /*@refresh jsx-skip*/_$createComponent(_props.v0, {}), { location: "example.jsx:4:32", @@ -1467,7 +1467,7 @@ exports[`vite (server, hydratable) > fix render > import specifiers > should wor import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; -import { render } from 'solid-js/web'; +import { render } from '@solidjs/web'; const _REGISTRY = _$$registry(); const JSX__cleanup_1 = _$$component(_REGISTRY, "JSX__cleanup_1", _props => /*@refresh jsx-skip*/_$createComponent(_props.v0, {}), { location: "example.jsx:4:23", @@ -1488,7 +1488,7 @@ exports[`vite (server, hydratable) > fix render > import specifiers > should wor import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; -import { render as Render } from 'solid-js/web'; +import { render as Render } from '@solidjs/web'; const _REGISTRY = _$$registry(); const JSX__cleanup_1 = _$$component(_REGISTRY, "JSX__cleanup_1", _props => /*@refresh jsx-skip*/_$createComponent(_props.v0, {}), { location: "example.jsx:4:23", @@ -1509,7 +1509,7 @@ exports[`vite (server, hydratable) > fix render > import specifiers > should wor import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; -import { 'render' as Render } from 'solid-js/web'; +import { 'render' as Render } from '@solidjs/web'; const _REGISTRY = _$$registry(); const JSX__cleanup_1 = _$$component(_REGISTRY, "JSX__cleanup_1", _props => /*@refresh jsx-skip*/_$createComponent(_props.v0, {}), { location: "example.jsx:4:23", @@ -1530,7 +1530,7 @@ exports[`vite (server, hydratable) > fix render > top-level statements > should import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; -import { render } from 'solid-js/web'; +import { render } from '@solidjs/web'; const _REGISTRY = _$$registry(); const JSX__cleanup_1 = _$$component(_REGISTRY, "JSX__cleanup_1", _props => /*@refresh jsx-skip*/_$createComponent(_props.v0, {}), { location: "example.jsx:5:25", diff --git a/tests/server-hydratable/__snapshots__/webpack5.test.ts.snap b/tests/server-hydratable/__snapshots__/webpack5.test.ts.snap index eb69d51..94b9e7a 100644 --- a/tests/server-hydratable/__snapshots__/webpack5.test.ts.snap +++ b/tests/server-hydratable/__snapshots__/webpack5.test.ts.snap @@ -1397,7 +1397,7 @@ exports[`webpack5 (server, hydratable) > fix render > @refresh reload > should w "import { createComponent as _$createComponent } from "@solidjs/web"; import { $$decline as _$$decline } from "solid-refresh"; // @refresh reload -import { render } from 'solid-js/web'; +import { render } from '@solidjs/web'; if (root) { const _cleanup = render(() => _$createComponent(App, {}), root); if (import.meta.webpackHot) import.meta.webpackHot.dispose(_cleanup); @@ -1412,7 +1412,7 @@ exports[`webpack5 (server, hydratable) > fix render > import specifiers > should import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; -import * as solidWeb from 'solid-js/web'; +import * as solidWeb from '@solidjs/web'; const _REGISTRY = _$$registry(); const JSX__cleanup_1 = _$$component(_REGISTRY, "JSX__cleanup_1", _props => /*@refresh jsx-skip*/_$createComponent(_props.v0, {}), { location: "example.jsx:4:32", @@ -1432,7 +1432,7 @@ exports[`webpack5 (server, hydratable) > fix render > import specifiers > should import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; -import { render } from 'solid-js/web'; +import { render } from '@solidjs/web'; const _REGISTRY = _$$registry(); const JSX__cleanup_1 = _$$component(_REGISTRY, "JSX__cleanup_1", _props => /*@refresh jsx-skip*/_$createComponent(_props.v0, {}), { location: "example.jsx:4:23", @@ -1452,7 +1452,7 @@ exports[`webpack5 (server, hydratable) > fix render > import specifiers > should import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; -import { render as Render } from 'solid-js/web'; +import { render as Render } from '@solidjs/web'; const _REGISTRY = _$$registry(); const JSX__cleanup_1 = _$$component(_REGISTRY, "JSX__cleanup_1", _props => /*@refresh jsx-skip*/_$createComponent(_props.v0, {}), { location: "example.jsx:4:23", @@ -1472,7 +1472,7 @@ exports[`webpack5 (server, hydratable) > fix render > import specifiers > should import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; -import { 'render' as Render } from 'solid-js/web'; +import { 'render' as Render } from '@solidjs/web'; const _REGISTRY = _$$registry(); const JSX__cleanup_1 = _$$component(_REGISTRY, "JSX__cleanup_1", _props => /*@refresh jsx-skip*/_$createComponent(_props.v0, {}), { location: "example.jsx:4:23", @@ -1492,7 +1492,7 @@ exports[`webpack5 (server, hydratable) > fix render > top-level statements > sho import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; -import { render } from 'solid-js/web'; +import { render } from '@solidjs/web'; const _REGISTRY = _$$registry(); const JSX__cleanup_1 = _$$component(_REGISTRY, "JSX__cleanup_1", _props => /*@refresh jsx-skip*/_$createComponent(_props.v0, {}), { location: "example.jsx:5:25", diff --git a/tests/server-hydratable/esm.test.ts b/tests/server-hydratable/esm.test.ts index 1f55074..88ef3a0 100644 --- a/tests/server-hydratable/esm.test.ts +++ b/tests/server-hydratable/esm.test.ts @@ -719,7 +719,7 @@ describe('esm (server, hydratable)', () => { expect( await transform( ` - import { render } from 'solid-js/web'; + import { render } from '@solidjs/web'; render(() => , root); `, @@ -733,7 +733,7 @@ describe('esm (server, hydratable)', () => { expect( await transform( ` - import { render as Render } from 'solid-js/web'; + import { render as Render } from '@solidjs/web'; Render(() => , root); `, @@ -747,7 +747,7 @@ describe('esm (server, hydratable)', () => { expect( await transform( ` - import { 'render' as Render } from 'solid-js/web'; + import { 'render' as Render } from '@solidjs/web'; Render(() => , root); `, @@ -761,7 +761,7 @@ describe('esm (server, hydratable)', () => { expect( await transform( ` - import * as solidWeb from 'solid-js/web'; + import * as solidWeb from '@solidjs/web'; solidWeb.render(() => , root); `, @@ -777,7 +777,7 @@ describe('esm (server, hydratable)', () => { expect( await transform( ` - import { render } from 'solid-js/web'; + import { render } from '@solidjs/web'; if (root) { render(() => , root); @@ -796,7 +796,7 @@ describe('esm (server, hydratable)', () => { await transform( ` // @refresh reload - import { render } from 'solid-js/web'; + import { render } from '@solidjs/web'; if (root) { render(() => , root); diff --git a/tests/server-hydratable/rspack-esm.test.ts b/tests/server-hydratable/rspack-esm.test.ts index 15615c3..a9a65fc 100644 --- a/tests/server-hydratable/rspack-esm.test.ts +++ b/tests/server-hydratable/rspack-esm.test.ts @@ -719,7 +719,7 @@ describe('esm (server, hydratable)', () => { expect( await transform( ` - import { render } from 'solid-js/web'; + import { render } from '@solidjs/web'; render(() => , root); `, @@ -733,7 +733,7 @@ describe('esm (server, hydratable)', () => { expect( await transform( ` - import { render as Render } from 'solid-js/web'; + import { render as Render } from '@solidjs/web'; Render(() => , root); `, @@ -747,7 +747,7 @@ describe('esm (server, hydratable)', () => { expect( await transform( ` - import { 'render' as Render } from 'solid-js/web'; + import { 'render' as Render } from '@solidjs/web'; Render(() => , root); `, @@ -761,7 +761,7 @@ describe('esm (server, hydratable)', () => { expect( await transform( ` - import * as solidWeb from 'solid-js/web'; + import * as solidWeb from '@solidjs/web'; solidWeb.render(() => , root); `, @@ -777,7 +777,7 @@ describe('esm (server, hydratable)', () => { expect( await transform( ` - import { render } from 'solid-js/web'; + import { render } from '@solidjs/web'; if (root) { render(() => , root); @@ -796,7 +796,7 @@ describe('esm (server, hydratable)', () => { await transform( ` // @refresh reload - import { render } from 'solid-js/web'; + import { render } from '@solidjs/web'; if (root) { render(() => , root); diff --git a/tests/server-hydratable/standard.test.ts b/tests/server-hydratable/standard.test.ts index 77cd43a..1daf8f6 100644 --- a/tests/server-hydratable/standard.test.ts +++ b/tests/server-hydratable/standard.test.ts @@ -719,7 +719,7 @@ describe('standard (server, hydratable)', () => { expect( await transform( ` - import { render } from 'solid-js/web'; + import { render } from '@solidjs/web'; render(() => , root); `, @@ -733,7 +733,7 @@ describe('standard (server, hydratable)', () => { expect( await transform( ` - import { render as Render } from 'solid-js/web'; + import { render as Render } from '@solidjs/web'; Render(() => , root); `, @@ -747,7 +747,7 @@ describe('standard (server, hydratable)', () => { expect( await transform( ` - import { 'render' as Render } from 'solid-js/web'; + import { 'render' as Render } from '@solidjs/web'; Render(() => , root); `, @@ -761,7 +761,7 @@ describe('standard (server, hydratable)', () => { expect( await transform( ` - import * as solidWeb from 'solid-js/web'; + import * as solidWeb from '@solidjs/web'; solidWeb.render(() => , root); `, @@ -777,7 +777,7 @@ describe('standard (server, hydratable)', () => { expect( await transform( ` - import { render } from 'solid-js/web'; + import { render } from '@solidjs/web'; if (root) { render(() => , root); @@ -796,7 +796,7 @@ describe('standard (server, hydratable)', () => { await transform( ` // @refresh reload - import { render } from 'solid-js/web'; + import { render } from '@solidjs/web'; if (root) { render(() => , root); diff --git a/tests/server-hydratable/vite.test.ts b/tests/server-hydratable/vite.test.ts index 69a9f6b..bd51647 100644 --- a/tests/server-hydratable/vite.test.ts +++ b/tests/server-hydratable/vite.test.ts @@ -719,7 +719,7 @@ describe('vite (server, hydratable)', () => { expect( await transform( ` - import { render } from 'solid-js/web'; + import { render } from '@solidjs/web'; render(() => , root); `, @@ -733,7 +733,7 @@ describe('vite (server, hydratable)', () => { expect( await transform( ` - import { render as Render } from 'solid-js/web'; + import { render as Render } from '@solidjs/web'; Render(() => , root); `, @@ -747,7 +747,7 @@ describe('vite (server, hydratable)', () => { expect( await transform( ` - import { 'render' as Render } from 'solid-js/web'; + import { 'render' as Render } from '@solidjs/web'; Render(() => , root); `, @@ -761,7 +761,7 @@ describe('vite (server, hydratable)', () => { expect( await transform( ` - import * as solidWeb from 'solid-js/web'; + import * as solidWeb from '@solidjs/web'; solidWeb.render(() => , root); `, @@ -777,7 +777,7 @@ describe('vite (server, hydratable)', () => { expect( await transform( ` - import { render } from 'solid-js/web'; + import { render } from '@solidjs/web'; if (root) { render(() => , root); @@ -796,7 +796,7 @@ describe('vite (server, hydratable)', () => { await transform( ` // @refresh reload - import { render } from 'solid-js/web'; + import { render } from '@solidjs/web'; if (root) { render(() => , root); diff --git a/tests/server-hydratable/webpack5.test.ts b/tests/server-hydratable/webpack5.test.ts index 1774f21..8b3218b 100644 --- a/tests/server-hydratable/webpack5.test.ts +++ b/tests/server-hydratable/webpack5.test.ts @@ -719,7 +719,7 @@ describe('webpack5 (server, hydratable)', () => { expect( await transform( ` - import { render } from 'solid-js/web'; + import { render } from '@solidjs/web'; render(() => , root); `, @@ -733,7 +733,7 @@ describe('webpack5 (server, hydratable)', () => { expect( await transform( ` - import { render as Render } from 'solid-js/web'; + import { render as Render } from '@solidjs/web'; Render(() => , root); `, @@ -747,7 +747,7 @@ describe('webpack5 (server, hydratable)', () => { expect( await transform( ` - import { 'render' as Render } from 'solid-js/web'; + import { 'render' as Render } from '@solidjs/web'; Render(() => , root); `, @@ -761,7 +761,7 @@ describe('webpack5 (server, hydratable)', () => { expect( await transform( ` - import * as solidWeb from 'solid-js/web'; + import * as solidWeb from '@solidjs/web'; solidWeb.render(() => , root); `, @@ -777,7 +777,7 @@ describe('webpack5 (server, hydratable)', () => { expect( await transform( ` - import { render } from 'solid-js/web'; + import { render } from '@solidjs/web'; if (root) { render(() => , root); @@ -796,7 +796,7 @@ describe('webpack5 (server, hydratable)', () => { await transform( ` // @refresh reload - import { render } from 'solid-js/web'; + import { render } from '@solidjs/web'; if (root) { render(() => , root); diff --git a/tests/server/__snapshots__/esm.test.ts.snap b/tests/server/__snapshots__/esm.test.ts.snap index ae21077..7cc11b4 100644 --- a/tests/server/__snapshots__/esm.test.ts.snap +++ b/tests/server/__snapshots__/esm.test.ts.snap @@ -1226,7 +1226,7 @@ exports[`esm (server, non-hydratable) > fix render > @refresh reload > should wo "import { createComponent as _$createComponent } from "@solidjs/web"; import { $$decline as _$$decline } from "solid-refresh"; // @refresh reload -import { render } from 'solid-js/web'; +import { render } from '@solidjs/web'; if (root) { const _cleanup = render(() => _$createComponent(App, {}), root); if (import.meta.hot) import.meta.hot.dispose(_cleanup); @@ -1241,7 +1241,7 @@ exports[`esm (server, non-hydratable) > fix render > import specifiers > should import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; -import * as solidWeb from 'solid-js/web'; +import * as solidWeb from '@solidjs/web'; const _REGISTRY = _$$registry(); const JSX__cleanup_1 = _$$component(_REGISTRY, "JSX__cleanup_1", _props => /*@refresh jsx-skip*/_$createComponent(_props.v0, {}), { location: "example.jsx:4:32", @@ -1261,7 +1261,7 @@ exports[`esm (server, non-hydratable) > fix render > import specifiers > should import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; -import { render } from 'solid-js/web'; +import { render } from '@solidjs/web'; const _REGISTRY = _$$registry(); const JSX__cleanup_1 = _$$component(_REGISTRY, "JSX__cleanup_1", _props => /*@refresh jsx-skip*/_$createComponent(_props.v0, {}), { location: "example.jsx:4:23", @@ -1281,7 +1281,7 @@ exports[`esm (server, non-hydratable) > fix render > import specifiers > should import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; -import { render as Render } from 'solid-js/web'; +import { render as Render } from '@solidjs/web'; const _REGISTRY = _$$registry(); const JSX__cleanup_1 = _$$component(_REGISTRY, "JSX__cleanup_1", _props => /*@refresh jsx-skip*/_$createComponent(_props.v0, {}), { location: "example.jsx:4:23", @@ -1301,7 +1301,7 @@ exports[`esm (server, non-hydratable) > fix render > import specifiers > should import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; -import { 'render' as Render } from 'solid-js/web'; +import { 'render' as Render } from '@solidjs/web'; const _REGISTRY = _$$registry(); const JSX__cleanup_1 = _$$component(_REGISTRY, "JSX__cleanup_1", _props => /*@refresh jsx-skip*/_$createComponent(_props.v0, {}), { location: "example.jsx:4:23", @@ -1321,7 +1321,7 @@ exports[`esm (server, non-hydratable) > fix render > top-level statements > shou import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; -import { render } from 'solid-js/web'; +import { render } from '@solidjs/web'; const _REGISTRY = _$$registry(); const JSX__cleanup_1 = _$$component(_REGISTRY, "JSX__cleanup_1", _props => /*@refresh jsx-skip*/_$createComponent(_props.v0, {}), { location: "example.jsx:5:25", diff --git a/tests/server/__snapshots__/rspack-esm.test.ts.snap b/tests/server/__snapshots__/rspack-esm.test.ts.snap index f1c90cc..71158b8 100644 --- a/tests/server/__snapshots__/rspack-esm.test.ts.snap +++ b/tests/server/__snapshots__/rspack-esm.test.ts.snap @@ -1226,7 +1226,7 @@ exports[`rspack-esm (server, non-hydratable) > fix render > @refresh reload > sh "import { createComponent as _$createComponent } from "@solidjs/web"; import { $$decline as _$$decline } from "solid-refresh"; // @refresh reload -import { render } from 'solid-js/web'; +import { render } from '@solidjs/web'; if (root) { const _cleanup = render(() => _$createComponent(App, {}), root); if (import.meta.webpackHot) import.meta.webpackHot.dispose(_cleanup); @@ -1241,7 +1241,7 @@ exports[`rspack-esm (server, non-hydratable) > fix render > import specifiers > import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; -import * as solidWeb from 'solid-js/web'; +import * as solidWeb from '@solidjs/web'; const _REGISTRY = _$$registry(); const JSX__cleanup_1 = _$$component(_REGISTRY, "JSX__cleanup_1", _props => /*@refresh jsx-skip*/_$createComponent(_props.v0, {}), { location: "example.jsx:4:32", @@ -1261,7 +1261,7 @@ exports[`rspack-esm (server, non-hydratable) > fix render > import specifiers > import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; -import { render } from 'solid-js/web'; +import { render } from '@solidjs/web'; const _REGISTRY = _$$registry(); const JSX__cleanup_1 = _$$component(_REGISTRY, "JSX__cleanup_1", _props => /*@refresh jsx-skip*/_$createComponent(_props.v0, {}), { location: "example.jsx:4:23", @@ -1281,7 +1281,7 @@ exports[`rspack-esm (server, non-hydratable) > fix render > import specifiers > import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; -import { render as Render } from 'solid-js/web'; +import { render as Render } from '@solidjs/web'; const _REGISTRY = _$$registry(); const JSX__cleanup_1 = _$$component(_REGISTRY, "JSX__cleanup_1", _props => /*@refresh jsx-skip*/_$createComponent(_props.v0, {}), { location: "example.jsx:4:23", @@ -1301,7 +1301,7 @@ exports[`rspack-esm (server, non-hydratable) > fix render > import specifiers > import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; -import { 'render' as Render } from 'solid-js/web'; +import { 'render' as Render } from '@solidjs/web'; const _REGISTRY = _$$registry(); const JSX__cleanup_1 = _$$component(_REGISTRY, "JSX__cleanup_1", _props => /*@refresh jsx-skip*/_$createComponent(_props.v0, {}), { location: "example.jsx:4:23", @@ -1321,7 +1321,7 @@ exports[`rspack-esm (server, non-hydratable) > fix render > top-level statements import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; -import { render } from 'solid-js/web'; +import { render } from '@solidjs/web'; const _REGISTRY = _$$registry(); const JSX__cleanup_1 = _$$component(_REGISTRY, "JSX__cleanup_1", _props => /*@refresh jsx-skip*/_$createComponent(_props.v0, {}), { location: "example.jsx:5:25", diff --git a/tests/server/__snapshots__/standard.test.ts.snap b/tests/server/__snapshots__/standard.test.ts.snap index 773cd0b..37578a0 100644 --- a/tests/server/__snapshots__/standard.test.ts.snap +++ b/tests/server/__snapshots__/standard.test.ts.snap @@ -1226,7 +1226,7 @@ exports[`standard (server, non-hydratable) > fix render > @refresh reload > shou "import { createComponent as _$createComponent } from "@solidjs/web"; import { $$decline as _$$decline } from "solid-refresh"; // @refresh reload -import { render } from 'solid-js/web'; +import { render } from '@solidjs/web'; if (root) { const _cleanup = render(() => _$createComponent(App, {}), root); if (module.hot) module.hot.dispose(_cleanup); @@ -1241,7 +1241,7 @@ exports[`standard (server, non-hydratable) > fix render > import specifiers > sh import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; -import * as solidWeb from 'solid-js/web'; +import * as solidWeb from '@solidjs/web'; const _REGISTRY = _$$registry(); const JSX__cleanup_1 = _$$component(_REGISTRY, "JSX__cleanup_1", _props => /*@refresh jsx-skip*/_$createComponent(_props.v0, {}), { location: "example.jsx:4:32", @@ -1261,7 +1261,7 @@ exports[`standard (server, non-hydratable) > fix render > import specifiers > sh import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; -import { render } from 'solid-js/web'; +import { render } from '@solidjs/web'; const _REGISTRY = _$$registry(); const JSX__cleanup_1 = _$$component(_REGISTRY, "JSX__cleanup_1", _props => /*@refresh jsx-skip*/_$createComponent(_props.v0, {}), { location: "example.jsx:4:23", @@ -1281,7 +1281,7 @@ exports[`standard (server, non-hydratable) > fix render > import specifiers > sh import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; -import { render as Render } from 'solid-js/web'; +import { render as Render } from '@solidjs/web'; const _REGISTRY = _$$registry(); const JSX__cleanup_1 = _$$component(_REGISTRY, "JSX__cleanup_1", _props => /*@refresh jsx-skip*/_$createComponent(_props.v0, {}), { location: "example.jsx:4:23", @@ -1301,7 +1301,7 @@ exports[`standard (server, non-hydratable) > fix render > import specifiers > sh import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; -import { 'render' as Render } from 'solid-js/web'; +import { 'render' as Render } from '@solidjs/web'; const _REGISTRY = _$$registry(); const JSX__cleanup_1 = _$$component(_REGISTRY, "JSX__cleanup_1", _props => /*@refresh jsx-skip*/_$createComponent(_props.v0, {}), { location: "example.jsx:4:23", @@ -1321,7 +1321,7 @@ exports[`standard (server, non-hydratable) > fix render > top-level statements > import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; -import { render } from 'solid-js/web'; +import { render } from '@solidjs/web'; const _REGISTRY = _$$registry(); const JSX__cleanup_1 = _$$component(_REGISTRY, "JSX__cleanup_1", _props => /*@refresh jsx-skip*/_$createComponent(_props.v0, {}), { location: "example.jsx:5:25", diff --git a/tests/server/__snapshots__/vite.test.ts.snap b/tests/server/__snapshots__/vite.test.ts.snap index 7374545..226a1a5 100644 --- a/tests/server/__snapshots__/vite.test.ts.snap +++ b/tests/server/__snapshots__/vite.test.ts.snap @@ -1260,7 +1260,7 @@ if (import.meta.hot) { exports[`vite (server, non-hydratable) > fix render > @refresh reload > should work 1`] = ` "import { createComponent as _$createComponent } from "@solidjs/web"; // @refresh reload -import { render } from 'solid-js/web'; +import { render } from '@solidjs/web'; if (root) { const _cleanup = render(() => _$createComponent(App, {}), root); if (import.meta.hot) import.meta.hot.dispose(_cleanup); @@ -1275,7 +1275,7 @@ exports[`vite (server, non-hydratable) > fix render > import specifiers > should import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; -import * as solidWeb from 'solid-js/web'; +import * as solidWeb from '@solidjs/web'; const _REGISTRY = _$$registry(); const JSX__cleanup_1 = _$$component(_REGISTRY, "JSX__cleanup_1", _props => /*@refresh jsx-skip*/_$createComponent(_props.v0, {}), { location: "example.jsx:4:32", @@ -1296,7 +1296,7 @@ exports[`vite (server, non-hydratable) > fix render > import specifiers > should import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; -import { render } from 'solid-js/web'; +import { render } from '@solidjs/web'; const _REGISTRY = _$$registry(); const JSX__cleanup_1 = _$$component(_REGISTRY, "JSX__cleanup_1", _props => /*@refresh jsx-skip*/_$createComponent(_props.v0, {}), { location: "example.jsx:4:23", @@ -1317,7 +1317,7 @@ exports[`vite (server, non-hydratable) > fix render > import specifiers > should import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; -import { render as Render } from 'solid-js/web'; +import { render as Render } from '@solidjs/web'; const _REGISTRY = _$$registry(); const JSX__cleanup_1 = _$$component(_REGISTRY, "JSX__cleanup_1", _props => /*@refresh jsx-skip*/_$createComponent(_props.v0, {}), { location: "example.jsx:4:23", @@ -1338,7 +1338,7 @@ exports[`vite (server, non-hydratable) > fix render > import specifiers > should import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; -import { 'render' as Render } from 'solid-js/web'; +import { 'render' as Render } from '@solidjs/web'; const _REGISTRY = _$$registry(); const JSX__cleanup_1 = _$$component(_REGISTRY, "JSX__cleanup_1", _props => /*@refresh jsx-skip*/_$createComponent(_props.v0, {}), { location: "example.jsx:4:23", @@ -1359,7 +1359,7 @@ exports[`vite (server, non-hydratable) > fix render > top-level statements > sho import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; -import { render } from 'solid-js/web'; +import { render } from '@solidjs/web'; const _REGISTRY = _$$registry(); const JSX__cleanup_1 = _$$component(_REGISTRY, "JSX__cleanup_1", _props => /*@refresh jsx-skip*/_$createComponent(_props.v0, {}), { location: "example.jsx:5:25", diff --git a/tests/server/__snapshots__/webpack5.test.ts.snap b/tests/server/__snapshots__/webpack5.test.ts.snap index 0b95155..bbf6c72 100644 --- a/tests/server/__snapshots__/webpack5.test.ts.snap +++ b/tests/server/__snapshots__/webpack5.test.ts.snap @@ -1226,7 +1226,7 @@ exports[`webpack5 (server, non-hydratable) > fix render > @refresh reload > shou "import { createComponent as _$createComponent } from "@solidjs/web"; import { $$decline as _$$decline } from "solid-refresh"; // @refresh reload -import { render } from 'solid-js/web'; +import { render } from '@solidjs/web'; if (root) { const _cleanup = render(() => _$createComponent(App, {}), root); if (import.meta.webpackHot) import.meta.webpackHot.dispose(_cleanup); @@ -1241,7 +1241,7 @@ exports[`webpack5 (server, non-hydratable) > fix render > import specifiers > sh import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; -import * as solidWeb from 'solid-js/web'; +import * as solidWeb from '@solidjs/web'; const _REGISTRY = _$$registry(); const JSX__cleanup_1 = _$$component(_REGISTRY, "JSX__cleanup_1", _props => /*@refresh jsx-skip*/_$createComponent(_props.v0, {}), { location: "example.jsx:4:32", @@ -1261,7 +1261,7 @@ exports[`webpack5 (server, non-hydratable) > fix render > import specifiers > sh import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; -import { render } from 'solid-js/web'; +import { render } from '@solidjs/web'; const _REGISTRY = _$$registry(); const JSX__cleanup_1 = _$$component(_REGISTRY, "JSX__cleanup_1", _props => /*@refresh jsx-skip*/_$createComponent(_props.v0, {}), { location: "example.jsx:4:23", @@ -1281,7 +1281,7 @@ exports[`webpack5 (server, non-hydratable) > fix render > import specifiers > sh import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; -import { render as Render } from 'solid-js/web'; +import { render as Render } from '@solidjs/web'; const _REGISTRY = _$$registry(); const JSX__cleanup_1 = _$$component(_REGISTRY, "JSX__cleanup_1", _props => /*@refresh jsx-skip*/_$createComponent(_props.v0, {}), { location: "example.jsx:4:23", @@ -1301,7 +1301,7 @@ exports[`webpack5 (server, non-hydratable) > fix render > import specifiers > sh import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; -import { 'render' as Render } from 'solid-js/web'; +import { 'render' as Render } from '@solidjs/web'; const _REGISTRY = _$$registry(); const JSX__cleanup_1 = _$$component(_REGISTRY, "JSX__cleanup_1", _props => /*@refresh jsx-skip*/_$createComponent(_props.v0, {}), { location: "example.jsx:4:23", @@ -1321,7 +1321,7 @@ exports[`webpack5 (server, non-hydratable) > fix render > top-level statements > import { $$component as _$$component } from "solid-refresh"; import { $$refresh as _$$refresh } from "solid-refresh"; import { $$registry as _$$registry } from "solid-refresh"; -import { render } from 'solid-js/web'; +import { render } from '@solidjs/web'; const _REGISTRY = _$$registry(); const JSX__cleanup_1 = _$$component(_REGISTRY, "JSX__cleanup_1", _props => /*@refresh jsx-skip*/_$createComponent(_props.v0, {}), { location: "example.jsx:5:25", diff --git a/tests/server/esm.test.ts b/tests/server/esm.test.ts index c472adc..202ebc7 100644 --- a/tests/server/esm.test.ts +++ b/tests/server/esm.test.ts @@ -719,7 +719,7 @@ describe('esm (server, non-hydratable)', () => { expect( await transform( ` - import { render } from 'solid-js/web'; + import { render } from '@solidjs/web'; render(() => , root); `, @@ -733,7 +733,7 @@ describe('esm (server, non-hydratable)', () => { expect( await transform( ` - import { render as Render } from 'solid-js/web'; + import { render as Render } from '@solidjs/web'; Render(() => , root); `, @@ -747,7 +747,7 @@ describe('esm (server, non-hydratable)', () => { expect( await transform( ` - import { 'render' as Render } from 'solid-js/web'; + import { 'render' as Render } from '@solidjs/web'; Render(() => , root); `, @@ -761,7 +761,7 @@ describe('esm (server, non-hydratable)', () => { expect( await transform( ` - import * as solidWeb from 'solid-js/web'; + import * as solidWeb from '@solidjs/web'; solidWeb.render(() => , root); `, @@ -777,7 +777,7 @@ describe('esm (server, non-hydratable)', () => { expect( await transform( ` - import { render } from 'solid-js/web'; + import { render } from '@solidjs/web'; if (root) { render(() => , root); @@ -796,7 +796,7 @@ describe('esm (server, non-hydratable)', () => { await transform( ` // @refresh reload - import { render } from 'solid-js/web'; + import { render } from '@solidjs/web'; if (root) { render(() => , root); diff --git a/tests/server/rspack-esm.test.ts b/tests/server/rspack-esm.test.ts index e0b412a..8370645 100644 --- a/tests/server/rspack-esm.test.ts +++ b/tests/server/rspack-esm.test.ts @@ -719,7 +719,7 @@ describe('rspack-esm (server, non-hydratable)', () => { expect( await transform( ` - import { render } from 'solid-js/web'; + import { render } from '@solidjs/web'; render(() => , root); `, @@ -733,7 +733,7 @@ describe('rspack-esm (server, non-hydratable)', () => { expect( await transform( ` - import { render as Render } from 'solid-js/web'; + import { render as Render } from '@solidjs/web'; Render(() => , root); `, @@ -747,7 +747,7 @@ describe('rspack-esm (server, non-hydratable)', () => { expect( await transform( ` - import { 'render' as Render } from 'solid-js/web'; + import { 'render' as Render } from '@solidjs/web'; Render(() => , root); `, @@ -761,7 +761,7 @@ describe('rspack-esm (server, non-hydratable)', () => { expect( await transform( ` - import * as solidWeb from 'solid-js/web'; + import * as solidWeb from '@solidjs/web'; solidWeb.render(() => , root); `, @@ -777,7 +777,7 @@ describe('rspack-esm (server, non-hydratable)', () => { expect( await transform( ` - import { render } from 'solid-js/web'; + import { render } from '@solidjs/web'; if (root) { render(() => , root); @@ -796,7 +796,7 @@ describe('rspack-esm (server, non-hydratable)', () => { await transform( ` // @refresh reload - import { render } from 'solid-js/web'; + import { render } from '@solidjs/web'; if (root) { render(() => , root); diff --git a/tests/server/standard.test.ts b/tests/server/standard.test.ts index b34a844..879865a 100644 --- a/tests/server/standard.test.ts +++ b/tests/server/standard.test.ts @@ -719,7 +719,7 @@ describe('standard (server, non-hydratable)', () => { expect( await transform( ` - import { render } from 'solid-js/web'; + import { render } from '@solidjs/web'; render(() => , root); `, @@ -733,7 +733,7 @@ describe('standard (server, non-hydratable)', () => { expect( await transform( ` - import { render as Render } from 'solid-js/web'; + import { render as Render } from '@solidjs/web'; Render(() => , root); `, @@ -747,7 +747,7 @@ describe('standard (server, non-hydratable)', () => { expect( await transform( ` - import { 'render' as Render } from 'solid-js/web'; + import { 'render' as Render } from '@solidjs/web'; Render(() => , root); `, @@ -761,7 +761,7 @@ describe('standard (server, non-hydratable)', () => { expect( await transform( ` - import * as solidWeb from 'solid-js/web'; + import * as solidWeb from '@solidjs/web'; solidWeb.render(() => , root); `, @@ -777,7 +777,7 @@ describe('standard (server, non-hydratable)', () => { expect( await transform( ` - import { render } from 'solid-js/web'; + import { render } from '@solidjs/web'; if (root) { render(() => , root); @@ -796,7 +796,7 @@ describe('standard (server, non-hydratable)', () => { await transform( ` // @refresh reload - import { render } from 'solid-js/web'; + import { render } from '@solidjs/web'; if (root) { render(() => , root); diff --git a/tests/server/vite.test.ts b/tests/server/vite.test.ts index ab0ef1b..ed8ef44 100644 --- a/tests/server/vite.test.ts +++ b/tests/server/vite.test.ts @@ -719,7 +719,7 @@ describe('vite (server, non-hydratable)', () => { expect( await transform( ` - import { render } from 'solid-js/web'; + import { render } from '@solidjs/web'; render(() => , root); `, @@ -733,7 +733,7 @@ describe('vite (server, non-hydratable)', () => { expect( await transform( ` - import { render as Render } from 'solid-js/web'; + import { render as Render } from '@solidjs/web'; Render(() => , root); `, @@ -747,7 +747,7 @@ describe('vite (server, non-hydratable)', () => { expect( await transform( ` - import { 'render' as Render } from 'solid-js/web'; + import { 'render' as Render } from '@solidjs/web'; Render(() => , root); `, @@ -761,7 +761,7 @@ describe('vite (server, non-hydratable)', () => { expect( await transform( ` - import * as solidWeb from 'solid-js/web'; + import * as solidWeb from '@solidjs/web'; solidWeb.render(() => , root); `, @@ -777,7 +777,7 @@ describe('vite (server, non-hydratable)', () => { expect( await transform( ` - import { render } from 'solid-js/web'; + import { render } from '@solidjs/web'; if (root) { render(() => , root); @@ -796,7 +796,7 @@ describe('vite (server, non-hydratable)', () => { await transform( ` // @refresh reload - import { render } from 'solid-js/web'; + import { render } from '@solidjs/web'; if (root) { render(() => , root); diff --git a/tests/server/webpack5.test.ts b/tests/server/webpack5.test.ts index 97e0fe1..718f3e7 100644 --- a/tests/server/webpack5.test.ts +++ b/tests/server/webpack5.test.ts @@ -719,7 +719,7 @@ describe('webpack5 (server, non-hydratable)', () => { expect( await transform( ` - import { render } from 'solid-js/web'; + import { render } from '@solidjs/web'; render(() => , root); `, @@ -733,7 +733,7 @@ describe('webpack5 (server, non-hydratable)', () => { expect( await transform( ` - import { render as Render } from 'solid-js/web'; + import { render as Render } from '@solidjs/web'; Render(() => , root); `, @@ -747,7 +747,7 @@ describe('webpack5 (server, non-hydratable)', () => { expect( await transform( ` - import { 'render' as Render } from 'solid-js/web'; + import { 'render' as Render } from '@solidjs/web'; Render(() => , root); `, @@ -761,7 +761,7 @@ describe('webpack5 (server, non-hydratable)', () => { expect( await transform( ` - import * as solidWeb from 'solid-js/web'; + import * as solidWeb from '@solidjs/web'; solidWeb.render(() => , root); `, @@ -777,7 +777,7 @@ describe('webpack5 (server, non-hydratable)', () => { expect( await transform( ` - import { render } from 'solid-js/web'; + import { render } from '@solidjs/web'; if (root) { render(() => , root); @@ -796,7 +796,7 @@ describe('webpack5 (server, non-hydratable)', () => { await transform( ` // @refresh reload - import { render } from 'solid-js/web'; + import { render } from '@solidjs/web'; if (root) { render(() => , root); From 9fe9d53b4b860afbee63d5bdc5d228d287280267 Mon Sep 17 00:00:00 2001 From: Ryan Carniato Date: Fri, 27 Mar 2026 23:23:41 -0700 Subject: [PATCH 14/16] v0.8.0-next.6 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index db91c5d..21f5b46 100644 --- a/package.json +++ b/package.json @@ -4,7 +4,7 @@ "description": "Universal HMR for SolidJS", "author": "Ryan Carniato", "license": "MIT", - "version": "0.8.0-next.5", + "version": "0.8.0-next.6", "homepage": "https://github.com/solidjs/solid-refresh#readme", "repository": { "type": "git", From 6ef3c02a9154592e8055f7406da8fd52ad631060 Mon Sep 17 00:00:00 2001 From: Ryan Carniato Date: Thu, 16 Apr 2026 23:06:45 -0700 Subject: [PATCH 15/16] fix: update for Solid 2.0 beta.7 createMemo API change Remove initialValue argument from createMemo call and bump solid-js dependency to beta.7. Pin dev deps to exact beta.7 and tighten peer range to exclude experimental releases. Made-with: Cursor --- package.json | 6 +++--- pnpm-lock.yaml | 40 ++++++++++++++++++------------------- src/runtime/create-proxy.ts | 1 - 3 files changed, 23 insertions(+), 24 deletions(-) diff --git a/package.json b/package.json index 21f5b46..393752a 100644 --- a/package.json +++ b/package.json @@ -58,15 +58,15 @@ "@types/babel__core": "^7.20.5", "@types/babel__generator": "^7.27.0", "@types/node": "^25.3.0", - "babel-preset-solid": "^2.0.0-beta.0", + "babel-preset-solid": "2.0.0-beta.7", "rollup": "^4.59.0", - "solid-js": "^2.0.0-beta.0", + "solid-js": "2.0.0-beta.7", "tslib": "^2.6.2", "typescript": "^5.9.3", "vitest": "^4.0.18" }, "peerDependencies": { - "solid-js": ">=2.0.0-beta.0 <2.0.0" + "solid-js": ">=2.0.0-beta.7 <2.0.0-experimental.0" }, "dependencies": { "@babel/generator": "^7.29.1", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 6661d23..287d539 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -37,14 +37,14 @@ importers: specifier: ^25.3.0 version: 25.3.0 babel-preset-solid: - specifier: ^2.0.0-beta.0 - version: 2.0.0-beta.0(@babel/core@7.29.0)(solid-js@2.0.0-beta.0) + specifier: 2.0.0-beta.7 + version: 2.0.0-beta.7(@babel/core@7.29.0)(solid-js@2.0.0-beta.7) rollup: specifier: ^4.59.0 version: 4.59.0 solid-js: - specifier: ^2.0.0-beta.0 - version: 2.0.0-beta.0 + specifier: 2.0.0-beta.7 + version: 2.0.0-beta.7 tslib: specifier: ^2.6.2 version: 2.8.1 @@ -980,8 +980,8 @@ packages: cpu: [x64] os: [win32] - '@solidjs/signals@0.11.1': - resolution: {integrity: sha512-//nvM/Vjmp34utkMtf3l99+zuiT9gEF9709cGA5xHIsJgkKd4xhfU0getn8gujnypijddcS0VMTZrUhWsqoDfA==} + '@solidjs/signals@2.0.0-beta.7': + resolution: {integrity: sha512-SgK6oQlQZofz82LiEJ2RzT3sbs1lWTqFEtLoWjLsUo/dk1v9EoIFpJJlmvgkXvNugASWG+l1yOHa1a8lPamxug==} '@standard-schema/spec@1.1.0': resolution: {integrity: sha512-l2aFy5jALhniG5HgqrD6jXLi/rUWrKvqN/qJx6yoJsgKhblVd+iqqU4RCXavm/jPityDo5TCvKMnpjKnOriy0w==} @@ -1128,16 +1128,16 @@ packages: resolution: {integrity: sha512-Izi8RQcffqCeNVgFigKli1ssklIbpHnCYc6AknXGYoB6grJqyeby7jv12JUQgmTAnIDnbck1uxksT4dzN3PWBA==} engines: {node: '>=12'} - babel-plugin-jsx-dom-expressions@0.41.0-next.9: - resolution: {integrity: sha512-6EZcgFC8AM2lM2jSe7W/5fuREMC/PErTUD2O5YNuV267p8xaLFpoJPlM8PL0NY2Pu0a49gb3JbYvt5/yv2Z7Ww==} + babel-plugin-jsx-dom-expressions@0.41.0-next.20: + resolution: {integrity: sha512-lx/CJGRTNhVv3jpC1zIz0qS0H3OUxCRxQFrgCzdvxwInimGjIJ62GodD3Ls4z31BmDCY/HzJkCjP0qKFslpkgg==} peerDependencies: '@babel/core': ^7.20.12 - babel-preset-solid@2.0.0-beta.0: - resolution: {integrity: sha512-bPA3YnISn4cUyMjIPlC3QxbX5tqCKYBLK6zhChhiJ6wKmKt6yv8pB4FmwyxGf3tcb0eARhcIYnXpxZ+z58Bmww==} + babel-preset-solid@2.0.0-beta.7: + resolution: {integrity: sha512-+RVf63D5AO5Ed6nv1ceW4+QsRM6MDtYuAm4w53SefdS/+Po0XF7EW0UHnrcdhiJspU6yhbS1XoopdNK6hcGohA==} peerDependencies: '@babel/core': ^7.0.0 - solid-js: ^2.0.0-beta.0 + solid-js: ^2.0.0-beta.7 peerDependenciesMeta: solid-js: optional: true @@ -1509,8 +1509,8 @@ packages: siginfo@2.0.0: resolution: {integrity: sha512-ybx0WO1/8bSBLEWXZvEd7gMW3Sn3JFlW3TvX1nREbDLRNQNaeNN8WK0meBwPdAaOI7TtRRRJn/Es1zhrrCHu7g==} - solid-js@2.0.0-beta.0: - resolution: {integrity: sha512-SnOAA8QBC+TJ3dwN9xPRDYybCZJ6BSW6gPKnDRtJ0n0r96pg/KcbvSt/T/O6qaWI1pf+CMpYmdOxZfTQr2AhQg==} + solid-js@2.0.0-beta.7: + resolution: {integrity: sha512-7JHs+BhLeZXoU+u9dG+eKnyxxfZyGpOuJEBbN/1XbHKO/WhxecdplOAurlg/YDllNWPhsbXqmLR1H2paqSu62g==} source-map-js@1.2.1: resolution: {integrity: sha512-UXWMKhLOwVKb728IUtQPXxfYU+usdybtUrK/8uGE8CQMvrhOpwvzDBwj0QhSL7MQc7vIsISBG8VQ8+IDQxpfQA==} @@ -2705,7 +2705,7 @@ snapshots: '@rollup/rollup-win32-x64-msvc@4.59.0': optional: true - '@solidjs/signals@0.11.1': {} + '@solidjs/signals@2.0.0-beta.7': {} '@standard-schema/spec@1.1.0': {} @@ -2847,7 +2847,7 @@ snapshots: assertion-error@2.0.1: {} - babel-plugin-jsx-dom-expressions@0.41.0-next.9(@babel/core@7.29.0): + babel-plugin-jsx-dom-expressions@0.41.0-next.20(@babel/core@7.29.0): dependencies: '@babel/core': 7.29.0 '@babel/helper-module-imports': 7.18.6 @@ -2857,12 +2857,12 @@ snapshots: parse5: 7.3.0 validate-html-nesting: 1.2.4 - babel-preset-solid@2.0.0-beta.0(@babel/core@7.29.0)(solid-js@2.0.0-beta.0): + babel-preset-solid@2.0.0-beta.7(@babel/core@7.29.0)(solid-js@2.0.0-beta.7): dependencies: '@babel/core': 7.29.0 - babel-plugin-jsx-dom-expressions: 0.41.0-next.9(@babel/core@7.29.0) + babel-plugin-jsx-dom-expressions: 0.41.0-next.20(@babel/core@7.29.0) optionalDependencies: - solid-js: 2.0.0-beta.0 + solid-js: 2.0.0-beta.7 base-x@3.0.11: dependencies: @@ -3216,9 +3216,9 @@ snapshots: siginfo@2.0.0: {} - solid-js@2.0.0-beta.0: + solid-js@2.0.0-beta.7: dependencies: - '@solidjs/signals': 0.11.1 + '@solidjs/signals': 2.0.0-beta.7 csstype: 3.2.3 seroval: 1.5.0 seroval-plugins: 1.5.0(seroval@1.5.0) diff --git a/src/runtime/create-proxy.ts b/src/runtime/create-proxy.ts index 55869d1..0a5d626 100644 --- a/src/runtime/create-proxy.ts +++ b/src/runtime/create-proxy.ts @@ -46,7 +46,6 @@ export default function createProxy, P>( } return undefined; }, - undefined, { name: refreshName, transparent: true, From 366e362d07a768ac3d9e8e7316e907b4dde396a6 Mon Sep 17 00:00:00 2001 From: Ryan Carniato Date: Thu, 16 Apr 2026 23:09:50 -0700 Subject: [PATCH 16/16] v0.8.0-next.7 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 393752a..f6749b3 100644 --- a/package.json +++ b/package.json @@ -4,7 +4,7 @@ "description": "Universal HMR for SolidJS", "author": "Ryan Carniato", "license": "MIT", - "version": "0.8.0-next.6", + "version": "0.8.0-next.7", "homepage": "https://github.com/solidjs/solid-refresh#readme", "repository": { "type": "git",