
"In previous versions, SWC Wasm plugins faced high upgrade costs due to the evolving AST structure, causing existing plugins to break after SWC upgrades. To address this, the Rspack team contributed compatibility improvements to the SWC community, including adopting the cbor serialization scheme to replace the version-sensitive rkyv, and introducing an Unknown variant for enum types in the AST to improve fault tolerance. From Rspack 1.7 onwards, SWC upgrades are unlikely to break existing plugins built with older SWC versions."
"Rspack 1.7 introduces several stabilizing improvements, including enhanced SWC plugin compatibility, native support for importing assets as bytes, and the solidifying of multiple experimental features. Rspack now natively supports the Import Bytes proposal for importing assets as bytes. Developers can import assets as Uint8Array and decode them with TextDecoder. The syntax follows the standard import with attributes pattern: import fileBytes from './file.bin' with { type: 'bytes' }; const decoder = new TextDecoder('utf-8'); const text = decoder.decode(fileBytes);"
Rspack 1.7 is the final minor release in the 1.x series before transitioning to version 2.0, focusing on stabilizing existing features and plugin compatibility. The release improves SWC Wasm plugin compatibility by contributing cbor serialization to replace rkyv and adding an Unknown enum variant to tolerate AST changes, reducing plugin breakage across SWC upgrades. Native support for the Import Bytes proposal allows importing assets as Uint8Array and decoding them with TextDecoder using import ... with { type: 'bytes' }. Lazy compilation is enabled by default for dynamically imported modules to reduce initial build size and speed dev server startup, with an option to disable via lazyCompilation: false. Multiple experimental features were solidified.
Read at InfoQ
Unable to calculate read time
Collection
[
|
...
]