diff options
author | Thibaut Girka <thib@sitedethib.com> | 2019-03-16 13:52:55 +0100 |
---|---|---|
committer | Thibaut Girka <thib@sitedethib.com> | 2019-03-16 14:14:20 +0100 |
commit | 4df3b7cb067797982199c3e613ba32a9c7474348 (patch) | |
tree | bf237d385411f73e670af4c744d8239ab4799434 /config/webpack/shared.js | |
parent | c2fa0f7c40bcc4064e8baaa221665eadd391c001 (diff) | |
parent | 1a0d3c9c65d663210494ec9b55912debad6331f5 (diff) |
Merge branch 'master' into glitch-soc/merge-upstream
Conflicts: - app/controllers/settings/follower_domains_controller.rb Removed upstream. Did the same here. Maybe we should not have? - config/locales/en.yml Upstream removed the “Authorized followers” page and associated translations. This is too close in the file to our glitch-soc-specific “flavour” string. No actual conflict. - config/locales/ja.yml Same as above. - config/locales/pl.yml Same as above. - config/navigation.rb No real conflict. New route added too close to the glitch-soc-specific “flavours” one. - config/webpack/configuration.js Upstream refactored the webpack(er) configuration quite a bit. Tried to keep up. - config/webpack/loaders/babel.js Upstream refactored the webpack(er) configuration quite a bit. Tried to keep up. The contents of this file have been moved to package.json. - config/webpack/shared.js Upstream refactored the webpack(er) configuration quite a bit. Tried to keep up. - config/webpacker.yml Upstream refactored the webpack(er) configuration quite a bit. Tried to keep up. - jest.config.js The contents of this file have been moved to package.json. - package.json Upstream refactored the webpack(er) configuration quite a bit. Tried to keep up. - yarn.lock Upstream refactored the webpack(er) configuration quite a bit. Tried to keep up.
Diffstat (limited to 'config/webpack/shared.js')
-rw-r--r-- | config/webpack/shared.js | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/config/webpack/shared.js b/config/webpack/shared.js index 938bab9f5..b6e2537b1 100644 --- a/config/webpack/shared.js +++ b/config/webpack/shared.js @@ -5,7 +5,8 @@ const { basename, dirname, join, relative, resolve } = require('path'); const { sync } = require('glob'); const MiniCssExtractPlugin = require('mini-css-extract-plugin'); const AssetsManifestPlugin = require('webpack-assets-manifest'); -const { env, settings, core, flavours, output, loadersDir } = require('./configuration.js'); +const { env, settings, core, flavours, output } = require('./configuration.js'); +const rules = require('./rules'); const localePacks = require('./generateLocalePacks'); function reducePacks (data, into = {}) { @@ -56,8 +57,9 @@ module.exports = { entry: entries, output: { - filename: '[name].js', - chunkFilename: '[name].js', + filename: 'js/[name]-[chunkhash].js', + chunkFilename: 'js/[name]-[chunkhash].chunk.js', + hotUpdateChunkFilename: 'js/[id]-[hash].hot-update.js', path: output.path, publicPath: output.publicPath, }, @@ -85,7 +87,7 @@ module.exports = { }, module: { - rules: sync(join(loadersDir, '*.js')).map(loader => require(loader)), + rules: Object.keys(rules).map(key => rules[key]), }, plugins: [ @@ -98,11 +100,14 @@ module.exports = { } ), new MiniCssExtractPlugin({ - filename: env.NODE_ENV === 'production' ? '[name]-[contenthash].css' : '[name].css', + filename: 'css/[name]-[contenthash:8].css', + chunkFilename: 'css/[name]-[contenthash:8].chunk.css', }), new AssetsManifestPlugin({ - publicPath: true, + integrity: false, + entrypoints: true, writeToDisk: true, + publicPath: true, }), ], |