Skip to content

Commit

Permalink
Merge pull request #2664 from XiaoMi/build/upgrade-rollup3
Browse files Browse the repository at this point in the history
build: upgrade rollup3
  • Loading branch information
solarjoker authored Nov 15, 2023
2 parents d3246f9 + 510cb5a commit b587be1
Show file tree
Hide file tree
Showing 9 changed files with 20,775 additions and 1,184 deletions.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
"@babel/preset-typescript": "~7.12.7",
"@changesets/changelog-github": "^0.4.7",
"@changesets/cli": "^2.25.0",
"@hi-ui/hi-build": "^4.0.4",
"@hi-ui/hi-build": "4.1.0",
"@storybook/addon-actions": "^6.3.12",
"@storybook/addon-essentials": "^6.3.12",
"@storybook/addon-links": "^6.3.12",
Expand Down Expand Up @@ -120,7 +120,7 @@
"stylelint-scss": "~3.18.0"
},
"engines": {
"node": ">=12.22.1 <=14.18.1"
"node": ">=12.22.1 <=14.21.3"
},
"lint-staged": {
"*.{js,jsx}": [
Expand Down
4,838 changes: 4,838 additions & 0 deletions packages/icons/stats.html

Large diffs are not rendered by default.

4,838 changes: 4,838 additions & 0 deletions packages/ui/date-picker/stats.html

Large diffs are not rendered by default.

4,838 changes: 4,838 additions & 0 deletions packages/ui/table/stats.html

Large diffs are not rendered by default.

4,838 changes: 4,838 additions & 0 deletions packages/ui/upload/stats.html

Large diffs are not rendered by default.

5 changes: 4 additions & 1 deletion scripts/hi-build/lib/build.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ const postcssFlexBugfix = require('postcss-flexbugs-fixes')
const cssnano = require('cssnano')
const autoprefixer = require('autoprefixer')
const json = require('@rollup/plugin-json')
const { visualizer } = require('rollup-plugin-visualizer')
// const injectCSSImport = require('./plugins/inject-css-import')
const cleanSCSS =require('./plugins/clean-scss')

Expand Down Expand Up @@ -95,6 +96,7 @@ const getRollupConfig = (input, outputPath, options, pkg) => {
cssModules = false,
preserved = true,
compress = false,
analysis = false,
} = options

const formats = formatOptions.split(',')
Expand Down Expand Up @@ -161,7 +163,8 @@ const getRollupConfig = (input, outputPath, options, pkg) => {
cleanSCSS(),
// !cssExtract && injectCSSImport(),
compress && terser(),
json()
json(),
...(analysis ? [visualizer()] : [])
].filter(Boolean),
}

Expand Down
1 change: 1 addition & 0 deletions scripts/hi-build/lib/cmd.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ const cmd = (callback) => {
.option('--source-maps', 'Generate source map', false)
.option('--css-extract', 'Turns on Extract css', false)
.option('--css-modules', 'Turns on css-modules', false)
.option('--analysis', 'Visualize and analyze your Rollup bundle', false)
.description('Build once and exit')
.action(action)

Expand Down
11 changes: 5 additions & 6 deletions scripts/hi-build/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@hi-ui/hi-build",
"version": "4.0.4",
"version": "4.1.0",
"description": "Now I’m the model of a modern major general / The venerated Virginian veteran whose men are all / Lining up, to put me up on a pedestal / Writin’ letters to relatives / Embellishin’ my elegance and eloquence / But the elephant is in the room / The truth is in ya face when ya hear the British cannons go / BOOM",
"keywords": [],
"author": "Flcwl <[email protected]>",
Expand Down Expand Up @@ -54,17 +54,16 @@
"postcss-nested": "^5.0.6",
"postcss-preset-env": "^7.4.3",
"postcss-simple-vars": "^6.0.3",
"rollup": "^2.70.1",
"rollup": "3.29.4",
"rollup-plugin-dts": "^4.2.0",
"rollup-plugin-extensions": "^0.1.0",
"rollup-plugin-peer-deps-external": "^2.2.4",
"rollup-plugin-postcss": "^4.0.2",
"rollup-plugin-terser": "^7.0.2"
"rollup-plugin-terser": "^7.0.2",
"rollup-plugin-visualizer": "^5.9.2"
},
"peerDependencies": {
"typescript": "^4.6.2"
},
"devDependencies": {

}
"devDependencies": {}
}
2,586 changes: 1,411 additions & 1,175 deletions yarn.lock

Large diffs are not rendered by default.

0 comments on commit b587be1

Please sign in to comment.