@aofl/i18n-auto-id-loader

Generates tt-tags and inserts them as the 1st argument to __, _c fucntion calls

Usage no npm install needed!

<script type="module">
  import aoflI18nAutoIdLoader from 'https://cdn.skypack.dev/@aofl/i18n-auto-id-loader';
</script>

README

@aofl/i18n-auto-id-loader

The @aofl/i18n-auto-id-loader generates unique IDs and inserts them as the 1st argument to __, _c fucntion calls in the source files.

Getting started

Run npm i -D @aofl/i18n-auto-id-loader

Then add the loader to your webpack config:

module: {
  rules: [
    {
      test: /\.js$/,
      use: [
        {
          loader: '@aofl/i18n-auto-id-loader',
          options: {
            cache: true
          }
        }
      ],
      enforce: 'pre'
    }
  ]
}