Skip to content

Commit

Permalink
ci: build
Browse files Browse the repository at this point in the history
  • Loading branch information
wkylin committed Dec 14, 2024
1 parent 97ab41c commit 4219674
Show file tree
Hide file tree
Showing 4 changed files with 51 additions and 13 deletions.
30 changes: 30 additions & 0 deletions .cspell/custom-dictionary-workspace.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,51 +4,81 @@
6
ACSS
adipisicing
afafaf
amap
Amap
amet
Analyse
autocommit
bito
Bookstory
cdnurl
cellspacing
chatglm
chatrs
CHECKPRD
chinasoft
Codegeex
codepaths
consequuntur
Corrupti
countup
CRACO
CWGNC
depcheck
devchat
doloribus
elit
ENOENT
EPSG
fengian
fengxian
Fira
gantt
Gantt
Gmodal
gptcommit
hookspath
Huksy
iclient
INTLIFY
iure
jsencrypt
kend
lamina
languagedetector
markercluster
Menlo
mfsu
packagehash
preid
premajor
preminor
prepatch
Qube
rapidapi
repellat
rvest
sentrycli
singleline
smakss
snyk
Snyk
sonarcloud
sonarlint
sonarqube
spiderfy
stepsize
supermapgis
tabnine
tada
Tahoma
teambit
treee
tsbuildinfo
umijs
voluptate
Windi
wuqiong
xinghuo
zhanglc
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@
"scripts": {
"pre:run": "install-changed",
"dev": "npm run start",
"start": "npm run pre:run && cross-env BUILD_GOAL=development NODE_ENV=development webpack serve --config ./webpack/webpack.dev.js --stats-error-details",
"start": "npm run pre:run && cross-env BUILD_GOAL=development NODE_ENV=development NODE_OPTIONS=--trace-deprecation webpack serve --config ./webpack/webpack.dev.js --stats-error-details",
"dev:faker": "concurrently -r \"npm run start\" \"npm run faker\"",
"build:production": "npm run && cross-env SENTRY_SOURCE_MAP=no BUILD_GOAL=production NODE_ENV=production NODE_OPTIONS=--max_old_space_size=4096 webpack --config ./webpack/webpack.prod.js --stats-error-details",
"build:production": "npm run && cross-env SENTRY_SOURCE_MAP=no BUILD_GOAL=production NODE_ENV=production NODE_OPTIONS=--max_old_space_size=4096 NODE_OPTIONS=--trace-deprecation webpack --config ./webpack/webpack.prod.js --stats-error-details",
"build:test": "cross-env SENTRY_SOURCE_MAP=no BUILD_GOAL=test NODE_ENV=production webpack --config ./webpack/webpack.prod.js --stats-error-details",
"build:dev": "cross-env SENTRY_SOURCE_MAP=no BUILD_GOAL=dev NODE_ENV=production webpack --config ./webpack/webpack.prod.js --stats-error-details",
"prod:serve": "cross-env SENTRY_SOURCE_MAP=no BUILD_SERVE=prod BUILD_GOAL=production NODE_ENV=production webpack --config ./webpack/webpack.prod.js --stats-error-details",
Expand Down
24 changes: 16 additions & 8 deletions webpack/webpack.common.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ const { BundleAnalyzerPlugin } = require('webpack-bundle-analyzer')
const AntdDayjsWebpackPlugin = require('antd-dayjs-webpack-plugin')
const Dotenv = require('dotenv-webpack')
const CaseSensitivePathsPlugin = require('case-sensitive-paths-webpack-plugin')
const CircularDependencyPlugin = require('circular-dependency-plugin')
// const CircularDependencyPlugin = require('circular-dependency-plugin')
const NodePolyfillPlugin = require('node-polyfill-webpack-plugin')
const WebpackBar = require('webpackbar')
const ForkTsCheckerWebpackPlugin = require('fork-ts-checker-webpack-plugin')
Expand Down Expand Up @@ -96,13 +96,13 @@ const config = {
}),
new AntdDayjsWebpackPlugin(),
new CaseSensitivePathsPlugin(),
new CircularDependencyPlugin({
exclude: /node_modules/,
include: /src/,
failOnError: true,
allowAsyncCycles: false,
cwd: process.cwd(),
}),
// new CircularDependencyPlugin({
// exclude: /node_modules/,
// include: /src/,
// failOnError: true,
// allowAsyncCycles: false,
// cwd: process.cwd(),
// }),
new NodePolyfillPlugin(),
new WebpackBar(),
new ForkTsCheckerWebpackPlugin({
Expand Down Expand Up @@ -220,6 +220,14 @@ const config = {
},
],
},
stats: {
all: false,
errors: true,
warnings: true,
errorDetails: true,
moduleTrace: true, // 打印模块追踪信息,与--trace - warnings类似
excludeAssets: /node_modules/
}
}

if (USE_ANALYZE) {
Expand Down
6 changes: 3 additions & 3 deletions webpack/webpack.dev.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,9 @@ const devWebpackConfig = merge(common, {
new ReactRefreshWebpackPlugin({
overlay: false,
}),
new webpack.debug.ProfilingPlugin({
outputPath: path.join(__dirname, 'profiling/profileEvents.json'),
}),
// new webpack.debug.ProfilingPlugin({
// outputPath: path.join(__dirname, 'profiling/profileEvents.json'),
// }),
].filter(Boolean),
optimization: {
removeAvailableModules: false,
Expand Down

0 comments on commit 4219674

Please sign in to comment.