chore: 优化开发体验,执行dev时打包所有插件

pull/64/head
moonrailgun
parent 373e424e6a
commit 63fec19626

@ -226,6 +226,7 @@ const config: Configuration = {
publicPath: ASSET_PATH,
},
devServer: {
open: true,
port: PORT,
historyApiFallback: true,
static: {

@ -11,7 +11,8 @@
"build:webpack": "cross-env TS_NODE_PROJECT='tsconfig.node.json' webpack --config ./build/webpack.config.ts",
"build:stats": "pnpm build:webpack --profile --json=compilation-stats.json",
"build:ci": "cross-env PREF_REPORT=1 NODE_ENV=production pnpm build:webpack",
"dev": "cross-env TS_NODE_PROJECT='tsconfig.node.json' NODE_ENV=development SERVICE_URL=http://127.0.0.1:11000 webpack serve --config ./build/webpack.config.ts",
"dev": "concurrently --kill-others npm:dev:main npm:plugins:watch",
"dev:main": "cross-env TS_NODE_PROJECT='tsconfig.node.json' NODE_ENV=development SERVICE_URL=http://127.0.0.1:11000 webpack serve --config ./build/webpack.config.ts",
"serve": "npx http-server ./dist",
"test": "jest",
"analysis": "cross-env ANALYSIS=true pnpm build:webpack",

@ -7,7 +7,9 @@
"license": "Apache-2.0",
"private": true,
"scripts": {
"dev": "ts-node ./runner.ts",
"dev": "concurrently --kill-others npm:dev:main npm:dev:plugins",
"dev:main": "ts-node ./runner.ts",
"dev:plugins": "pnpm run --filter \"./plugins/*\" build:web:watch",
"debug": "node --inspect -r ts-node/register ./runner.ts",
"build": "ts-node scripts/build.ts",
"start:service": "cd dist && tailchat-runner --config moleculer.config.js",

@ -18,6 +18,9 @@ const dirs = list.filter((item) =>
fs.statSync(path.resolve(containerPath, item)).isDirectory()
);
/**
* 编译插件并添加到 registry
*/
async function start() {
if (argv.length === 2) {
console.log(`安装方式: pnpm plugin:install [pluginName]`);

Loading…
Cancel
Save