mirror of
https://github.com/PHIDIAS0303/ExpCluster.git
synced 2025-12-27 03:25:23 +09:00
Add webpack to all plugins
This commit is contained in:
@@ -7,7 +7,7 @@
|
|||||||
"repository": "explosivegaming/ExpCluster",
|
"repository": "explosivegaming/ExpCluster",
|
||||||
"main": "dist/node/index.js",
|
"main": "dist/node/index.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"prepare": "tsc --build"
|
"prepare": "tsc --build && webpack-cli --env production"
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=18"
|
"node": ">=18"
|
||||||
@@ -18,7 +18,10 @@
|
|||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@clusterio/lib": "catalog:",
|
"@clusterio/lib": "catalog:",
|
||||||
"@types/node": "catalog:",
|
"@types/node": "catalog:",
|
||||||
"typescript": "catalog:"
|
"typescript": "catalog:",
|
||||||
|
"webpack": "catalog:",
|
||||||
|
"webpack-cli": "catalog:",
|
||||||
|
"webpack-merge": "catalog:"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@expcluster/lib_util": "workspace:^",
|
"@expcluster/lib_util": "workspace:^",
|
||||||
|
|||||||
4
exp_commands/tsconfig.browser.json
Normal file
4
exp_commands/tsconfig.browser.json
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
{
|
||||||
|
"extends": "../tsconfig.browser.json",
|
||||||
|
"include": [ "web/**/*.tsx", "web/**/*.ts", "package.json" ],
|
||||||
|
}
|
||||||
@@ -1,6 +1,7 @@
|
|||||||
{
|
{
|
||||||
"files": [],
|
"files": [],
|
||||||
"references": [
|
"references": [
|
||||||
{ "path": "./tsconfig.node.json" }
|
{ "path": "./tsconfig.node.json" },
|
||||||
|
{ "path": "./tsconfig.browser.json" }
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|||||||
0
exp_commands/web/index.tsx
Normal file
0
exp_commands/web/index.tsx
Normal file
29
exp_commands/webpack.config.js
Normal file
29
exp_commands/webpack.config.js
Normal file
@@ -0,0 +1,29 @@
|
|||||||
|
"use strict";
|
||||||
|
const path = require("path");
|
||||||
|
const webpack = require("webpack");
|
||||||
|
const { merge } = require("webpack-merge");
|
||||||
|
|
||||||
|
const common = require("@clusterio/web_ui/webpack.common");
|
||||||
|
|
||||||
|
module.exports = (env = {}) => merge(common(env), {
|
||||||
|
context: __dirname,
|
||||||
|
entry: "./web/index.tsx",
|
||||||
|
output: {
|
||||||
|
path: path.resolve(__dirname, "dist", "web"),
|
||||||
|
},
|
||||||
|
plugins: [
|
||||||
|
new webpack.container.ModuleFederationPlugin({
|
||||||
|
name: "exp_commands",
|
||||||
|
library: { type: "window", name: "plugin_exp_commands" },
|
||||||
|
exposes: {
|
||||||
|
"./": "./index.ts",
|
||||||
|
"./package.json": "./package.json",
|
||||||
|
"./web": "./web/index.tsx",
|
||||||
|
},
|
||||||
|
shared: {
|
||||||
|
"@clusterio/lib": { import: false },
|
||||||
|
"@clusterio/web_ui": { import: false },
|
||||||
|
},
|
||||||
|
}),
|
||||||
|
],
|
||||||
|
});
|
||||||
@@ -7,7 +7,7 @@
|
|||||||
"repository": "explosivegaming/ExpCluster",
|
"repository": "explosivegaming/ExpCluster",
|
||||||
"main": "dist/node/index.js",
|
"main": "dist/node/index.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"prepare": "tsc --build"
|
"prepare": "tsc --build && webpack-cli --env production"
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=18"
|
"node": ">=18"
|
||||||
@@ -18,7 +18,10 @@
|
|||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@clusterio/lib": "catalog:",
|
"@clusterio/lib": "catalog:",
|
||||||
"@types/node": "catalog:",
|
"@types/node": "catalog:",
|
||||||
"typescript": "catalog:"
|
"typescript": "catalog:",
|
||||||
|
"webpack": "catalog:",
|
||||||
|
"webpack-cli": "catalog:",
|
||||||
|
"webpack-merge": "catalog:"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@expcluster/lib_util": "workspace:^",
|
"@expcluster/lib_util": "workspace:^",
|
||||||
|
|||||||
4
exp_gui/tsconfig.browser.json
Normal file
4
exp_gui/tsconfig.browser.json
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
{
|
||||||
|
"extends": "../tsconfig.browser.json",
|
||||||
|
"include": [ "web/**/*.tsx", "web/**/*.ts", "package.json" ],
|
||||||
|
}
|
||||||
@@ -1,6 +1,7 @@
|
|||||||
{
|
{
|
||||||
"files": [],
|
"files": [],
|
||||||
"references": [
|
"references": [
|
||||||
{ "path": "./tsconfig.node.json" }
|
{ "path": "./tsconfig.node.json" },
|
||||||
|
{ "path": "./tsconfig.browser.json" }
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|||||||
0
exp_gui/web/index.tsx
Normal file
0
exp_gui/web/index.tsx
Normal file
29
exp_gui/webpack.config.js
Normal file
29
exp_gui/webpack.config.js
Normal file
@@ -0,0 +1,29 @@
|
|||||||
|
"use strict";
|
||||||
|
const path = require("path");
|
||||||
|
const webpack = require("webpack");
|
||||||
|
const { merge } = require("webpack-merge");
|
||||||
|
|
||||||
|
const common = require("@clusterio/web_ui/webpack.common");
|
||||||
|
|
||||||
|
module.exports = (env = {}) => merge(common(env), {
|
||||||
|
context: __dirname,
|
||||||
|
entry: "./web/index.tsx",
|
||||||
|
output: {
|
||||||
|
path: path.resolve(__dirname, "dist", "web"),
|
||||||
|
},
|
||||||
|
plugins: [
|
||||||
|
new webpack.container.ModuleFederationPlugin({
|
||||||
|
name: "exp_gui",
|
||||||
|
library: { type: "window", name: "plugin_exp_gui" },
|
||||||
|
exposes: {
|
||||||
|
"./": "./index.ts",
|
||||||
|
"./package.json": "./package.json",
|
||||||
|
"./web": "./web/index.tsx",
|
||||||
|
},
|
||||||
|
shared: {
|
||||||
|
"@clusterio/lib": { import: false },
|
||||||
|
"@clusterio/web_ui": { import: false },
|
||||||
|
},
|
||||||
|
}),
|
||||||
|
],
|
||||||
|
});
|
||||||
@@ -7,7 +7,7 @@
|
|||||||
"repository": "explosivegaming/ExpCluster",
|
"repository": "explosivegaming/ExpCluster",
|
||||||
"main": "dist/node/index.js",
|
"main": "dist/node/index.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"prepare": "tsc --build"
|
"prepare": "tsc --build && webpack-cli --env production"
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=18"
|
"node": ">=18"
|
||||||
@@ -18,7 +18,10 @@
|
|||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@clusterio/lib": "catalog:",
|
"@clusterio/lib": "catalog:",
|
||||||
"@types/node": "catalog:",
|
"@types/node": "catalog:",
|
||||||
"typescript": "catalog:"
|
"typescript": "catalog:",
|
||||||
|
"webpack": "catalog:",
|
||||||
|
"webpack-cli": "catalog:",
|
||||||
|
"webpack-merge": "catalog:"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@expcluster/lib_commands": "workspace:^",
|
"@expcluster/lib_commands": "workspace:^",
|
||||||
|
|||||||
4
exp_legacy/tsconfig.browser.json
Normal file
4
exp_legacy/tsconfig.browser.json
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
{
|
||||||
|
"extends": "../tsconfig.browser.json",
|
||||||
|
"include": [ "web/**/*.tsx", "web/**/*.ts", "package.json" ],
|
||||||
|
}
|
||||||
@@ -1,6 +1,7 @@
|
|||||||
{
|
{
|
||||||
"files": [],
|
"files": [],
|
||||||
"references": [
|
"references": [
|
||||||
{ "path": "./tsconfig.node.json" }
|
{ "path": "./tsconfig.node.json" },
|
||||||
|
{ "path": "./tsconfig.browser.json" }
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|||||||
0
exp_legacy/web/index.tsx
Normal file
0
exp_legacy/web/index.tsx
Normal file
29
exp_legacy/webpack.config.js
Normal file
29
exp_legacy/webpack.config.js
Normal file
@@ -0,0 +1,29 @@
|
|||||||
|
"use strict";
|
||||||
|
const path = require("path");
|
||||||
|
const webpack = require("webpack");
|
||||||
|
const { merge } = require("webpack-merge");
|
||||||
|
|
||||||
|
const common = require("@clusterio/web_ui/webpack.common");
|
||||||
|
|
||||||
|
module.exports = (env = {}) => merge(common(env), {
|
||||||
|
context: __dirname,
|
||||||
|
entry: "./web/index.tsx",
|
||||||
|
output: {
|
||||||
|
path: path.resolve(__dirname, "dist", "web"),
|
||||||
|
},
|
||||||
|
plugins: [
|
||||||
|
new webpack.container.ModuleFederationPlugin({
|
||||||
|
name: "exp_legacy",
|
||||||
|
library: { type: "window", name: "plugin_exp_legacy" },
|
||||||
|
exposes: {
|
||||||
|
"./": "./index.ts",
|
||||||
|
"./package.json": "./package.json",
|
||||||
|
"./web": "./web/index.tsx",
|
||||||
|
},
|
||||||
|
shared: {
|
||||||
|
"@clusterio/lib": { import: false },
|
||||||
|
"@clusterio/web_ui": { import: false },
|
||||||
|
},
|
||||||
|
}),
|
||||||
|
],
|
||||||
|
});
|
||||||
@@ -1,6 +1,7 @@
|
|||||||
{
|
{
|
||||||
"files": [],
|
"files": [],
|
||||||
"references": [
|
"references": [
|
||||||
{ "path": "./tsconfig.node.json" }
|
{ "path": "./tsconfig.node.json" },
|
||||||
|
{ "path": "./tsconfig.browser.json" }
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
"repository": "explosivegaming/ExpCluster",
|
"repository": "explosivegaming/ExpCluster",
|
||||||
"main": "dist/node/index.js",
|
"main": "dist/node/index.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"prepare": "tsc --build"
|
"prepare": "tsc --build && webpack-cli --env production"
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=18"
|
"node": ">=18"
|
||||||
@@ -18,7 +18,10 @@
|
|||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@clusterio/lib": "catalog:",
|
"@clusterio/lib": "catalog:",
|
||||||
"@types/node": "catalog:",
|
"@types/node": "catalog:",
|
||||||
"typescript": "catalog:"
|
"typescript": "catalog:",
|
||||||
|
"webpack": "catalog:",
|
||||||
|
"webpack-cli": "catalog:",
|
||||||
|
"webpack-merge": "catalog:"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@sinclair/typebox": "catalog:"
|
"@sinclair/typebox": "catalog:"
|
||||||
|
|||||||
4
exp_util/tsconfig.browser.json
Normal file
4
exp_util/tsconfig.browser.json
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
{
|
||||||
|
"extends": "../tsconfig.browser.json",
|
||||||
|
"include": [ "web/**/*.tsx", "web/**/*.ts", "package.json" ],
|
||||||
|
}
|
||||||
@@ -1,6 +1,7 @@
|
|||||||
{
|
{
|
||||||
"files": [],
|
"files": [],
|
||||||
"references": [
|
"references": [
|
||||||
{ "path": "./tsconfig.node.json" }
|
{ "path": "./tsconfig.node.json" },
|
||||||
|
{ "path": "./tsconfig.browser.json" }
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|||||||
0
exp_util/web/index.tsx
Normal file
0
exp_util/web/index.tsx
Normal file
29
exp_util/webpack.config.js
Normal file
29
exp_util/webpack.config.js
Normal file
@@ -0,0 +1,29 @@
|
|||||||
|
"use strict";
|
||||||
|
const path = require("path");
|
||||||
|
const webpack = require("webpack");
|
||||||
|
const { merge } = require("webpack-merge");
|
||||||
|
|
||||||
|
const common = require("@clusterio/web_ui/webpack.common");
|
||||||
|
|
||||||
|
module.exports = (env = {}) => merge(common(env), {
|
||||||
|
context: __dirname,
|
||||||
|
entry: "./web/index.tsx",
|
||||||
|
output: {
|
||||||
|
path: path.resolve(__dirname, "dist", "web"),
|
||||||
|
},
|
||||||
|
plugins: [
|
||||||
|
new webpack.container.ModuleFederationPlugin({
|
||||||
|
name: "exp_util",
|
||||||
|
library: { type: "window", name: "plugin_exp_util" },
|
||||||
|
exposes: {
|
||||||
|
"./": "./index.ts",
|
||||||
|
"./package.json": "./package.json",
|
||||||
|
"./web": "./web/index.tsx",
|
||||||
|
},
|
||||||
|
shared: {
|
||||||
|
"@clusterio/lib": { import: false },
|
||||||
|
"@clusterio/web_ui": { import: false },
|
||||||
|
},
|
||||||
|
}),
|
||||||
|
],
|
||||||
|
});
|
||||||
36
pnpm-lock.yaml
generated
36
pnpm-lock.yaml
generated
@@ -69,6 +69,15 @@ importers:
|
|||||||
typescript:
|
typescript:
|
||||||
specifier: 'catalog:'
|
specifier: 'catalog:'
|
||||||
version: 5.8.3
|
version: 5.8.3
|
||||||
|
webpack:
|
||||||
|
specifier: 'catalog:'
|
||||||
|
version: 5.98.0(@swc/core@1.11.16)(webpack-cli@5.1.4)
|
||||||
|
webpack-cli:
|
||||||
|
specifier: 'catalog:'
|
||||||
|
version: 5.1.4(webpack@5.98.0)
|
||||||
|
webpack-merge:
|
||||||
|
specifier: 'catalog:'
|
||||||
|
version: 5.10.0
|
||||||
|
|
||||||
exp_groups:
|
exp_groups:
|
||||||
dependencies:
|
dependencies:
|
||||||
@@ -134,6 +143,15 @@ importers:
|
|||||||
typescript:
|
typescript:
|
||||||
specifier: 'catalog:'
|
specifier: 'catalog:'
|
||||||
version: 5.8.3
|
version: 5.8.3
|
||||||
|
webpack:
|
||||||
|
specifier: 'catalog:'
|
||||||
|
version: 5.98.0(@swc/core@1.11.16)(webpack-cli@5.1.4)
|
||||||
|
webpack-cli:
|
||||||
|
specifier: 'catalog:'
|
||||||
|
version: 5.1.4(webpack@5.98.0)
|
||||||
|
webpack-merge:
|
||||||
|
specifier: 'catalog:'
|
||||||
|
version: 5.10.0
|
||||||
|
|
||||||
exp_legacy:
|
exp_legacy:
|
||||||
dependencies:
|
dependencies:
|
||||||
@@ -156,6 +174,15 @@ importers:
|
|||||||
typescript:
|
typescript:
|
||||||
specifier: 'catalog:'
|
specifier: 'catalog:'
|
||||||
version: 5.8.3
|
version: 5.8.3
|
||||||
|
webpack:
|
||||||
|
specifier: 'catalog:'
|
||||||
|
version: 5.98.0(@swc/core@1.11.16)(webpack-cli@5.1.4)
|
||||||
|
webpack-cli:
|
||||||
|
specifier: 'catalog:'
|
||||||
|
version: 5.1.4(webpack@5.98.0)
|
||||||
|
webpack-merge:
|
||||||
|
specifier: 'catalog:'
|
||||||
|
version: 5.10.0
|
||||||
|
|
||||||
exp_scenario:
|
exp_scenario:
|
||||||
dependencies:
|
dependencies:
|
||||||
@@ -252,6 +279,15 @@ importers:
|
|||||||
typescript:
|
typescript:
|
||||||
specifier: 'catalog:'
|
specifier: 'catalog:'
|
||||||
version: 5.8.3
|
version: 5.8.3
|
||||||
|
webpack:
|
||||||
|
specifier: 'catalog:'
|
||||||
|
version: 5.98.0(@swc/core@1.11.16)(webpack-cli@5.1.4)
|
||||||
|
webpack-cli:
|
||||||
|
specifier: 'catalog:'
|
||||||
|
version: 5.1.4(webpack@5.98.0)
|
||||||
|
webpack-merge:
|
||||||
|
specifier: 'catalog:'
|
||||||
|
version: 5.10.0
|
||||||
|
|
||||||
packages:
|
packages:
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user