From 8a588145d54c9b22ecf67048400f5aeee59372ea Mon Sep 17 00:00:00 2001 From: Yamagishi Kazutoshi Date: Sun, 5 Nov 2017 21:07:59 +0900 Subject: [PATCH] Update extract-text-webpack-plugin to version 3.0.2 (#5584) --- config/webpack/shared.js | 33 +++++++++++++++------------------ package.json | 2 +- yarn.lock | 12 ++++++------ 3 files changed, 22 insertions(+), 25 deletions(-) diff --git a/config/webpack/shared.js b/config/webpack/shared.js index 5ff267fc5..50fa48175 100644 --- a/config/webpack/shared.js +++ b/config/webpack/shared.js @@ -12,27 +12,24 @@ const localePackPaths = require('./generateLocalePacks'); const extensionGlob = `**/*{${settings.extensions.join(',')}}*`; const entryPath = join(settings.source_path, settings.source_entry_path); const packPaths = sync(join(entryPath, extensionGlob)); -const entryPacks = [...packPaths, ...localePackPaths].filter(path => path !== join(entryPath, 'custom.js')); - -const themePaths = Object.keys(themes).reduce( - (themePaths, name) => { - themePaths[name] = resolve(join(settings.source_path, themes[name])); - return themePaths; - }, {}); module.exports = { entry: Object.assign( - entryPacks.reduce( - (map, entry) => { - const localMap = map; - let namespace = relative(join(entryPath), dirname(entry)); - if (namespace === join('..', '..', '..', 'tmp', 'packs')) { - namespace = ''; // generated by generateLocalePacks.js - } - localMap[join(namespace, basename(entry, extname(entry)))] = resolve(entry); - return localMap; - }, {} - ), themePaths + packPaths.reduce((map, entry) => { + const localMap = map; + const namespace = relative(join(entryPath), dirname(entry)); + localMap[join(namespace, basename(entry, extname(entry)))] = resolve(entry); + return localMap; + }, {}), + localePackPaths.reduce((map, entry) => { + const localMap = map; + localMap[basename(entry, extname(entry, extname(entry)))] = resolve(entry); + return localMap; + }, {}), + Object.keys(themes).reduce((themePaths, name) => { + themePaths[name] = resolve(join(settings.source_path, themes[name])); + return themePaths; + }, {}) ), output: { diff --git a/package.json b/package.json index 1667f232d..cd088e5c0 100644 --- a/package.json +++ b/package.json @@ -48,7 +48,7 @@ "es6-symbol": "^3.1.1", "escape-html": "^1.0.3", "express": "^4.16.2", - "extract-text-webpack-plugin": "^2.1.2", + "extract-text-webpack-plugin": "^3.0.2", "file-loader": "^0.11.2", "font-awesome": "^4.7.0", "glob": "^7.1.1", diff --git a/yarn.lock b/yarn.lock index 4eae5663a..b7aa18a01 100644 --- a/yarn.lock +++ b/yarn.lock @@ -287,7 +287,7 @@ async@^1.4.0, async@^1.5.2: version "1.5.2" resolved "https://registry.yarnpkg.com/async/-/async-1.5.2.tgz#ec6a61ae56480c0c3cb241c95618e20892f9672a" -async@^2.1.2, async@^2.1.4, async@^2.1.5: +async@^2.1.2, async@^2.1.4, async@^2.1.5, async@^2.4.1: version "2.5.0" resolved "https://registry.yarnpkg.com/async/-/async-2.5.0.tgz#843190fd6b7357a0b9e1c956edddd5ec8462b54d" dependencies: @@ -2607,12 +2607,12 @@ extglob@^0.3.1: dependencies: is-extglob "^1.0.0" -extract-text-webpack-plugin@^2.1.2: - version "2.1.2" - resolved "https://registry.yarnpkg.com/extract-text-webpack-plugin/-/extract-text-webpack-plugin-2.1.2.tgz#756ef4efa8155c3681833fbc34da53b941746d6c" +extract-text-webpack-plugin@^3.0.2: + version "3.0.2" + resolved "https://registry.yarnpkg.com/extract-text-webpack-plugin/-/extract-text-webpack-plugin-3.0.2.tgz#5f043eaa02f9750a9258b78c0a6e0dc1408fb2f7" dependencies: - async "^2.1.2" - loader-utils "^1.0.2" + async "^2.4.1" + loader-utils "^1.1.0" schema-utils "^0.3.0" webpack-sources "^1.0.1"