chore: rename `custom_renderer_imports`

svelte-custom-renderer-single-type-argument
paoloricciuti 4 months ago
parent 039c0284d8
commit 5c60dff588

@ -141,7 +141,7 @@ const visitors = {
/**
* @param {string | undefined} custom_renderer_module
*/
function custom_renderer_imports(custom_renderer_module) {
function get_imports(custom_renderer_module) {
const imports = [b.import_all('$', 'svelte/internal/client')];
if (custom_renderer_module) {
imports.push(b.imports([['$renderer', '$renderer', true]], custom_renderer_module));
@ -162,10 +162,7 @@ export function client_component(analysis, options) {
scope: analysis.module.scope,
scopes: analysis.module.scopes,
is_instance: false,
hoisted: [
...custom_renderer_imports(analysis.custom_renderer),
...analysis.instance_body.hoisted
],
hoisted: [...get_imports(analysis.custom_renderer), ...analysis.instance_body.hoisted],
node: /** @type {any} */ (null), // populated by the root node
legacy_reactive_imports: [],
legacy_reactive_statements: new Map(),

Loading…
Cancel
Save