mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-01-04 15:58:49 +01:00
This commit is contained in:
parent
204eed2e99
commit
5fdaecd228
4 changed files with 0 additions and 88 deletions
|
|
@ -68,7 +68,6 @@
|
|||
"safer-buffer": "^2.1.2",
|
||||
"sass": "^1.53.0",
|
||||
"sass-loader": "^12.6.0",
|
||||
"siyuan-petal": "^0.7.1",
|
||||
"typescript": "^4.7.4",
|
||||
"webpack": "^5.73.0",
|
||||
"webpack-bundle-analyzer": "^4.5.0",
|
||||
|
|
|
|||
7
app/pnpm-lock.yaml
generated
7
app/pnpm-lock.yaml
generated
|
|
@ -75,9 +75,6 @@ devDependencies:
|
|||
sass-loader:
|
||||
specifier: ^12.6.0
|
||||
version: 12.6.0(sass@1.53.0)(webpack@5.73.0)
|
||||
siyuan-petal:
|
||||
specifier: ^0.7.1
|
||||
version: 0.7.1
|
||||
typescript:
|
||||
specifier: ^4.7.4
|
||||
version: 4.7.4
|
||||
|
|
@ -3416,10 +3413,6 @@ packages:
|
|||
totalist: 1.1.0
|
||||
dev: true
|
||||
|
||||
/siyuan-petal@0.7.1:
|
||||
resolution: {integrity: sha512-jUxQrK83T2AMgADOQJe5W6rqbtkO3oHLGx/oaTec69JvyYfABVjARV0YxX4daKhgMl9lykdT1fLyYxg2YDV4Mw==}
|
||||
dev: true
|
||||
|
||||
/slash@3.0.0:
|
||||
resolution: {integrity: sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==}
|
||||
engines: {node: '>=8'}
|
||||
|
|
|
|||
|
|
@ -1,8 +0,0 @@
|
|||
class SiYuanAPI {
|
||||
|
||||
static openFile() {
|
||||
// openFileById()
|
||||
}
|
||||
}
|
||||
|
||||
export default SiYuanAPI;
|
||||
|
|
@ -1,72 +0,0 @@
|
|||
const path = require("path");
|
||||
const webpack = require("webpack");
|
||||
const pkg = require("./package.json");
|
||||
const {CleanWebpackPlugin} = require("clean-webpack-plugin");
|
||||
// const BundleAnalyzerPlugin = require("webpack-bundle-analyzer").BundleAnalyzerPlugin;
|
||||
const {EsbuildPlugin} = require("esbuild-loader");
|
||||
|
||||
module.exports = (env, argv) => {
|
||||
return {
|
||||
mode: argv.mode || "development",
|
||||
watch: argv.mode !== "production",
|
||||
devtool: argv.mode !== "production" ? "eval" : false,
|
||||
output: {
|
||||
publicPath: "",
|
||||
filename: "[name].js",
|
||||
path: path.resolve(__dirname, "stage/build/api"),
|
||||
libraryTarget: "umd",
|
||||
library: "SiYuanAPI",
|
||||
libraryExport: "default",
|
||||
},
|
||||
entry: {
|
||||
"api": "./src/api.ts",
|
||||
},
|
||||
optimization: {
|
||||
minimize: true,
|
||||
minimizer: [
|
||||
new EsbuildPlugin({target: "es6"}),
|
||||
],
|
||||
},
|
||||
resolve: {
|
||||
fallback: {
|
||||
"path": require.resolve("path-browserify"),
|
||||
},
|
||||
extensions: [".ts", ".js", ".scss"],
|
||||
},
|
||||
module: {
|
||||
rules: [
|
||||
{
|
||||
test: /\.ts(x?)$/,
|
||||
include: [path.resolve(__dirname, "src")],
|
||||
use: [
|
||||
{
|
||||
loader: "esbuild-loader",
|
||||
options: {
|
||||
target: "es6",
|
||||
}
|
||||
},
|
||||
{
|
||||
loader: "ifdef-loader",
|
||||
options: {
|
||||
"ifdef-verbose": false,
|
||||
BROWSER: true,
|
||||
MOBILE: true,
|
||||
},
|
||||
},
|
||||
],
|
||||
}
|
||||
],
|
||||
},
|
||||
plugins: [
|
||||
// new BundleAnalyzerPlugin(),
|
||||
new CleanWebpackPlugin({
|
||||
cleanOnceBeforeBuildPatterns: [
|
||||
path.join(__dirname, "stage/build/api")],
|
||||
}),
|
||||
new webpack.DefinePlugin({
|
||||
NODE_ENV: JSON.stringify(argv.mode),
|
||||
SIYUAN_VERSION: JSON.stringify(pkg.version),
|
||||
}),
|
||||
],
|
||||
};
|
||||
};
|
||||
Loading…
Add table
Add a link
Reference in a new issue