chore: upgrade webpack-chain

This commit is contained in:
winixt 2023-03-31 21:09:21 +08:00
parent e80ede772b
commit 209723445d
7 changed files with 93 additions and 504 deletions

View File

@ -59,8 +59,8 @@
"terser-webpack-plugin": "^5.3.6",
"vue-loader": "^17.0.1",
"webpack": "^5.76.2",
"webpack-5-chain": "^8.0.1",
"webpack-bundle-analyzer": "^4.4.0",
"webpack-chain": "^6.5.1",
"webpack-dev-server": "^4.8.1",
"webpackbar": "^5.0.2"
},

View File

@ -27,7 +27,7 @@ export default function (api) {
async fn({ options }) {
const assert = require('assert');
const { getBundleAndConfigs } = require('../buildDevUtils');
const { toString } = require('webpack-chain');
const { toString } = require('webpack-5-chain');
const { highlight } = require('cli-highlight');
const { bundleConfig } = await getBundleAndConfigs({ api });

View File

@ -1,6 +1,6 @@
import { join } from 'path';
import { existsSync } from 'fs';
import Config from 'webpack-chain';
import Config from 'webpack-5-chain';
import webpack from 'webpack';
import createCssWebpackConfig from './css';
import getBabelOpts from './getBabelOpts';

View File

@ -1,4 +1,4 @@
import Config from 'webpack-chain'
import Config from 'webpack-5-chain'
import webpack from 'webpack';
import HtmlWebpackPlugin from 'html-webpack-plugin'

View File

@ -26,13 +26,13 @@
"access": "public"
},
"dependencies": {
"@swc/core": "^1.3.37",
"@swc/css": "^0.0.20",
"swc-plugin-vue-jsx": "^0.2.1",
"swc-loader": "^0.2.3",
"@fesjs/utils": "^3.0.0-rc.2",
"terser-webpack-plugin": "^5.3.6",
"css-minimizer-webpack-plugin": "^4.0.0"
"@swc/core": "^1.3.44",
"@swc/css": "^0.0.20",
"css-minimizer-webpack-plugin": "^5.0.0",
"swc-loader": "^0.2.3",
"swc-plugin-vue-jsx": "^0.2.1",
"terser-webpack-plugin": "^5.3.7"
},
"peerDependencies": {
"@fesjs/fes": "^3.0.0-rc.0"

View File

@ -28,10 +28,9 @@ export function buildSwcOptions(targets, config, isJsx, isTs, minify = false) {
},
experimental: isJsx
? {
plugins: [['swc-plugin-vue-jsx', {}]],
}
plugins: [['swc-plugin-vue-jsx', {}]],
}
: undefined,
// preserveAllComments: true,
},
isModule: 'unknown',
minify: minify ? {} : false,

File diff suppressed because it is too large Load Diff