mirror of
https://github.com/misode/misode.github.io.git
synced 2026-04-23 15:17:09 +00:00
Add language support
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
const CopyWebpackPlugin = require('copy-webpack-plugin')
|
||||
const HtmlWebpackPlugin = require('html-webpack-plugin')
|
||||
const MergeJsonWebpackPlugin = require("merge-jsons-webpack-plugin");
|
||||
|
||||
module.exports = (env, argv) => ({
|
||||
entry: './src/app/app.ts',
|
||||
@@ -19,20 +20,23 @@ module.exports = (env, argv) => ({
|
||||
plugins: [
|
||||
new CopyWebpackPlugin({
|
||||
patterns: [
|
||||
{
|
||||
from: 'src/locales',
|
||||
to: 'locales/app'
|
||||
},
|
||||
{
|
||||
from: 'node_modules/minecraft-schemas/src/locales',
|
||||
to: 'locales/schema'
|
||||
},
|
||||
{
|
||||
from: 'src/styles',
|
||||
to: 'styles'
|
||||
}
|
||||
]
|
||||
}),
|
||||
new MergeJsonWebpackPlugin({
|
||||
debug: true,
|
||||
output: {
|
||||
groupBy: [ 'de', 'en', 'fr', 'it', 'ja', 'pt', 'ru', 'zh-cn' ].map(code => (
|
||||
{
|
||||
pattern: `{./src/locales/${code}.json,./node_modules/minecraft-schemas/src/locales/${code}.json}`,
|
||||
fileName: `./locales/${code}.json`
|
||||
}
|
||||
))
|
||||
}
|
||||
}),
|
||||
new HtmlWebpackPlugin({
|
||||
title: 'Minecraft Generators',
|
||||
filename: 'index.html',
|
||||
|
||||
Reference in New Issue
Block a user