Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🚑 Fix ts paths in build #9

Merged
merged 1 commit into from
Jul 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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"]
}
}