mirror of
https://github.com/darksaid98/oxmysql.git
synced 2026-12-01 22:21:51 +00:00
refactor: replace webpack with esbuild
This commit is contained in:
1 parent
b7a17d9566
commit
17c4916010
4 files changed
+14
-44
No files matched your search
@@ -30,8 +30,9 @@ jobs:
|
||||
|
||||
- name: Bundle files
|
||||
run: |
|
||||
mv dist oxmysql
|
||||
zip -r oxmysql-${{ github.event.inputs.tag }}.zip oxmysql
|
||||
mkdir -p ./temp/oxmysql
|
||||
cp ./{LICENSE.md,README.md,fxmanifest.lua,lib} ./temp/oxmysql
|
||||
zip -r oxmysql-${{ github.event.inputs.tag }}.zip ./temp/oxmysql
|
||||
|
||||
- name: Create Release
|
||||
uses: "marvinpinto/[email protected]"
|
||||
|
||||
@@ -31,8 +31,9 @@ jobs:
|
||||
|
||||
- name: Bundle files
|
||||
run: |
|
||||
mv dist oxmysql
|
||||
zip -r oxmysql-${{ env.RELEASE_VERSION }}.zip oxmysql
|
||||
mkdir -p ./temp/oxmysql
|
||||
cp ./{LICENSE.md,README.md,fxmanifest.lua,lib} ./temp/oxmysql
|
||||
zip -r oxmysql-${{ github.event.inputs.tag }}.zip ./temp/oxmysql
|
||||
|
||||
- name: Create Release
|
||||
uses: "marvinpinto/[email protected]"
|
||||
|
||||
+8
-11
@@ -1,26 +1,23 @@
|
||||
{
|
||||
"name": "oxmysql",
|
||||
"version": "1.0.0",
|
||||
"main": "oxmysql.js",
|
||||
"description": "node-mysql2 resource for Cfx",
|
||||
"description": "FXServer to MySQL communication via node-mysql2",
|
||||
"repository": "[email protected]:overextended/oxmysql.git",
|
||||
"author": "dunak-debug <[email protected]>",
|
||||
"license": "GPL-3.0-or-later",
|
||||
"type": "module",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"build": "webpack",
|
||||
"watch": "webpack --watch",
|
||||
"build": "esbuild --bundle --platform=node --target=node16.9.1 src/server/index.js --outfile=dist/server/build.js",
|
||||
"watch": "esbuild --watch --bundle --platform=node --target=node16.9.1 src/server/index.js --outfile=dist/server/build.js",
|
||||
"postinstall": "patch-package"
|
||||
},
|
||||
"dependencies": {
|
||||
"@citizenfx/server": "latest",
|
||||
"esbuild": "^0.14.7",
|
||||
"mysql2": "^2.3.3",
|
||||
"patch-package": "^6.4.7",
|
||||
"postinstall-postinstall": "^2.1.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"copy-webpack-plugin": "^10.0.0",
|
||||
"patch-package": "^6.4.7",
|
||||
"typescript": "^4.5.2",
|
||||
"webpack": "^5.64.4",
|
||||
"webpack-cli": "^4.9.1"
|
||||
}
|
||||
"devDependencies": {}
|
||||
}
|
||||
@@ -1,29 +0,0 @@
|
||||
const path = require("path");
|
||||
const { DefinePlugin, IgnorePlugin } = require("webpack");
|
||||
const CopyPlugin = require("copy-webpack-plugin");
|
||||
|
||||
module.exports = {
|
||||
mode: "production",
|
||||
entry: "./src/index.js",
|
||||
resolve: {
|
||||
extensions: [".js"],
|
||||
},
|
||||
plugins: [
|
||||
new DefinePlugin({ "global.GENTLY": false }),
|
||||
new IgnorePlugin({
|
||||
resourceRegExp: /^cardinal$/,
|
||||
contextRegExp: /./,
|
||||
}),
|
||||
new CopyPlugin({
|
||||
patterns: ["./lua", "./lua", "README.md", "LICENSE.md"],
|
||||
}),
|
||||
],
|
||||
output: {
|
||||
filename: "oxmysql.js",
|
||||
path: path.resolve(__dirname, "dist"),
|
||||
},
|
||||
optimization: {
|
||||
minimize: false,
|
||||
},
|
||||
target: "node",
|
||||
};
|
||||
Reference in new issue
Block a user