1.0.3 • Published 6 months ago
airport-clean-ls-loader v1.0.3
This is a package to use with airport-js
or airport-react
to remove unused languages in LS.
installation
- Make sure you have
typescript
andwebpack
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 usingcreateLSFactory()
. default iscreateLS
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
},
}