Skip to content

Commit

Permalink
chore(docker-setup): dockerize the project (#13) (#11)
Browse files Browse the repository at this point in the history
- update vite config
- set up docker

[Finishes #10]

Co-authored-by: Joslyn Manzi Karenzi <[email protected]>
  • Loading branch information
Dawaic6 and jkarenzi authored Jun 7, 2024
1 parent e6e16f6 commit 1d4ea43
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/main.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React from 'react';
import ReactDOM from 'react-dom/client';
import App from './App.tsx';
import './index.css';
import App from '@/App.tsx';
import '@/index.css';

ReactDOM.createRoot(document.getElementById('root')!).render(
<React.StrictMode>
Expand Down
5 changes: 5 additions & 0 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,11 @@
"module": "ESNext",
"skipLibCheck": true,

/*Configure TypeScript Paths*/
"paths": {
"@/*": ["./src/*"],
},

/* Bundler mode */
"moduleResolution": "bundler",
"allowImportingTsExtensions": true,
Expand Down
13 changes: 12 additions & 1 deletion vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,9 @@

import { defineConfig } from 'vite';
import react from '@vitejs/plugin-react';
import path from 'path';

// https://vitejs.dev/config/
// vite.config.ts
export default defineConfig({
plugins: [react()],
server: {
Expand All @@ -17,4 +18,14 @@ export default defineConfig({
environment: 'jsdom',
setupFiles: ['./src/__test__/setupTests.ts'],
},
resolve: {
alias: {
'@': path.resolve(__dirname, './src'),
},
},
build: {
rollupOptions: {
external: ['src/App.tsx'],
},
},
});

0 comments on commit 1d4ea43

Please sign in to comment.