Skip to content

Commit 05ebc71

Browse files
committed
Explain the scalajs:main.js import.
1 parent a7f2526 commit 05ebc71

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

doc/tutorial/scalajs-vite.md

+2
Original file line numberDiff line numberDiff line change
@@ -270,6 +270,8 @@ import './style.css'
270270
import 'scalajs:main.js'
271271
{% endhighlight %}
272272

273+
When we `import` a URI starting with `scalajs:`, `vite-plugin-scalajs` resolves it to point to the output directory of Scala.js' `fastLinkJS` task.
274+
273275
You may have to stop and restart the `npm run dev` process, so that Vite picks up the newly created configuration file.
274276
Vite will refresh the browser with our updated "Hello Scala.js!" message.
275277

0 commit comments

Comments
 (0)