Commit 918c73b0 authored by nanahira's avatar nanahira

optional external

parent 15e13ea7
Pipeline #6574 passed with stages
in 1 minute and 22 seconds
...@@ -23,7 +23,7 @@ upload_to_minio: ...@@ -23,7 +23,7 @@ upload_to_minio:
tags: tags:
- linux - linux
script: script:
- aws s3 --endpoint=https://minio.mycard.moe:9000 sync --delete dist/ s3://nanahira/koishi-plugin/myplugin - aws s3 --endpoint=https://minio.mycard.moe:9000 sync --delete dist/full/ s3://nanahira/koishi-plugin/myplugin
only: only:
- master - master
......
const path = require("path"); const path = require('path');
const packAll = !!process.env.PACK_ALL;
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, packAll ? 'dist/full' : 'dist'),
}, },
externals: { externals: {
'koishi': 'koishi', koishi: 'koishi',
} ...(packAll
? {}
: {
'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