Skip to content

Commit

Permalink
Fix imports with absolute paths
Browse files Browse the repository at this point in the history
  • Loading branch information
Rami Ouanes committed Nov 9, 2024
1 parent fd45578 commit e41c431
Show file tree
Hide file tree
Showing 6 changed files with 25 additions and 26 deletions.
20 changes: 8 additions & 12 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,21 +28,17 @@ jobs:
- name: Debug file structure
run: |
echo "Current directory structure:"
tree
echo "\nContents of src directory:"
ls -la src/
echo "\nContents of src/components directory:"
ls -la src/components/
ls -R
echo "\nContents of src/components/Pillar.jsx:"
cat src/components/Pillar.jsx || echo "File not found"
echo "\nContents of src/components/index.js:"
cat src/components/index.js || echo "File not found"
- name: Install dependencies
run: |
npm install
npm install -g vite
run: npm install

- name: Build
run: |
export NODE_OPTIONS="--max_old_space_size=4096"
vite build
run: npm run build
env:
CI: false

Expand Down
9 changes: 9 additions & 0 deletions jsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"compilerOptions": {
"baseUrl": ".",
"paths": {
"@components/*": ["src/components/*"],
"@components": ["src/components"]
}
}
}
3 changes: 3 additions & 0 deletions package-lock.json

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

2 changes: 1 addition & 1 deletion src/app.jsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React from 'react';
import { Building, Laptop, Users, Shield, Activity, Clock, MapPin, DollarSign, Calendar } from 'lucide-react';
import { PresentationSection, Pillar, ProcessStep, PricingTier } from './components';
import { PresentationSection, Pillar, ProcessStep, PricingTier } from '@components';


export default function App() {
Expand Down
6 changes: 3 additions & 3 deletions src/components/index.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
export { default as PresentationSection } from './PresentationSection.jsx';
export { default as Pillar } from 'src/components/Pillar.jsx';
export { default as ProcessStep } from 'src/components/ProcessStep.jsx';
export { default as PricingTier } from 'src/components/PricingTier.jsx';
export { default as Pillar } from './Pillar.jsx';
export { default as ProcessStep } from './ProcessStep.jsx';
export { default as PricingTier } from './PricingTier.jsx';
11 changes: 1 addition & 10 deletions vite.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,8 @@ export default defineConfig({
plugins: [react()],
base: '/hiplando-presentation/',
resolve: {
extensions: ['.js', '.jsx', '.json'],
alias: {
'@': path.resolve(__dirname, './src')
}
},
build: {
rollupOptions: {
external: [],
output: {
manualChunks: undefined
}
'@components': path.resolve(__dirname, './src/components')
}
}
})

0 comments on commit e41c431

Please sign in to comment.