fixes #7468
This commit is contained in:
Rebecca Mullin 2019-01-23 12:30:48 -05:00 коммит произвёл GitHub
Родитель 30fef82329
Коммит 33d5e8f67e
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
4 изменённых файлов: 16 добавлений и 10 удалений

Просмотреть файл

@ -110,10 +110,6 @@ module.exports = {
'/$lang/review_guide',
],
// This is the public Mozilla user ID (similar to TASK_USER_ID in
// addons-server).
mozillaUserId: 4757633,
trackingEnabled: true,
trackingId: 'UA-36116321-7',

Просмотреть файл

@ -348,6 +348,10 @@ module.exports = {
// See the Discopane config for how this is currently used.
discoParamsToUse: [],
// This is the public Mozilla user ID (similar to TASK_USER_ID in
// addons-server).
mozillaUserId: 4757633,
// Feature flags.
//

Просмотреть файл

@ -9,6 +9,6 @@ module.exports = {
module: {
rules: [...getStyleRules({ bundleStylesWithJs: true }), ...getAssetRules()],
},
plugins: [...getPlugins()],
plugins: [...getPlugins({ includeLoadablePlugin: false })],
resolve: webpackProdConfig.resolve,
};

Просмотреть файл

@ -113,15 +113,14 @@ export function getRules({ babelOptions, bundleStylesWithJs = false } = {}) {
];
}
export function getPlugins({ excludeOtherAppLocales = true } = {}) {
export function getPlugins({
excludeOtherAppLocales = true,
includeLoadablePlugin = true,
} = {}) {
const appName = config.get('appName');
const clientConfig = getClientConfig(config);
const plugins = [
// We need this file to be written on disk so that our server code can read
// it. In development mode, webpack usually serves the file from memory but
// that's not what we want for this file.
new LoadablePlugin({ writeToDisk: true }),
new webpack.DefinePlugin({
CLIENT_CONFIG: JSON.stringify(clientConfig),
'process.env.NODE_ENV': JSON.stringify('production'),
@ -146,6 +145,13 @@ export function getPlugins({ excludeOtherAppLocales = true } = {}) {
}),
];
if (includeLoadablePlugin) {
// We need this file to be written on disk so that our server code can read
// it. In development mode, webpack usually serves the file from memory but
// that's not what we want for this file.
plugins.push(new LoadablePlugin({ writeToDisk: true }));
}
if (excludeOtherAppLocales) {
plugins.push(
// This allow us to exclude locales for other apps being built.