4bbf9b6c70
### What? Safely drop `__nextjs_pure` from next internals in transform ```js import {__nextjs_pure} from 'next/dist/build/swc/helpers' __nextjs_pure(console.log("test!")) ``` becomes ```js /*#__PURE__*/ console.log("test!"); ``` so it will be dropped by the minifier - terser and swc minifier will both work. ### Why? Adding pure comments from JS world with swc transform is complex. This would be a helper for the case if we want to create "pure" expressions. ### How? Closes WEB-1829 --------- Co-authored-by: Jiachi Liu <inbox@huozhi.im> |
||
---|---|---|
.. | ||
crates | ||
native | ||
package.json | ||
README.md |
@next/swc
This package is responsible for swc compilation customized for next.js
Development
Run tests
cargo test
# Update snapshots and fixtures for tests
UPDATE=1 cargo test
Format code before submitting code
cargo fmt
Build the binary to integrate with next.js
pnpm build-native