i18next-hmr
Advanced tools
Comparing version 3.0.0 to 3.0.1
@@ -7,4 +7,12 @@ ### Changelog | ||
#### [v3.0.0](https://github.com/felixmosh/i18next-hmr/compare/v2.0.1...v3.0.0) | ||
#### [v3.0.1](https://github.com/felixmosh/i18next-hmr/compare/v3.0.0...v3.0.1) | ||
- feat: add vite example [`b1332c1`](https://github.com/felixmosh/i18next-hmr/commit/b1332c18bfbd17cce28252b86a06390a2da01686) | ||
- build(deps): bump tough-cookie in /examples/react-i18next [`e300f5b`](https://github.com/felixmosh/i18next-hmr/commit/e300f5b1ed6fb39f824d30b3f96ac1677c9b36db) | ||
- build(deps): bump semver from 5.7.1 to 5.7.2 in /examples/vue-i18next [`1af7150`](https://github.com/felixmosh/i18next-hmr/commit/1af71506a96307fb06c190a9b59abcfdb851f8ff) | ||
### [v3.0.0](https://github.com/felixmosh/i18next-hmr/compare/v2.0.1...v3.0.0) | ||
> 12 September 2023 | ||
- Bump deps [`0b74d59`](https://github.com/felixmosh/i18next-hmr/commit/0b74d595a0fabf128767a33be776301f311bba84) | ||
@@ -11,0 +19,0 @@ - Add Vite tests [`62afadd`](https://github.com/felixmosh/i18next-hmr/commit/62afaddb2a24b9f848a858df45de8d6488c2136e) |
const { extractList, printList, reloadTranslations, log } = require('../utils'); | ||
module.exports = function applyViteClientHMR(i18nOrGetter) { | ||
export function applyViteClientHMR(i18nOrGetter) { | ||
if (import.meta.hot) { | ||
@@ -22,2 +22,2 @@ log('Client HMR has started'); | ||
} | ||
}; | ||
} |
interface VitePlugin { | ||
name: string; | ||
} | ||
export declare function I18NextHMRPlugin( | ||
export declare function i18nextHMRPlugin( | ||
options: { localesDir: string } | { localesDirs: string[] } | ||
): VitePlugin; |
const path = require('path'); | ||
module.exports = function i18nextHMRPlugin(options) { | ||
module.exports.i18nextHMRPlugin = function i18nextHMRPlugin(options) { | ||
let absoluteLocaleDirs = []; | ||
@@ -5,0 +5,0 @@ |
{ | ||
"name": "i18next-hmr", | ||
"version": "3.0.0", | ||
"version": "3.0.1", | ||
"description": "I18Next HMR🔥 webpack / vite plugin that allows reload translation resources instantly on the client & the server.", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
@@ -57,7 +57,7 @@ # i18next-hmr | ||
webpack: { | ||
client: typeof window !== 'undefined', // enabled client side HMR in webpack | ||
server: typeof window === 'undefined' // enabled server side HMR in webpack | ||
client: typeof window !== 'undefined', // enables client side HMR in webpack | ||
server: typeof window === 'undefined' // enables server side HMR in webpack | ||
}, | ||
vite: { | ||
client: typeof window !== 'undefined', // enabled client side HMR in Vite | ||
client: typeof window !== 'undefined', // enables client side HMR in Vite | ||
} | ||
@@ -72,19 +72,5 @@ })); | ||
<!-- prettier-ignore-start --> | ||
```js | ||
// server.js | ||
const express = require('express'); | ||
const port = process.env.PORT || 3000; | ||
(async () => { | ||
const server = express(); | ||
server.get('*', (req, res) => handle(req, res)); | ||
await server.listen(port); | ||
console.log(`> Ready on http://localhost:${port}`); | ||
})(); | ||
``` | ||
Start the app with `NODE_ENV=development` | ||
@@ -91,0 +77,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
40929
0
104