@noya-app/noya-designsystem 0.1.80 → 0.1.81

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@noya-app/noya-designsystem",
3
- "version": "0.1.80",
3
+ "version": "0.1.81",
4
4
  "main": "./dist/index.js",
5
5
  "module": "./dist/index.mjs",
6
6
  "types": "./dist/index.d.ts",
package/tsup.config.ts CHANGED
@@ -12,6 +12,14 @@ export default defineConfig({
12
12
  sourcemap: true,
13
13
  // Bundle base-ui to avoid commonjs "react" import errors in vite projects
14
14
  noExternal: ["@base-ui/react", "@base-ui/utils", "use-sync-external-store"],
15
+ // Shim require("react") for CJS code running in ESM/browser context
16
+ esbuildOptions(options, context) {
17
+ if (context.format === "esm") {
18
+ options.banner = {
19
+ js: `import * as __noya_react__ from "react";const require=(m)=>{if(m==="react")return __noya_react__;throw new Error("Dynamic require not supported: "+m)};`,
20
+ };
21
+ }
22
+ },
15
23
  async onSuccess() {
16
24
  // Build Tailwind CSS after successful tsup build
17
25
  try {