You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For working with blocks we handle all the asset registration though the block.json file and it's script,viewScript, viewScriptModule, editorScript, and scriptModule keys.
These keys support relative file: imports which then get registered as webpack entrypoints.
The problem is that the block.json file just gets copied into the dist directory without getting transformed. So if the import is a .ts file that gets transpiled by webpack into a .js file the import would fail.
We should add a string transform for .ts/tsx to .js
The text was updated successfully, but these errors were encountered:
For working with blocks we handle all the asset registration though the
block.json
file and it'sscript
,viewScript
,viewScriptModule
,editorScript
, andscriptModule
keys.These keys support relative
file:
imports which then get registered as webpack entrypoints.The problem is that the
block.json
file just gets copied into the dist directory without getting transformed. So if the import is a.ts
file that gets transpiled by webpack into a.js
file the import would fail.We should add a string transform for
.ts/tsx
to.js
The text was updated successfully, but these errors were encountered: