-
In our build script, we set
--external none
, which tells Microbundle to bundle all dependencies into your final output. This is useful if you want to distribute this widget as a single, standalone file, but is sub-optimal if any of your users may already be using some of the same dependencies. Just something to think about. -
As mentioned, CJS is no good for the browser. Because your example contained
<script type="module"
(which is exclusive to ESM), I went ahead and used the Modern output (which is ESM) in the demo. Alternatively, you could use the UMD output by strippingtype="module"
from the script tag andreplacingdemo/demo-widget.js
withdist/demo-widget.umd.js
. Either option will work just fine.
-
Notifications
You must be signed in to change notification settings - Fork 0
rschristian/demo__microbundle-preact-widget
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
About
For microbundle#1078
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published