mirror of
https://github.com/OneUptime/oneuptime.git
synced 2026-01-11 19:56:44 +00:00
refactor: remove webpack dependencies and update documentation for migration to esbuild
This commit is contained in:
parent
f5e6b04070
commit
1392aba0dc
8 changed files with 11 additions and 71 deletions
|
|
@ -69,12 +69,12 @@ RUN npm install
|
|||
# - 3003: accounts
|
||||
EXPOSE 3003
|
||||
|
||||
RUN npm i -D webpack-cli
|
||||
|
||||
|
||||
{{ if eq .Env.ENVIRONMENT "development" }}
|
||||
RUN mkdir /usr/src/app/dev-env
|
||||
RUN touch /usr/src/app/dev-env/.env
|
||||
RUN npm i -D webpack-dev-server
|
||||
|
||||
|
||||
#Run the app
|
||||
CMD [ "npm", "run", "dev" ]
|
||||
|
|
|
|||
|
|
@ -35,7 +35,7 @@ See the section about [deployment](https://facebook.github.io/create-react-app/d
|
|||
|
||||
If you aren’t satisfied with the build tool and configuration choices, you can `eject` at any time. This command will remove the single build dependency from your project.
|
||||
|
||||
Instead, it will copy all the configuration files and the transitive dependencies (webpack, Babel, ESLint, etc) right into your project so you have full control over them. All of the commands except `eject` will still work, but they will point to the copied scripts so you can tweak them. At this point you’re on your own.
|
||||
Instead, it will copy all the configuration files and the transitive dependencies ( Babel, ESLint, etc) right into your project so you have full control over them. All of the commands except `eject` will still work, but they will point to the copied scripts so you can tweak them. At this point you’re on your own.
|
||||
|
||||
You don’t have to ever use `eject`. The curated feature set is suitable for small and middle deployments, and you shouldn’t feel obligated to use this feature. However we understand that this tool wouldn’t be useful if you couldn’t customize it when you are ready for it.
|
||||
|
||||
|
|
|
|||
|
|
@ -67,13 +67,13 @@ RUN npm install
|
|||
# - 3158: AdminDashboard
|
||||
EXPOSE 3158
|
||||
|
||||
RUN npm i -D webpack-cli
|
||||
|
||||
|
||||
{{ if eq .Env.ENVIRONMENT "development" }}
|
||||
#Run the app
|
||||
RUN mkdir /usr/src/app/dev-env
|
||||
RUN touch /usr/src/app/dev-env/.env
|
||||
RUN npm i -D webpack-dev-server
|
||||
|
||||
CMD [ "npm", "run", "dev" ]
|
||||
{{ else }}
|
||||
# Copy app source
|
||||
|
|
|
|||
|
|
@ -35,7 +35,7 @@ See the section about [deployment](https://facebook.github.io/create-react-app/d
|
|||
|
||||
If you aren’t satisfied with the build tool and configuration choices, you can `eject` at any time. This command will remove the single build dependency from your project.
|
||||
|
||||
Instead, it will copy all the configuration files and the transitive dependencies (webpack, Babel, ESLint, etc) right into your project so you have full control over them. All of the commands except `eject` will still work, but they will point to the copied scripts so you can tweak them. At this point you’re on your own.
|
||||
Instead, it will copy all the configuration files and the transitive dependencies ( Babel, ESLint, etc) right into your project so you have full control over them. All of the commands except `eject` will still work, but they will point to the copied scripts so you can tweak them. At this point you’re on your own.
|
||||
|
||||
You don’t have to ever use `eject`. The curated feature set is suitable for small and middle deployments, and you shouldn’t feel obligated to use this feature. However we understand that this tool wouldn’t be useful if you couldn’t customize it when you are ready for it.
|
||||
|
||||
|
|
|
|||
|
|
@ -61,13 +61,13 @@ RUN npm install
|
|||
# - 3009: Dashboard
|
||||
EXPOSE 3009
|
||||
|
||||
RUN npm i -D webpack-cli
|
||||
|
||||
|
||||
{{ if eq .Env.ENVIRONMENT "development" }}
|
||||
#Run the app
|
||||
RUN mkdir /usr/src/app/dev-env
|
||||
RUN touch /usr/src/app/dev-env/.env
|
||||
RUN npm i -D webpack-dev-server
|
||||
|
||||
CMD [ "npm", "run", "dev" ]
|
||||
{{ else }}
|
||||
# Copy app source
|
||||
|
|
|
|||
|
|
@ -35,7 +35,7 @@ See the section about [deployment](https://facebook.github.io/create-react-app/d
|
|||
|
||||
If you aren’t satisfied with the build tool and configuration choices, you can `eject` at any time. This command will remove the single build dependency from your project.
|
||||
|
||||
Instead, it will copy all the configuration files and the transitive dependencies (webpack, Babel, ESLint, etc) right into your project so you have full control over them. All of the commands except `eject` will still work, but they will point to the copied scripts so you can tweak them. At this point you’re on your own.
|
||||
Instead, it will copy all the configuration files and the transitive dependencies ( Babel, ESLint, etc) right into your project so you have full control over them. All of the commands except `eject` will still work, but they will point to the copied scripts so you can tweak them. At this point you’re on your own.
|
||||
|
||||
You don’t have to ever use `eject`. The curated feature set is suitable for small and middle deployments, and you shouldn’t feel obligated to use this feature. However we understand that this tool wouldn’t be useful if you couldn’t customize it when you are ready for it.
|
||||
|
||||
|
|
|
|||
|
|
@ -1,60 +0,0 @@
|
|||
#!/bin/bash
|
||||
|
||||
# Webpack to ESBuild Migration Cleanup Script
|
||||
# This script removes webpack dependencies and configurations
|
||||
|
||||
echo "🧹 Starting webpack to esbuild migration cleanup..."
|
||||
|
||||
# Services to clean up
|
||||
SERVICES=("Dashboard" "Accounts" "AdminDashboard" "StatusPage")
|
||||
|
||||
for service in "${SERVICES[@]}"; do
|
||||
echo "📦 Cleaning up $service..."
|
||||
|
||||
if [ -d "./$service" ]; then
|
||||
cd "./$service"
|
||||
|
||||
# Remove webpack configuration file
|
||||
if [ -f "webpack.config.js" ]; then
|
||||
echo " 🗑️ Removing webpack.config.js"
|
||||
rm webpack.config.js
|
||||
fi
|
||||
|
||||
# Remove webpack-related dependencies
|
||||
echo " 📦 Removing webpack dependencies..."
|
||||
npm uninstall \
|
||||
webpack \
|
||||
webpack-bundle-analyzer \
|
||||
ts-loader \
|
||||
css-loader \
|
||||
style-loader \
|
||||
sass-loader \
|
||||
file-loader \
|
||||
cross-env \
|
||||
react-app-rewired 2>/dev/null || true
|
||||
|
||||
# Clean up any webpack-related build artifacts
|
||||
if [ -d "dist" ]; then
|
||||
echo " 🗑️ Cleaning old dist directory"
|
||||
rm -rf dist
|
||||
fi
|
||||
|
||||
cd ..
|
||||
else
|
||||
echo " ⚠️ Directory $service not found, skipping..."
|
||||
fi
|
||||
done
|
||||
|
||||
echo "✅ Webpack to esbuild migration cleanup completed!"
|
||||
echo ""
|
||||
echo "📝 Summary of changes:"
|
||||
echo " • Removed webpack.config.js files"
|
||||
echo " • Uninstalled webpack and related dependencies"
|
||||
echo " • Created esbuild.config.js configurations"
|
||||
echo " • Updated package.json build scripts"
|
||||
echo ""
|
||||
echo "🚀 You can now use the following commands:"
|
||||
echo " • npm run dev-build - Development build"
|
||||
echo " • npm run build - Production build"
|
||||
echo " • npm run build:watch - Development build with watch mode"
|
||||
echo " • npm run analyze - Production build with bundle analysis"
|
||||
|
|
@ -68,12 +68,12 @@ EXPOSE 3105
|
|||
# API
|
||||
EXPOSE 3106
|
||||
|
||||
RUN npm i -D webpack-cli
|
||||
|
||||
|
||||
{{ if eq .Env.ENVIRONMENT "development" }}
|
||||
RUN mkdir /usr/src/app/dev-env
|
||||
RUN touch /usr/src/app/dev-env/.env
|
||||
RUN npm i -D webpack-dev-server
|
||||
|
||||
#Run the app
|
||||
CMD [ "npm", "run", "dev" ]
|
||||
{{ else }}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue