Closed jianghai closed 7 years ago
const text = require('./lang/' + process.env.LANG)
webpack配置
config.plugins.push(new webpack.DefinePlugin({ 'process.env': { 'LANG': JSON.stringify('en') } }))
想了下,组件内部还是不集成国际化了,外部可以全局配置,以 Select placeholder 为例
import { Select } from 'bfd/Select' Object.assign(Select.defaultProps, { placeholder: 'xxxx' })
webpack配置