@transitive-sdk/utils-caps 0.2.12 → 0.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/esbuild.js +6 -0
  2. package/package.json +1 -1
package/esbuild.js CHANGED
@@ -22,6 +22,11 @@ const entryPoints = fs.readdirSync('./web', {withFileTypes: true})
22
22
 
23
23
  const isDevelopment = (process.env.npm_lifecycle_event != 'prepare');
24
24
 
25
+ // Capability authors can set `config.esbuild.external` to a comma-separated list
26
+ // of npm packages to exclude from the bundle, to keep the size small. See
27
+ // https://esbuild.github.io/api/#external for details.
28
+ const external = (process.env.npm_package_config_esbuild_external || '').split(',');
29
+
25
30
  const config = {
26
31
  entryPoints,
27
32
  metafile: true, // for bundle analyser
@@ -34,6 +39,7 @@ const config = {
34
39
  format: 'iife', // will be overwritten, see `formats` below
35
40
  // splitting: true,
36
41
  // external: ['react', 'react-dom'],
42
+ external,
37
43
  define: {
38
44
  TR_PKG_VERSION: JSON.stringify(process.env.npm_package_version),
39
45
  TR_PKG_NAME: JSON.stringify(process.env.npm_package_name),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@transitive-sdk/utils-caps",
3
- "version": "0.2.12",
3
+ "version": "0.3.0",
4
4
  "description": "Utilities to build and run Transitive capabilities in dev",
5
5
  "homepage": "https://transitiverobotics.com",
6
6
  "repository": {