Patch Changes
-
Support
source.preEntry
. (#750)Add a script before the entry file of each page. This script will be executed before the page code.
It can be used to execute global logics, such as injecting polyfills, setting global styles, etc.example:
import { defineConfig } from '@lynx-js/rspeedy' export default defineConfig({ source: { preEntry: './src/polyfill.ts', }, })
-
Bump Rsbuild v1.3.20 with Rspack v1.3.10. (#799)
-
Add
callerName
option tocreateRspeedy
. (#757)It can be accessed by Rsbuild plugins through
api.context.callerName
, and execute different logic based on this identifier.export const myPlugin = { name: 'my-plugin', setup(api) { const { callerName } = api.context if (callerName === 'rslib') { // ... } else if (callerName === 'rspeedy') { // ... } }, }
-
Support
performance.buildCache
. (#766) -
Updated dependencies [
fbc4fbb
]:- @lynx-js/webpack-dev-transport@0.1.3