mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-18 15:40:12 +01:00
This commit is contained in:
parent
b0b5d209ab
commit
7a6ea5f221
4 changed files with 69 additions and 63 deletions
|
|
@ -3,7 +3,7 @@
|
||||||
"outDir": "./dist/",
|
"outDir": "./dist/",
|
||||||
"noImplicitAny": true,
|
"noImplicitAny": true,
|
||||||
"module": "commonjs",
|
"module": "commonjs",
|
||||||
"target": "es2021",
|
"target": "es6",
|
||||||
"typeRoots": [
|
"typeRoots": [
|
||||||
"./node_modules/@types"
|
"./node_modules/@types"
|
||||||
],
|
],
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,7 @@ const webpack = require("webpack");
|
||||||
const pkg = require("./package.json");
|
const pkg = require("./package.json");
|
||||||
const {CleanWebpackPlugin} = require("clean-webpack-plugin");
|
const {CleanWebpackPlugin} = require("clean-webpack-plugin");
|
||||||
// const BundleAnalyzerPlugin = require("webpack-bundle-analyzer").BundleAnalyzerPlugin;
|
// const BundleAnalyzerPlugin = require("webpack-bundle-analyzer").BundleAnalyzerPlugin;
|
||||||
const { EsbuildPlugin } = require("esbuild-loader");
|
const {EsbuildPlugin} = require("esbuild-loader");
|
||||||
|
|
||||||
module.exports = (env, argv) => {
|
module.exports = (env, argv) => {
|
||||||
return {
|
return {
|
||||||
|
|
@ -24,7 +24,7 @@ module.exports = (env, argv) => {
|
||||||
optimization: {
|
optimization: {
|
||||||
minimize: true,
|
minimize: true,
|
||||||
minimizer: [
|
minimizer: [
|
||||||
new EsbuildPlugin(),
|
new EsbuildPlugin({target: "es6"}),
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
resolve: {
|
resolve: {
|
||||||
|
|
@ -41,6 +41,9 @@ module.exports = (env, argv) => {
|
||||||
use: [
|
use: [
|
||||||
{
|
{
|
||||||
loader: "esbuild-loader",
|
loader: "esbuild-loader",
|
||||||
|
options: {
|
||||||
|
target: "es6",
|
||||||
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
loader: "ifdef-loader",
|
loader: "ifdef-loader",
|
||||||
|
|
|
||||||
|
|
@ -27,7 +27,7 @@ module.exports = (env, argv) => {
|
||||||
optimization: {
|
optimization: {
|
||||||
minimize: true,
|
minimize: true,
|
||||||
minimizer: [
|
minimizer: [
|
||||||
new EsbuildPlugin(),
|
new EsbuildPlugin({target: "es2021"}),
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
module: {
|
module: {
|
||||||
|
|
|
||||||
|
|
@ -25,7 +25,7 @@ module.exports = (env, argv) => {
|
||||||
optimization: {
|
optimization: {
|
||||||
minimize: true,
|
minimize: true,
|
||||||
minimizer: [
|
minimizer: [
|
||||||
new EsbuildPlugin(),
|
new EsbuildPlugin({target: "es6"}),
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
resolve: {
|
resolve: {
|
||||||
|
|
@ -42,6 +42,9 @@ module.exports = (env, argv) => {
|
||||||
use: [
|
use: [
|
||||||
{
|
{
|
||||||
loader: "esbuild-loader",
|
loader: "esbuild-loader",
|
||||||
|
options: {
|
||||||
|
target: "es6",
|
||||||
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
loader: "ifdef-loader",
|
loader: "ifdef-loader",
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue