1.0.3 • Published 6 months ago

airport-clean-ls-loader v1.0.3

Weekly downloads
-
License
MIT
Repository
github
Last release
6 months ago

This is a package to use with airport-js or airport-react to remove unused languages in LS.

installation

  • Make sure you have typescript and webpack installed in your project
npm install -D airport-clean-ls-loader typescript webpack
yarn add -D airport-clean-ls-loader typescript webpack

Parameters

  • process.env.AIRPORT_CLEAN_LS_FN_NAME: function name to check LS. Usually the name of the function created using createLSFactory(). default is createLS
  • process.env.AIRPORT_CLEAN_LS_LANGS_TO_REMOVE: insert language codes to delete combined with ,

Example Usage:

AIRPORT_CLEAN_LS_LANGS_TO_REMOVE=ko,en yarn build
// next.config.js

const moduleExports = {
  webpack: (config, { isServer, defaultLoaders, webpack }) => {
    config.module.rules.push({
      test: /\.tsx?$/,
      use: [{ loader: 'airport-clean-ls-loader' }],
    })

    return config
  },
}
1.0.3

6 months ago

1.0.2

6 months ago

1.0.1

6 months ago

1.0.0

6 months ago