"use strict";(self.webpackChunknocobase=self.webpackChunknocobase||[]).push([[908],{30908:function(o,n,e){e.r(n);var t={contexts:["*"],prefix:"sn-import",label:"Import ESM module",description:"Dynamically import an ESM module by URL",locales:{"zh-CN":{label:"\u5BFC\u5165 ESM \u6A21\u5757",description:"\u6309 URL \u52A8\u6001\u5BFC\u5165 ESM \u6A21\u5757"}},content:`
// Import an ESM module by URL
// Works in yarn dev and yarn start
const mod = await ctx.importAsync('lit-html@2');
const { html, render } = mod;

const container = document.createElement('div');
container.style.padding = '8px';
container.style.border = '1px dashed #999';
ctx.render(container);

render(html\`<span style="color:#52c41a;">lit-html loaded and rendered</span>\`, container);
`};n.default=t}}]);
