wip
This commit is contained in:
parent
4fce5d8066
commit
9d81d06853
26 changed files with 844 additions and 174 deletions
|
@ -33,7 +33,9 @@ const postcss = {
|
|||
},
|
||||
};
|
||||
|
||||
module.exports = {
|
||||
module.exports = Object.keys(isProduction ? locales : {
|
||||
'ja-JP': locales['ja-JP']
|
||||
}).map(lang => ({
|
||||
entry: {
|
||||
app: './src/client/init.ts',
|
||||
sw: './src/client/sw.ts'
|
||||
|
@ -131,7 +133,9 @@ module.exports = {
|
|||
new webpack.ProgressPlugin({}),
|
||||
new webpack.DefinePlugin({
|
||||
_VERSION_: JSON.stringify(meta.version),
|
||||
_LANG_: JSON.stringify(lang),
|
||||
_LANGS_: JSON.stringify(Object.entries(locales).map(([k, v]: [string, any]) => [k, v._lang_])),
|
||||
_LOCALE_: JSON.stringify(locales[lang]),
|
||||
_ENV_: JSON.stringify(process.env.NODE_ENV),
|
||||
_DEV_: process.env.NODE_ENV !== 'production',
|
||||
_PERF_PREFIX_: JSON.stringify('Misskey:'),
|
||||
|
@ -149,7 +153,7 @@ module.exports = {
|
|||
],
|
||||
output: {
|
||||
path: __dirname + '/built/client/assets',
|
||||
filename: `[name].${meta.version}.js`,
|
||||
filename: `[name].${meta.version}.${lang}.js`,
|
||||
publicPath: `/assets/`
|
||||
},
|
||||
resolve: {
|
||||
|
@ -169,4 +173,4 @@ module.exports = {
|
|||
},
|
||||
devtool: false, //'source-map',
|
||||
mode: isProduction ? 'production' : 'development'
|
||||
};
|
||||
}));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue