Родитель
30fef82329
Коммит
33d5e8f67e
|
@ -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.
|
||||
|
|
Загрузка…
Ссылка в новой задаче