diff --git a/package-lock.json b/package-lock.json index f360e6c..c4b74db 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@equinor/subsurface-app-management", - "version": "1.0.1", + "version": "1.0.2", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@equinor/subsurface-app-management", - "version": "1.0.1", + "version": "1.0.2", "license": "ISC", "dependencies": { "@azure/msal-browser": "3.10.0", @@ -62,6 +62,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", @@ -10403,6 +10404,15 @@ "url": "https://github.com/sponsors/epoberezkin" } }, + "node_modules/ansi-colors": { + "version": "4.1.3", + "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.3.tgz", + "integrity": "sha512-/6w/C21Pm1A7aZitlI5Ni/2J6FFQN8i1Cvz3kHABAAbw93v/NlvKdVOqz7CCWz/3iv/JplRSEEZ83XION15ovw==", + "dev": true, + "engines": { + "node": ">=6" + } + }, "node_modules/ansi-escapes": { "version": "6.2.1", "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-6.2.1.tgz", @@ -23183,6 +23193,32 @@ "node": ">=8" } }, + "node_modules/resolve-tspaths": { + "version": "0.8.19", + "resolved": "https://registry.npmjs.org/resolve-tspaths/-/resolve-tspaths-0.8.19.tgz", + "integrity": "sha512-yZkXNYyHdVytOkJLhbib7TFpaMVElk9auO9R1jDmOSXPUWEjy+V44VqX77RIQ+kf0UJIlAGRDK/yrbfwlu1UWg==", + "dev": true, + "dependencies": { + "ansi-colors": "4.1.3", + "commander": "12.0.0", + "fast-glob": "3.3.2" + }, + "bin": { + "resolve-tspaths": "dist/main.js" + }, + "peerDependencies": { + "typescript": ">=3.0.3" + } + }, + "node_modules/resolve-tspaths/node_modules/commander": { + "version": "12.0.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-12.0.0.tgz", + "integrity": "sha512-MwVNWlYjDTtOjX5PiD7o5pK0UrFU/OYgcJfjjK4RaHZETNtjJqrZa9Y9ds88+A+f+d5lv+561eZ+yCKoS3gbAA==", + "dev": true, + "engines": { + "node": ">=18" + } + }, "node_modules/restore-cursor": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-4.0.0.tgz", diff --git a/package.json b/package.json index 0d9814f..f5c3494 100644 --- a/package.json +++ b/package.json @@ -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", @@ -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" @@ -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", diff --git a/rollup.config.mjs b/rollup.config.mjs index 0e62486..2cb72a8 100644 --- a/rollup.config.mjs +++ b/rollup.config.mjs @@ -31,11 +31,10 @@ export default [ ], output: [ { - dir: 'dist/esm', + dir: 'dist', preserveModules: true, preserveModulesRoot: 'src', format: 'es', - sourcemap: false, }, ], }, diff --git a/tsconfig.build.json b/tsconfig.build.json index d114f75..c035059 100644 --- a/tsconfig.build.json +++ b/tsconfig.build.json @@ -3,6 +3,7 @@ "exclude": [ "src/**/*.stories.ts*", "src/**/*.test.ts*", - "vite.config.ts" + "vite.config.ts", + "src/storybook" ] -} +} \ No newline at end of file diff --git a/tsconfig.json b/tsconfig.json index b32196c..3e2bded 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -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"] -} +} \ No newline at end of file