mirror of
https://github.com/darksaid98/oxmysql.git
synced 2026-12-04 06:28:53 +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
|
- name: Bundle files
|
||||||
run: |
|
run: |
|
||||||
mv dist oxmysql
|
mkdir -p ./temp/oxmysql
|
||||||
zip -r oxmysql-${{ github.event.inputs.tag }}.zip oxmysql
|
cp ./{LICENSE.md,README.md,fxmanifest.lua,lib} ./temp/oxmysql
|
||||||
|
zip -r oxmysql-${{ github.event.inputs.tag }}.zip ./temp/oxmysql
|
||||||
|
|
||||||
- name: Create Release
|
- name: Create Release
|
||||||
uses: "marvinpinto/[email protected]"
|
uses: "marvinpinto/[email protected]"
|
||||||
|
|||||||
@@ -31,8 +31,9 @@ jobs:
|
|||||||
|
|
||||||
- name: Bundle files
|
- name: Bundle files
|
||||||
run: |
|
run: |
|
||||||
mv dist oxmysql
|
mkdir -p ./temp/oxmysql
|
||||||
zip -r oxmysql-${{ env.RELEASE_VERSION }}.zip oxmysql
|
cp ./{LICENSE.md,README.md,fxmanifest.lua,lib} ./temp/oxmysql
|
||||||
|
zip -r oxmysql-${{ github.event.inputs.tag }}.zip ./temp/oxmysql
|
||||||
|
|
||||||
- name: Create Release
|
- name: Create Release
|
||||||
uses: "marvinpinto/[email protected]"
|
uses: "marvinpinto/[email protected]"
|
||||||
|
|||||||
+8
-11
@@ -1,26 +1,23 @@
|
|||||||
{
|
{
|
||||||
"name": "oxmysql",
|
"name": "oxmysql",
|
||||||
"version": "1.0.0",
|
"version": "1.0.0",
|
||||||
"main": "oxmysql.js",
|
"description": "FXServer to MySQL communication via node-mysql2",
|
||||||
"description": "node-mysql2 resource for Cfx",
|
|
||||||
"repository": "[email protected]:overextended/oxmysql.git",
|
"repository": "[email protected]:overextended/oxmysql.git",
|
||||||
"author": "dunak-debug <[email protected]>",
|
"author": "dunak-debug <[email protected]>",
|
||||||
"license": "GPL-3.0-or-later",
|
"license": "GPL-3.0-or-later",
|
||||||
|
"type": "module",
|
||||||
|
"private": true,
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"build": "webpack",
|
"build": "esbuild --bundle --platform=node --target=node16.9.1 src/server/index.js --outfile=dist/server/build.js",
|
||||||
"watch": "webpack --watch",
|
"watch": "esbuild --watch --bundle --platform=node --target=node16.9.1 src/server/index.js --outfile=dist/server/build.js",
|
||||||
"postinstall": "patch-package"
|
"postinstall": "patch-package"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@citizenfx/server": "latest",
|
"@citizenfx/server": "latest",
|
||||||
|
"esbuild": "^0.14.7",
|
||||||
"mysql2": "^2.3.3",
|
"mysql2": "^2.3.3",
|
||||||
|
"patch-package": "^6.4.7",
|
||||||
"postinstall-postinstall": "^2.1.0"
|
"postinstall-postinstall": "^2.1.0"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"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"
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
@@ -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