Skip to content

Parcel v2 transformer to import .po files as JSON

Notifications You must be signed in to change notification settings

alexeyraspopov/parcel-transformer-po

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 

Repository files navigation

parcel-transformer-po

Parcel v2 transformer that allows importing .po files as compiled JSON.

Usage

Install the transformer

npm install parcel-transformer-po

Add the transformer to Parcel config

{
  "transformers": {
    "*.po": ["parcel-transformer-po"]
  }
}

Import .po files from JavaScript code

import uk from './locales/uk.po';
import { addLocale } from 'ttag';

addLocale('uk', uk);