Change singleton shared modules to match web app
This commit is contained in:
parent
b9e2263cb5
commit
f261038936
1 changed files with 3 additions and 6 deletions
|
@ -11,8 +11,6 @@ const tsTransformer = require('@formatjs/ts-transformer');
|
||||||
|
|
||||||
const PLUGIN_ID = require('../plugin.json').id;
|
const PLUGIN_ID = require('../plugin.json').id;
|
||||||
|
|
||||||
const packageJson = require('./package.json');
|
|
||||||
|
|
||||||
const NPM_TARGET = process.env.npm_lifecycle_event; //eslint-disable-line no-process-env
|
const NPM_TARGET = process.env.npm_lifecycle_event; //eslint-disable-line no-process-env
|
||||||
const TARGET_IS_PRODUCT = NPM_TARGET === 'start:product' || NPM_TARGET === 'build:product';
|
const TARGET_IS_PRODUCT = NPM_TARGET === 'start:product' || NPM_TARGET === 'build:product';
|
||||||
|
|
||||||
|
@ -134,12 +132,11 @@ if (TARGET_IS_PRODUCT) {
|
||||||
const sharedObject = {};
|
const sharedObject = {};
|
||||||
|
|
||||||
for (const packageName of packageNames) {
|
for (const packageName of packageNames) {
|
||||||
const version = packageJson.dependencies[packageName];
|
// Set both versions to false so that the version of this module provided by the web app will be used
|
||||||
|
|
||||||
sharedObject[packageName] = {
|
sharedObject[packageName] = {
|
||||||
requiredVersion: version,
|
requiredVersion: false,
|
||||||
singleton: true,
|
singleton: true,
|
||||||
version,
|
version: false,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue