Security News
Fluent Assertions Faces Backlash After Abandoning Open Source Licensing
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
@lingui/swc-plugin
Advanced tools
A Rust versions of LinguiJS Macro
Install plugin:
npm install --save-dev @lingui/swc-plugin
# or
yarn add -D @lingui/swc-plugin
You still need to install @lingui/macro
for typings support:
npm install @lingui/macro
# or
yarn add @lingui/macro
.swcrc
https://swc.rs/docs/configuration/swcrc
{
"$schema": "https://json.schemastore.org/swcrc",
"jsc": {
"experimental": {
"plugins": [
[
"@lingui/swc-plugin",
{
// Optional
// Unlike the JS version this option must be passed as object only.
// Docs https://lingui.dev/ref/conf#runtimeconfigmodule
// "runtimeModules": {
// "i18n": ["@lingui/core", "i18n"],
// "trans": ["@lingui/react", "Trans"]
// }
},
],
],
},
},
}
Or Next JS Usage:
next.config.js
/** @type {import('next').NextConfig} */
const nextConfig = {
reactStrictMode: true,
experimental: {
swcPlugins: [
['@lingui/swc-plugin', {
// the same options as in .swcrc
}],
],
},
};
module.exports = nextConfig;
Note Consult with full working example for NextJS in the
/examples
folder in this repo.
SWC Plugin support is still experimental. They do not guarantee a semver backwards compatibility between different swc-core
versions.
So you need to select an appropriate version of the plugin to match compatible swc_core
.
Plugin Version | used swc_core | Compatibility |
---|---|---|
0.1.0 , 4.0.0-next.0 | 0.52.8 | next@13.0.0 ~ next@13.2.3 |
0.2.* , 4.0.0-next.1 ~ 4.0.0-next.3 | 0.56.1 | @swc/core@1.3.29 ~ @swc/core@1.3.37 next@13.2.4-canary.0 ~ next@13.2.5-canary.5 |
4.0.0 | 0.75.33 | @swc/core@1.3.49 ~ @swc/core@1.3.57 next@v13.3.1-canary.12 ~ next@v13.4.3-canary.1 |
4.0.1 | 0.76.0 | broken due to lto = true |
4.0.2 | 0.76.41 | @swc/core@1.3.58 ~ @swc/core@1.3.62 next@v13.4.3-canary.2 ~ |
4.0.3 | 0.78.28 | @swc/core@1.3.63 ~ @swc/core@1.3.67 next@v13.4.8 ~ next@v13.4.10-canary.0 |
4.0.4 | 0.79.x | @swc/core@1.3.68 ~ @swc/core@1.3.80 next@v13.4.10-canary.1 ~ |
4.0.5 | 0.87.x | broken due incorrect version of swc_common |
4.0.6 | 0.87.x | @swc/core@1.3.81 ~ @swc/core@1.3.105 ~ next@v14.1.0 |
4.0.7 , 4.0.8 | 0.90.35 | @swc/core@1.4.0 ~ next@14.1.1-canary.52 ~ @rspack/core@0.6.0 ~ |
This table may become outdated. If you don't see a particular version of @swc/core
or next
check the compatibility by referring to the upstream's Selecting the version article.
This will help you select the appropriate plugin version for your project.
Note next
v13.2.4
~v13.3.1
cannot execute SWC Wasm plugins, due to a bug of next-swc.next
v13.4.3
~v13.4.5-canary.7
cannot execute SWC Wasm plugins, due to missing filesystem cache.
0.1.0
~ 0.*
compatible with @lingui/core@3.*
4.*
compatible with @lingui/core@4.*
The project is licensed under the MIT license.
FAQs
A SWC Plugin for LinguiJS
The npm package @lingui/swc-plugin receives a total of 38,976 weekly downloads. As such, @lingui/swc-plugin popularity was classified as popular.
We found that @lingui/swc-plugin demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
Research
Security News
Socket researchers uncover the risks of a malicious Python package targeting Discord developers.
Security News
The UK is proposing a bold ban on ransomware payments by public entities to disrupt cybercrime, protect critical services, and lead global cybersecurity efforts.