New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

localization-resolver

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

localization-resolver

可根据区域实现个性化需求

latest
npmnpm
Version
1.0.3
Version published
Maintainers
1
Created
Source

LOCALIZATION-RESOLVER V1.0.0

此库主要针对于webpack resolve plugins插件

如何使用

安装

npm install localization-resolver --D

如何使用:

1、webpack 配置

const LocalizationResolver = require('localization-resolver')
module.exports = {
	resolve: [
      new LocalizationResolver()
	]
}

2、如何实现个性化

在咱们产品开发过程中,有可能会因为一些地区或者某些特殊情况,会需要一些功能个性化的改造,这时就可以用到我们这个插件。

第一步:我们需要设置一个环境变量,如下图所示:

1635864796(1)

第二步:在咱们代码中创建一个特例文件,如图下所示:

1635864166(1)

此时webpack 就会去编译下面这个特例文件,这时咱们就实现了功能的个性化需求啦!

Keywords

localization

FAQs

Package last updated on 03 Nov 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts