diff options
author | ncls7615 <himasoto@gmail.com> | 2017-12-11 09:43:21 +0900 |
---|---|---|
committer | ncls7615 <himasoto@gmail.com> | 2017-12-11 09:43:21 +0900 |
commit | a98b0a47ef19f587da60907b68c5c5edfde432a0 (patch) | |
tree | 50a37fa1dc6aafb1210a441dd989605a646d3e21 /config/webpack/shared.js | |
parent | 0e567977923f2e7827192da0990d529859033f1a (diff) | |
parent | 26c9b9fa276fd629789fd06f65a5d698b182f67a (diff) |
Merge branch 'master' of https://github.com/glitch-soc/mastodon into glitch-langfiles
# Conflicts: # app/javascript/glitch/locales/ja.json
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), {}) ), |