Skip to content

Commit

Permalink
feat(i18n): refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
fxy060608 committed Feb 24, 2021
1 parent 3f6eac4 commit 07c9f2a
Show file tree
Hide file tree
Showing 17 changed files with 316 additions and 342 deletions.
6 changes: 4 additions & 2 deletions build/rollup.config.mp.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
const path = require('path')
const path = require('path')
const json = require('@rollup/plugin-json')
const alias = require('@rollup/plugin-alias')
const replace = require('@rollup/plugin-replace')

Expand Down Expand Up @@ -71,7 +72,8 @@ module.exports = {
find: 'uni-helpers',
replacement: path.resolve(__dirname, '../src/core/helpers')
}]
}),
}),
json(),
replace({
__GLOBAL__: platform.prefix,
__PLATFORM_TITLE__: platform.title,
Expand Down
6 changes: 4 additions & 2 deletions build/rollup.config.qa.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
const path = require('path')
const path = require('path')
const json = require('@rollup/plugin-json')
const alias = require('@rollup/plugin-alias')
const replace = require('@rollup/plugin-replace')
const nodeResolve = require('@rollup/plugin-node-resolve')
Expand Down Expand Up @@ -56,7 +57,8 @@ alias({
find: 'uni-api-protocol',
replacement: resolve('src/core/helpers/protocol')
}]
}),
}),
json(),
nodeResolve(),
requireContext(),
commonjs(),
Expand Down
6 changes: 4 additions & 2 deletions build/rollup.config.service.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
const path = require('path')
const path = require('path')
const json = require('@rollup/plugin-json')
const alias = require('@rollup/plugin-alias')
const replace = require('@rollup/plugin-replace')

Expand All @@ -23,7 +24,8 @@ module.exports = {
replacement: path.resolve(__dirname, '../src/core/helpers')
}
]
}),
}),
json(),
replace({
__GLOBAL__: 'getGlobalUni()',
__PLATFORM_TITLE__: 'app-plus-nvue'
Expand Down
Loading

0 comments on commit 07c9f2a

Please sign in to comment.