mirror of
https://github.com/supabase/supabase.git
synced 2026-10-05 09:25:06 +03:00
chore(studio): switch to type: module and convert configs to ESM/TS (#44839)
Switch studio's package.json to `"type": "module"` so the package runs as native ESM. This aligns the runtime module system with what we actually write (`import`/`export`), improves tree-shaking, and reduces friction with ESM-only dependencies. **Changed:** - `next.config.js` → `next.config.ts` – ESM imports/exports, proper TS types, fixed type narrowing on redirect `has` and `basePath` fields - `csp.js` → `csp.ts` – `module.exports.getCSP` → named `export function` - `tailwind.config.js` → `tailwind.config.ts` – ESM imports - `postcss.config.js` – `module.exports` → `export default` (stays `.js` since PostCSS doesn't support TS configs) **Removed:** - Unused `path` import in next config - Deprecated Sentry `hideSourceMaps` option (default behavior in Sentry v10) **Added:** - Type declaration for `config/tailwind.config` CJS package ## To test - A general smoke test of studio should suffice <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Refactor** * Modernized the Studio package to ES module style and improved TypeScript typings and config declarations to reduce build/runtime issues. * Updated styling and post-processing configuration format for more consistent tooling behavior. * **Chores** * Updated code ownership entries to reflect migrated/renamed configuration files. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Co-authored-by: Alaister Young <10985857+alaister@users.noreply.github.com>
This commit is contained in:
1 parent
14e9f4ccef
commit
f8183479e7
12 files changed
+61
-52
No files matched your search
+1
-1
@@ -14,7 +14,7 @@
|
||||
|
||||
/docker/ @supabase/cli @supabase/self-hosted
|
||||
|
||||
/apps/studio/csp.js @supabase/security
|
||||
/apps/studio/csp.ts @supabase/security
|
||||
/apps/studio/components/interfaces/Billing/Payment @supabase/security
|
||||
/apps/studio/components/interfaces/Organization/Documents/ @supabase/security
|
||||
/apps/studio/pages/new/index.tsx @supabase/security
|
||||
|
||||
Reference in new issue
Block a user