Skip to content

Commit

Permalink
Change alias to src.
Browse files Browse the repository at this point in the history
  • Loading branch information
programmiri committed Oct 26, 2022
1 parent 98221f8 commit 664d759
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 9 deletions.
4 changes: 2 additions & 2 deletions coral/jest.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ export default {
moduleFileExtensions: ["js", "jsx", "ts", "tsx"],
preset: "ts-jest",
testEnvironment: "jsdom",
setupFilesAfterEnv: ['<rootDir>/test-setup/setup-files-after-env.ts'],
setupFilesAfterEnv: ["<rootDir>/test-setup/setup-files-after-env.ts"],
moduleNameMapper: {
".+\\.(png|jpg|ttf|woff|woff2|svg)$": "jest-transform-stub",
"\\.css$": "identity-obj-proxy",
"^@/(.*)$": "<rootDir>/src/$1",
"^src/(.*)$": "<rootDir>/src/$1",
},
};
3 changes: 0 additions & 3 deletions coral/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
{
"compilerOptions": {
"baseUrl": ".",
"paths": {
"@/*": ["src/*"]
},
"target": "ESNext",
"useDefineForClassFields": true,
"lib": ["DOM", "DOM.Iterable", "ESNext"],
Expand Down
5 changes: 1 addition & 4 deletions coral/vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,7 @@ import { defineConfig } from "vite";
import react from "@vitejs/plugin-react";
import { resolve } from "path";

const rootPath = resolve(__dirname);
// https://vitejs.dev/config/

// console.log("rootPath", rootPath);
export default defineConfig({
plugins: [react()],
define: {
Expand All @@ -22,7 +19,7 @@ export default defineConfig({
},
resolve: {
alias: {
"@": resolve(rootPath, "./src"),
src: resolve(resolve(__dirname), "./src"),
},
},
});

0 comments on commit 664d759

Please sign in to comment.