Skip to content

Commit

Permalink
feat: bump rsbuild to 1.0.0-alpha.9
Browse files Browse the repository at this point in the history
  • Loading branch information
fi3ework committed Jul 11, 2024
1 parent 264b10a commit 5c3b783
Show file tree
Hide file tree
Showing 7 changed files with 295 additions and 239 deletions.
7 changes: 4 additions & 3 deletions packages/builder-rsbuild/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@
"prep": "node --loader ../../scripts/node_modules/esbuild-register/loader.js -r ../../scripts/node_modules/esbuild-register/register.js ../../scripts/prepare/bundle.ts"
},
"dependencies": {
"@rsbuild/plugin-type-check": "0.7.9",
"@rsbuild/plugin-type-check": "1.0.0-alpha.9",
"@storybook/addon-docs": "^8.0.10",
"@storybook/channels": "^8.0.10",
"@storybook/client-logger": "^8.0.10",
Expand All @@ -83,14 +83,15 @@
"magic-string": "^0.30.5",
"path-browserify": "^1.0.1",
"process": "^0.11.10",
"rsbuild-plugin-html-minifier-terser": "^1.0.0",
"style-loader": "^3.3.1",
"ts-dedent": "^2.2.0",
"url": "^0.11.0",
"util": "^0.12.4",
"util-deprecate": "^1.0.2"
},
"devDependencies": {
"@rsbuild/core": "0.7.9",
"@rsbuild/core": "1.0.0-alpha.9",
"@types/express": "^4.17.21",
"@types/fs-extra": "^11.0.4",
"@types/node": "^18.0.0",
Expand All @@ -101,7 +102,7 @@
"typescript": "^5.3.2"
},
"peerDependencies": {
"@rsbuild/core": ">= 0.7.0"
"@rsbuild/core": ">= 1.0.0-alpha.9"
},
"peerDependenciesMeta": {
"typescript": {
Expand Down
26 changes: 15 additions & 11 deletions packages/builder-rsbuild/src/preview/iframe-rsbuild.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ import type { RsbuildConfig } from '@rsbuild/core'
import { webpack as docsWebpack } from '@storybook/addon-docs/dist/preset'
import { pluginTypeCheck } from '@rsbuild/plugin-type-check'
import type { TypescriptOptions } from '../types'
import { pluginHtmlMinifierTerser } from 'rsbuild-plugin-html-minifier-terser'

const getAbsolutePath = <I extends string>(input: I): I =>
dirname(require.resolve(join(input, 'package.json'))) as any
Expand Down Expand Up @@ -211,9 +212,10 @@ export default async (
},
},
},
plugins: [shouldCheckTs ? pluginTypeCheck(tsCheckOptions) : null].filter(
Boolean,
),
plugins: [
shouldCheckTs ? pluginTypeCheck(tsCheckOptions) : null,
pluginHtmlMinifierTerser(),
].filter(Boolean),
tools: {
rspack: (config, { addRules, appendPlugins, rspack, mergeConfig }) => {
// TODO: Rspack doesn't support `unknownContextCritical` yet
Expand Down Expand Up @@ -310,14 +312,16 @@ export default async (
headHtmlSnippet,
bodyHtmlSnippet,
},
minify: {
collapseWhitespace: true,
removeComments: true,
removeRedundantAttributes: true,
removeScriptTypeAttributes: false,
removeStyleLinkTypeAttributes: true,
useShortDoctype: true,
},
// FIXME: rsbuild stop supporting html minimizing since https://github.com/web-infra-dev/rsbuild/commit/848a57c9e213c612a9b196899af10ec40907820f
// Track in https://github.com/rspack-contrib/rsbuild-plugin-html-minifier-terser/pull/1
// minify: {
// collapseWhitespace: true,
// removeComments: true,
// removeRedundantAttributes: true,
// removeScriptTypeAttributes: false,
// removeStyleLinkTypeAttributes: true,
// useShortDoctype: true,
// },
},
},
})
Expand Down
4 changes: 2 additions & 2 deletions packages/react-rsbuild/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -66,14 +66,14 @@
"tsconfig-paths": "^4.2.0"
},
"devDependencies": {
"@rsbuild/core": "0.7.9",
"@rsbuild/core": "1.0.0-alpha.9",
"@storybook/types": "^8.0.10",
"@types/resolve": "^1.20.6",
"add": "^2.0.6",
"typescript": "^5.3.2"
},
"peerDependencies": {
"@rsbuild/core": ">= 0.7.0",
"@rsbuild/core": ">= 1.0.0-alpha.9",
"react": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0-beta",
"react-dom": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0-beta",
"typescript": ">= 4.2.x"
Expand Down
4 changes: 2 additions & 2 deletions packages/vue3-rsbuild/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -56,12 +56,12 @@
"vue-docgen-loader": "^1.5.1"
},
"devDependencies": {
"@rsbuild/core": "0.7.9",
"@rsbuild/core": "1.0.0-alpha.9",
"@types/node": "^18.0.0",
"typescript": "^5.3.2"
},
"peerDependencies": {
"@rsbuild/core": ">= 0.7.0"
"@rsbuild/core": ">= 1.0.0-alpha.9"
},
"peerDependenciesMeta": {
"typescript": {
Expand Down
Loading

0 comments on commit 5c3b783

Please sign in to comment.