Skip to content

Build files

Every file in the package's dist folder, and when to load it.

Which file to use

  • With a bundler, import signy or one of its entry points. The bundler picks the files.
  • With a script tag, load signy.global.js while you develop and signy.global.prod.js in production.
  • For browsers without ES2022, use the es2017 or es5 file of the same build.

Script tag builds

Each one defines a global on window. The dev build logs warnings. The .prod.js build is minified and leaves the dev checks out.

Dev buildProduction buildGlobalContents
signy.global.jssigny.global.prod.jsSignyEverything, router and store included
signy.global.es2017.jssigny.global.es2017.prod.jsSignyEverything, as ES2017
signy.global.es5.jssigny.global.es5.prod.jsSignyEverything, as ES5
signy.web.global.jssigny.web.global.prod.jsSignyLike signy/web, no router and no application()
signy.core.global.jssigny.core.global.prod.jsSignyLike signy/core, no DOM
signy.store.global.jssigny.store.global.prod.jsSignyStoreLike signy/store, load it after one of the builds above

Load one of the Signy builds per page. They each carry the runtime, and two copies do not share signals. For the router, load signy.global.js.

The store build

signy.store.global.js has no runtime of its own. It uses the one on Signy, so a store write reaches the effects of the page. Load it after the core, web or full build. Loaded first, it throws an error that names the build it needs.

<script src="https://cdn.jsdelivr.net/npm/signy@1/dist/signy.core.global.prod.js"></script>
<script src="https://cdn.jsdelivr.net/npm/signy@1/dist/signy.store.global.prod.js"></script>
<script>
  const { effect } = Signy;
  const { store } = SignyStore;
</script>

ES module builds

These import htm by its package name, so they need a bundler, or an import map that maps htm.

FileDev checksContents
signy.js, chunk-*.js and the core, web, app, router, store and jsx foldersOff when process.env.NODE_ENV is 'production'The npm entry points, with TypeScript types. They share chunks, so every entry point uses one runtime.
signy.min.jsOffEverything in one minified file
signy.es2017.jsOnEverything, as ES2017
signy.es2017.min.jsOffEverything, as ES2017, minified
signy.es5.jsOnEverything, as ES5 code inside import and export
signy.es5.min.jsOffEverything, as ES5, minified

Every file except the ES5 ones has a .map source map next to it.