@openmrs/webpack-config 6.3.1-pre.3105 → 6.3.1-pre.3119
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +3 -0
- package/package.json +1 -1
- package/src/index.ts +3 -0
package/dist/index.js
CHANGED
|
@@ -57,6 +57,7 @@ const production = 'production';
|
|
|
57
57
|
const { ModuleFederationPlugin } = webpack_1.container;
|
|
58
58
|
function getFrameworkVersion() {
|
|
59
59
|
try {
|
|
60
|
+
// eslint-disable-next-line @typescript-eslint/no-require-imports
|
|
60
61
|
const { version } = require('@openmrs/esm-framework/package.json');
|
|
61
62
|
return `^${version}`;
|
|
62
63
|
}
|
|
@@ -134,6 +135,7 @@ exports.watchConfig = {};
|
|
|
134
135
|
exports.optimizationConfig = {};
|
|
135
136
|
exports.default = (env, argv = {}) => {
|
|
136
137
|
const root = process.cwd();
|
|
138
|
+
// eslint-disable-next-line @typescript-eslint/no-require-imports
|
|
137
139
|
const { name, version, peerDependencies, browser, main, types } = require((0, path_1.resolve)(root, 'package.json'));
|
|
138
140
|
// this typing is provably incorrect, but actually works
|
|
139
141
|
const mode = (argv.mode || process.env.NODE_ENV || 'development');
|
|
@@ -256,6 +258,7 @@ exports.default = (env, argv = {}) => {
|
|
|
256
258
|
import: 'swr/',
|
|
257
259
|
shareKey: 'swr/',
|
|
258
260
|
shareScope: 'default',
|
|
261
|
+
// eslint-disable-next-line @typescript-eslint/no-require-imports
|
|
259
262
|
version: require('swr/package.json').version,
|
|
260
263
|
};
|
|
261
264
|
}
|
package/package.json
CHANGED
package/src/index.ts
CHANGED
|
@@ -64,6 +64,7 @@ const { ModuleFederationPlugin } = container;
|
|
|
64
64
|
|
|
65
65
|
function getFrameworkVersion() {
|
|
66
66
|
try {
|
|
67
|
+
// eslint-disable-next-line @typescript-eslint/no-require-imports
|
|
67
68
|
const { version } = require('@openmrs/esm-framework/package.json');
|
|
68
69
|
return `^${version}`;
|
|
69
70
|
} catch {
|
|
@@ -153,6 +154,7 @@ export const optimizationConfig: Partial<WebpackConfiguration['optimization']> =
|
|
|
153
154
|
|
|
154
155
|
export default (env: Record<string, string>, argv: Record<string, string> = {}) => {
|
|
155
156
|
const root = process.cwd();
|
|
157
|
+
// eslint-disable-next-line @typescript-eslint/no-require-imports
|
|
156
158
|
const { name, version, peerDependencies, browser, main, types } = require(resolve(root, 'package.json'));
|
|
157
159
|
// this typing is provably incorrect, but actually works
|
|
158
160
|
const mode = (argv.mode || process.env.NODE_ENV || 'development') as WebpackConfiguration['mode'];
|
|
@@ -305,6 +307,7 @@ export default (env: Record<string, string>, argv: Record<string, string> = {})
|
|
|
305
307
|
import: 'swr/',
|
|
306
308
|
shareKey: 'swr/',
|
|
307
309
|
shareScope: 'default',
|
|
310
|
+
// eslint-disable-next-line @typescript-eslint/no-require-imports
|
|
308
311
|
version: require('swr/package.json').version,
|
|
309
312
|
};
|
|
310
313
|
} else {
|