mirror of
https://github.com/zoriya/v10.git
synced 2026-08-05 13:48:14 +00:00
- Migrate HTML and React demo applications from prototype to examples/ directory - Add examples to workspace configuration with selective build support - Update workspace scripts for library-only builds (build:libs) and example dev servers - Fix React MediaProvider context conflicts by consolidating exports - Add esbuild-css-modules-plugin for CSS modules support in React package - Configure tsup for flattened output structure with CSS processing - Update package exports and imports for new @vjs-10/* scoped packages 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
30 lines
695 B
TypeScript
30 lines
695 B
TypeScript
import { defineConfig } from 'tsup';
|
|
import cssPlugin from 'esbuild-css-modules-plugin';
|
|
|
|
export default defineConfig({
|
|
entry: {
|
|
index: 'src/index.tsx',
|
|
},
|
|
format: ['cjs', 'esm'],
|
|
clean: true,
|
|
sourcemap: true,
|
|
outDir: 'dist',
|
|
external: [
|
|
// Keep all dependencies external for library builds
|
|
/^@vjs-10\//,
|
|
/^[^.]/,
|
|
],
|
|
// Add esbuild plugin for CSS modules
|
|
esbuildPlugins: [cssPlugin()],
|
|
esbuildOptions(options, context) {
|
|
options.outbase = './src'; // Ensure 'src' is the base for output paths
|
|
},
|
|
// Generate TypeScript declarations with custom config
|
|
dts: {
|
|
compilerOptions: {
|
|
composite: false,
|
|
incremental: false,
|
|
},
|
|
},
|
|
});
|