Skip to content

Commit

Permalink
🚑 Fix ts paths in build
Browse files Browse the repository at this point in the history
  • Loading branch information
mariush2 committed Jul 15, 2024
1 parent 3c9d67b commit 1d014b3
Show file tree
Hide file tree
Showing 5 changed files with 54 additions and 12 deletions.
40 changes: 38 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 5 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{
"name": "@equinor/subsurface-app-management",
"version": "1.0.1",
"version": "1.0.2",
"description": "React Typescript components/hooks to communicate with equinor/sam",
"main": "dist/esm/index.js",
"types": "dist/types/index.d.ts",
"main": "dist/index.js",
"types": "dist/index.d.ts",
"author": "Amplify Team",
"license": "ISC",
"homepage": "https://github.com/equinor/subsurface-app-management#readme",
Expand All @@ -27,7 +27,7 @@
"test:coverage": "vitest run --coverage",
"setup-husky": "husky install",
"precommit": "npx lint-staged",
"build": "rollup -c && tsc --outDir dist --declarationDir dist/types --declaration true --emitDeclarationOnly --project tsconfig.build.json",
"build": "rollup -c && tsc --project tsconfig.build.json && resolve-tspaths --project tsconfig.build.json",
"build:ci": "rm -rf lib dist && npm run build-components",
"build-and-use": "node tooling/build-and-use.mjs",
"brute-coverage": "node tooling/brute-coverage.mjs"
Expand Down Expand Up @@ -98,6 +98,7 @@
"react-dom": "^18.2.0",
"react-router": "^6.22.3",
"react-router-dom": "^6.22.3",
"resolve-tspaths": "^0.8.19",
"rollup": "^4.11.0",
"rollup-plugin-delete": "^2.0.0",
"rollup-plugin-import-css": "^3.4.0",
Expand Down
3 changes: 1 addition & 2 deletions rollup.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,10 @@ export default [
],
output: [
{
dir: 'dist/esm',
dir: 'dist',
preserveModules: true,
preserveModulesRoot: 'src',
format: 'es',
sourcemap: false,
},
],
},
Expand Down
5 changes: 3 additions & 2 deletions tsconfig.build.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"exclude": [
"src/**/*.stories.ts*",
"src/**/*.test.ts*",
"vite.config.ts"
"vite.config.ts",
"src/storybook"
]
}
}
9 changes: 7 additions & 2 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,13 @@
"forceConsistentCasingInFileNames": true,
"noFallthroughCasesInSwitch": true,
"jsx": "react-jsx",
"sourceMap": true
"outDir": "dist",
"declaration": true,
"emitDeclarationOnly": true,
"paths": {
"src/*": ["./src/*"]
}
},
"include": ["src/**/*", "vite.config.ts"],
"exclude": ["node_modules"]
}
}

0 comments on commit 1d014b3

Please sign in to comment.