diff options
author | beatrix <beatrix.bitrot@gmail.com> | 2017-12-10 15:41:22 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-12-10 15:41:22 -0500 |
commit | 26c9b9fa276fd629789fd06f65a5d698b182f67a (patch) | |
tree | 8480daa3428db3a2443ba45949a4182481e5ec16 /config/webpack/shared.js | |
parent | 282f48ddd1868fcd8fa2887bbaf13036c949c22d (diff) | |
parent | 64b839b76907e87c57d71762a81a9a8660f1df83 (diff) |
Merge pull request #246 from glitch-soc/theme-intl8n
Internationalization for flavours and skins
Diffstat (limited to 'config/webpack/shared.js')
-rw-r--r-- | config/webpack/shared.js | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/config/webpack/shared.js b/config/webpack/shared.js index e4b057ffb..35b9bbd1c 100644 --- a/config/webpack/shared.js +++ b/config/webpack/shared.js @@ -1,13 +1,12 @@ // Note: You must restart bin/webpack-dev-server for changes to take effect const webpack = require('webpack'); -const { basename, join, resolve } = require('path'); +const { join, resolve } = require('path'); const { sync } = require('glob'); const ExtractTextPlugin = require('extract-text-webpack-plugin'); const ManifestPlugin = require('webpack-manifest-plugin'); -const extname = require('path-complete-extname'); const { env, settings, core, flavours, output, loadersDir } = require('./configuration.js'); -const localePackPaths = require('./generateLocalePacks'); +const localePacks = require('./generateLocalePacks'); function reducePacks (data, into = {}) { if (!data.pack) { @@ -48,11 +47,7 @@ function reducePacks (data, into = {}) { module.exports = { entry: Object.assign( { locales: resolve('app', 'javascript', 'locales') }, - localePackPaths.reduce((map, entry) => { - const localMap = map; - localMap[basename(entry, extname(entry, extname(entry)))] = resolve(entry); - return localMap; - }, {}), + localePacks, reducePacks(core), Object.keys(flavours).reduce((map, entry) => reducePacks(flavours[entry], map), {}) ), |