Skip to content

Commit

Permalink
fix build
Browse files Browse the repository at this point in the history
  • Loading branch information
Fridus committed Mar 6, 2024
1 parent e763de4 commit c5b6c77
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 15 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
node: ['16.x', '18.x', '20.x']
node: ['18.x', '20.x']
os: [ubuntu-latest, windows-latest, macOS-latest]

steps:
Expand Down
14 changes: 3 additions & 11 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@
"dist"
],
"engines": {
"node": ">=16"
"node": ">=18"
},
"scripts": {
"start": "tsup --watch",
"build": "tsup && tsc --noEmit false --emitDeclarationOnly --declaration --outFile dist/index.d.ts",
"start": "tsup-node src --watch",
"build": "tsup-node",
"lint": "eslint --ext .ts,.tsx src",
"test": "tsc --noEmit",
"prepare": "yarn build"
Expand Down Expand Up @@ -57,14 +57,6 @@
"react": "^18.2.0",
"react-dom": "^18.2.0"
},
"tsup": {
"entry": [
"src/index.ts"
],
"splitting": false,
"sourcemap": false,
"clean": true
},
"resolutions": {
"strip-ansi": "6.0.1"
}
Expand Down
2 changes: 1 addition & 1 deletion src/BlocksInput.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ import { useForm, FormProvider } from "react-hook-form";
import { Panel, PanelGroup, PanelResizeHandle } from "react-resizable-panels";
import { nanoid } from "nanoid";
import styles from "./BlocksInput.module.css";
import { entries } from "lodash/";
import { entries } from "lodash";

export type DefaultContext = {
id: string;
Expand Down
4 changes: 2 additions & 2 deletions tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
// see https://www.typescriptlang.org/tsconfig to better understand tsconfigs
"include": ["../src", "types"],
"include": ["src", "types"],
"exclude": ["node_modules"],
"compilerOptions": {
"module": "esnext",
Expand All @@ -11,7 +11,7 @@
// output .js.map sourcemap files for consumers
"sourceMap": true,
// match output dir to input dir. e.g. dist/index instead of dist/src/index
"rootDir": "../src",
"rootDir": "src",
// stricter type-checking for stronger correctness. Recommended by TS
"strict": true,
// linter checks for common issues
Expand Down
13 changes: 13 additions & 0 deletions tsup.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import { defineConfig } from "tsup";

export default defineConfig({
entry: ["src/index.ts"],
treeshake: true,
sourcemap: false,
minify: true,
clean: true,
dts: true,
splitting: false,
format: ["cjs", "esm"],
injectStyle: false,
});

0 comments on commit c5b6c77

Please sign in to comment.