1.1.5 • Published 1 year ago

esbuild-plugin-i18next-loader v1.1.5

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

MIT Version CI

esbuild-plugin-i18next-loader

esbuild plugin to client bundle i18next locales.

This plugin generates a virtual module that contains all the locales that are available in the project.

It is a rewrite of alienfast/vite-plugin-i18next-loader to work with esbuild.

Install

npm install --save-dev esbuild-plugin-i18next-loader

# or
pnpm add -D esbuild-plugin-i18next-loader

# or
yarn add -D esbuild-plugin-i18next-loader

Options

NameTypeDefaultDescription
include('**/*.json' \| '**/*.yml' \| '**/*.yaml')[]['**/*.json', '**/*.yml', '**/*.yaml']Glob patterns of files to include for bundling.
namespaceResolutionbasename, relativePathnoneNamespace resolution strategy.
pathsstring[][]Locale top-level directory paths.

Usage with esbuild

import { i18nextPlugin } from 'esbuild-plugin-i18next-loader';

await esbuild.build({
  entryPoints: ['./src/index.ts'],
  write: true,
  bundle: true,
  plugins: [
    i18nextPlugin({
      namespaceResolution: 'basename',
      paths: ['./src/**/locales'],
    }),
  ],
});

LICENSE

MIT

1.1.5

1 year ago

1.1.4

1 year ago

1.1.3

1 year ago

1.1.2

1 year ago

1.1.1

1 year ago

1.1.0

1 year ago

1.0.3

2 years ago

1.0.2

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago

0.0.0

2 years ago