starbeamjs / starbeam

Fun and simple reactivity
Other
343 stars 16 forks source link

Fix the build, dev dependencies are included in production assets, module cycles, side-effects, etc #153

Closed NullVoxPopuli closed 6 months ago

NullVoxPopuli commented 9 months ago

namely, stacktracey, and other dev-only dependencies. also, packages like @starbeam/core-utils are left as side-effecting imports, example:

// packages/universal/reactive/dist/index.development.js
import { TAG } from '@starbeam/shared';
import { NOW, lastUpdated, createFormulaTag, zero, createCellTag, initializeFormulaTag } from '@starbeam/tags';
import { verified, isPresent } from '@starbeam/verify';
import '@starbeam/core-utils'; // <---- here

this happens when rollup can't resolve a module cycle

// packages/universa/debug/dist/index.production.js
import{DEBUG as t,UNKNOWN_REACTIVE_VALUE as r}from"@starbeam/reactive";
import{getLastIndex as o,isPresent as n}from"@starbeam/core-utils";
import"@starbeam/verify";
import"stacktracey";
import"@starbeam/shared";
import{getDependencies as e,getTag as i,lastUpdated as a}from"@starbeam/tags";
// ...