razzle-plugin-swc
This package contains a plugin for using SWC with Razzle
Usage in Razzle Projects
yarn add razzle-plugin-swc --dev
With the default options
// razzle.config.js moduleexports = plugins: 'swc';
With custom options
// razzle.config.js moduleexports = plugins: name: 'swc' options: "jsc": "parser": "syntax": "ecmascript" "jsx": true "dynamicImport": false "numericSeparator": false "classPrivateProperty": false "privateMethod": false "classProperty": false "functionBind": false "exportDefaultFrom": false "exportNamespaceFrom": false "decorators": false "decoratorsBeforeExport": false "nullishCoalescing": false "importMeta": false "optionalChaining": false ;
With custom options using .swcrc
// .swcrc "jsc": "parser": "syntax": "ecmascript" "jsx": true "dynamicImport": false "numericSeparator": false "classPrivateProperty": false "privateMethod": false "classProperty": false "functionBind": false "exportDefaultFrom": false "exportNamespaceFrom": false "decorators": false "decoratorsBeforeExport": false "nullishCoalescing": false "importMeta": false "optionalChaining": false
To run the example
cd example/NODE_ENV=development yarn installyarn run start