Copy of translated errors for js/ts web build
This commit is contained in:
parent
d29388d255
commit
52bdc14cc6
1 changed files with 27 additions and 0 deletions
|
@ -12,6 +12,22 @@ const Terser = require('terser');
|
|||
|
||||
const withBrowserDefaults = require('../shared.webpack.config').browser;
|
||||
|
||||
const languages = [
|
||||
'zh-tw',
|
||||
'cs',
|
||||
'de',
|
||||
'es',
|
||||
'fr',
|
||||
'it',
|
||||
'ja',
|
||||
'ko',
|
||||
'pl',
|
||||
'pt-br',
|
||||
'ru',
|
||||
'tr',
|
||||
'zh-cn',
|
||||
];
|
||||
|
||||
module.exports = withBrowserDefaults({
|
||||
context: __dirname,
|
||||
entry: {
|
||||
|
@ -26,6 +42,17 @@ module.exports = withBrowserDefaults({
|
|||
to: 'typescript-web/',
|
||||
flatten: true
|
||||
},
|
||||
{
|
||||
from: 'node_modules/typescript-web/lib/typesMap.json',
|
||||
to: 'typescript-web/'
|
||||
},
|
||||
...languages.map(lang => ({
|
||||
from: `node_modules/typescript-web/lib/${lang}/**/*`,
|
||||
to: 'typescript-web/',
|
||||
transformPath: (targetPath) => {
|
||||
return targetPath.replace(/node_modules[\/\\]typescript-web[\/\\]lib/, '');
|
||||
}
|
||||
}))
|
||||
],
|
||||
}),
|
||||
// @ts-ignore
|
||||
|
|
Loading…
Reference in a new issue