-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: remove @babel/plugin-proposal-object-rest-spread (#31)
* fix: remove `@babel/plugin-proposal-object-rest-spread` * feat: support custom babel plugins (`@alpha`) * test: update playground Co-authored-by: Marius Lundgård <studio@mariuslundgard.com>
- Loading branch information
1 parent
4966ef5
commit 44b8aad
Showing
10 changed files
with
102 additions
and
40 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
import {defineConfig} from '@sanity/pkg-utils' | ||
|
||
export default defineConfig({ | ||
babel: { | ||
plugins: ['@babel/plugin-proposal-object-rest-spread'], | ||
}, | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
{ | ||
"private": true, | ||
"type": "module", | ||
"name": "babel-plugin", | ||
"version": "0.0.0-development", | ||
"license": "MIT", | ||
"types": "./dist/index.d.ts", | ||
"source": "./src/index.ts", | ||
"module": "./dist/index.js", | ||
"main": "./dist/index.cjs", | ||
"exports": { | ||
".": { | ||
"types": "./dist/index.d.ts", | ||
"source": "./src/index.ts", | ||
"import": "./dist/index.js", | ||
"require": "./dist/index.cjs", | ||
"default": "./dist/index.js" | ||
}, | ||
"./package.json": "./package.json" | ||
}, | ||
"scripts": { | ||
"build": "run-s clean && pkg build --strict --tsconfig tsconfig.dist.json && pkg --strict --tsconfig tsconfig.dist.json", | ||
"clean": "rimraf dist" | ||
}, | ||
"devDependencies": { | ||
"@babel/core": "^7.20.7", | ||
"@babel/plugin-proposal-object-rest-spread": "^7.20.7" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
/** @public */ | ||
export function defineThing(options: {name: string; age: number}) { | ||
const {name, ...restOptions} = options | ||
|
||
return {name, rest: restOptions} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
{ | ||
"extends": "./tsconfig.settings", | ||
"include": ["./src"], | ||
"compilerOptions": { | ||
"rootDir": ".", | ||
"outDir": "./dist", | ||
"emitDeclarationOnly": true | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{ | ||
"extends": "./tsconfig.settings", | ||
"include": ["./package.config.ts", "./src"], | ||
"compilerOptions": { | ||
"rootDir": ".", | ||
"noEmit": true | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
{ | ||
"compilerOptions": { | ||
"target": "ES2020", | ||
"declaration": true, | ||
"declarationMap": true, | ||
"sourceMap": true, | ||
|
||
// Strict type-checking | ||
"strict": true, | ||
"noImplicitAny": true, | ||
"strictNullChecks": true, | ||
"strictFunctionTypes": true, | ||
"strictPropertyInitialization": true, | ||
"noImplicitThis": true, | ||
"alwaysStrict": true, | ||
|
||
// Additional checks | ||
"noUnusedLocals": true, | ||
"noUnusedParameters": true, | ||
"noImplicitReturns": true, | ||
"noFallthroughCasesInSwitch": true, | ||
"skipLibCheck": true, | ||
|
||
// Module resolution | ||
"moduleResolution": "node", | ||
"allowSyntheticDefaultImports": true, | ||
"esModuleInterop": true | ||
} | ||
} |
Oops, something went wrong.