How It Works
skip-the-build does not rewrite files or change module resolution rules. It relies on the
existing conditional exports system in Node and on the condition support exposed by bundlers.
At a high level
- You add an export condition such as
local-devto your packageexports. skip-the-builddecides whether that condition should be enabled.- An adapter (Vite, Webpack, Astro, etc) applies the export conditions to your build tool.
What the core package does
The core package evaluates your config and returns a list of export conditions:
evaluateConfig()returnstruewhen a skip is allowed.getExportConditions()returns your configured condition name(s) when a skip is allowed.- If a skip is not allowed,
getExportConditions()returns an empty list.
Adapters consume those conditions and apply them using standard configuration fields:
- Vite:
resolve.conditions(andssr.resolve.conditions). - Webpack:
resolve.conditionNames. - Astro: uses Vite under the hood and applies the Vite config.
No build outputs are modified. Your packages can still be built and published normally.