Commit 01ad7257 authored by nanahira's avatar nanahira

use schemagen as external

parent de7d70d3
Pipeline #6388 passed with stages
in 31 seconds
{ {
"name": "koishi-plugin-pics", "name": "koishi-plugin-pics",
"description": "Koishi 的随机图片插件", "description": "Koishi 的随机图片插件",
"version": "1.0.1", "version": "1.0.2",
"main": "dist/index.js", "main": "dist/index.js",
"types": "dist/index.d.ts", "types": "dist/index.d.ts",
"scripts": { "scripts": {
...@@ -26,7 +26,8 @@ ...@@ -26,7 +26,8 @@
}, },
"homepage": "https://code.mycard.moe/3rdeye/koishi-plugin-pics", "homepage": "https://code.mycard.moe/3rdeye/koishi-plugin-pics",
"dependencies": { "dependencies": {
"source-map-support": "^0.5.20" "source-map-support": "^0.5.20",
"koishi-utils-schemagen": "^1.1.7"
}, },
"peerDependencies": { "peerDependencies": {
"koishi": "^4.0.0-alpha.11" "koishi": "^4.0.0-alpha.11"
...@@ -40,7 +41,6 @@ ...@@ -40,7 +41,6 @@
"eslint-config-prettier": "^8.3.0", "eslint-config-prettier": "^8.3.0",
"eslint-plugin-prettier": "^3.4.1", "eslint-plugin-prettier": "^3.4.1",
"koishi": "^4.0.0-alpha.11", "koishi": "^4.0.0-alpha.11",
"koishi-utils-schemagen": "^1.1.7",
"lodash": "^4.17.21", "lodash": "^4.17.21",
"prettier": "^2.4.1", "prettier": "^2.4.1",
"raw-loader": "^4.0.2", "raw-loader": "^4.0.2",
......
const path = require("path"); const path = require('path');
module.exports = { module.exports = {
entry: "./src/index.ts", entry: './src/index.ts',
mode: "production", mode: 'production',
target: "node", target: 'node',
devtool: "source-map", devtool: 'source-map',
module: { module: {
rules: [ rules: [
{ {
test: /\.tsx?$/, test: /\.tsx?$/,
use: "ts-loader", use: 'ts-loader',
exclude: /node_modules/, exclude: /node_modules/,
}, },
{ test: /\.mustache$/, use: "raw-loader" }, { test: /\.mustache$/, use: 'raw-loader' },
], ],
}, },
resolve: { resolve: {
extensions: [".tsx", ".ts", ".js"], extensions: ['.tsx', '.ts', '.js'],
}, },
output: { output: {
filename: "index.js", filename: 'index.js',
library: { library: {
type: "commonjs", type: 'commonjs',
}, },
path: path.resolve(__dirname, "dist"), path: path.resolve(__dirname, 'dist'),
}, },
externals: { externals: {
'koishi': 'koishi', koishi: 'koishi',
} 'koishi-utils-schemagen': 'koishi-utils-schemagen',
},
}; };
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment