@openmrs/webpack-config 6.3.1-pre.2961 → 6.3.1-pre.2986

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 CHANGED
@@ -185,7 +185,11 @@ exports.default = (env, argv = {}) => {
185
185
  cssLoader,
186
186
  {
187
187
  loader: require.resolve('sass-loader'),
188
- options: { sassOptions: { quietDeps: true } },
188
+ options: {
189
+ api: 'modern-compiler',
190
+ implementation: require.resolve('sass-embedded'),
191
+ sassOptions: { quietDeps: true },
192
+ },
189
193
  },
190
194
  ],
191
195
  }, exports.scssRuleConfig),
@@ -245,12 +249,12 @@ exports.default = (env, argv = {}) => {
245
249
  if (depName === 'swr') {
246
250
  // SWR is annoying with Module Federation
247
251
  // See: https://github.com/webpack/webpack/issues/16125 and https://github.com/vercel/swr/issues/2356
248
- obj['swr/'] = {
252
+ obj['swr/_internal'] = {
249
253
  requiredVersion: (_a = peerDependencies['swr']) !== null && _a !== void 0 ? _a : false,
250
254
  strictVersion: false,
251
255
  singleton: true,
252
- import: 'swr/',
253
- shareKey: 'swr/',
256
+ import: 'swr/_internal',
257
+ shareKey: 'swr/_internal',
254
258
  shareScope: 'default',
255
259
  version: require('swr/package.json').version,
256
260
  };
package/package.json CHANGED
@@ -1,9 +1,9 @@
1
1
  {
2
2
  "name": "@openmrs/webpack-config",
3
- "version": "6.3.1-pre.2961",
3
+ "version": "6.3.1-pre.2986",
4
4
  "license": "MPL-2.0",
5
5
  "main": "dist/index.js",
6
- "types": "src/index.ts",
6
+ "types": "dist/index.d.ts",
7
7
  "engines": {
8
8
  "node": ">= 12.0.0"
9
9
  },
@@ -31,27 +31,27 @@
31
31
  ],
32
32
  "homepage": "https://github.com/openmrs/openmrs-esm-core#readme",
33
33
  "dependencies": {
34
- "@swc/core": "^1.3.58",
34
+ "@swc/core": "^1.11.29",
35
35
  "clean-webpack-plugin": "^4.0.0",
36
36
  "copy-webpack-plugin": "^11.0.0",
37
37
  "css-loader": "^5.2.7",
38
38
  "fork-ts-checker-webpack-plugin": "^6.5.3",
39
39
  "lodash": "^4.17.21",
40
40
  "lodash-es": "^4.17.21",
41
- "sass": "1.64.2",
42
- "sass-loader": "^12.3.0",
41
+ "sass-embedded": "^1.89.0",
42
+ "sass-loader": "^16.0.5",
43
43
  "style-loader": "^3.3.4",
44
44
  "swc-loader": "^0.2.6",
45
- "webpack": "^5.88.0",
46
- "webpack-bundle-analyzer": "^4.5.0",
47
- "webpack-stats-plugin": "^1.0.3"
45
+ "webpack": "^5.99.9",
46
+ "webpack-bundle-analyzer": "^4.10.2",
47
+ "webpack-stats-plugin": "^1.1.3"
48
48
  },
49
49
  "peerDependencies": {
50
50
  "webpack": "5.x"
51
51
  },
52
52
  "devDependencies": {
53
53
  "@types/lodash-es": "^4.17.12",
54
- "typescript": "^4.9.5"
54
+ "typescript": "^4.7.0"
55
55
  },
56
56
  "stableVersion": "6.3.0"
57
57
  }
package/src/index.ts CHANGED
@@ -54,8 +54,9 @@ import {
54
54
  import { BundleAnalyzerPlugin } from 'webpack-bundle-analyzer';
55
55
  import { StatsWriterPlugin } from 'webpack-stats-plugin';
56
56
 
57
- type OpenmrsWebpackConfig = Omit<Partial<WebpackConfiguration>, 'module'> & {
57
+ type OpenmrsWebpackConfig = Omit<Partial<WebpackConfiguration>, 'module' | 'output'> & {
58
58
  module: ModuleOptions;
59
+ output: Partial<WebpackConfiguration['output']>;
59
60
  };
60
61
 
61
62
  const production = 'production';
@@ -216,7 +217,11 @@ export default (env: Record<string, string>, argv: Record<string, string> = {})
216
217
  cssLoader,
217
218
  {
218
219
  loader: require.resolve('sass-loader'),
219
- options: { sassOptions: { quietDeps: true } },
220
+ options: {
221
+ api: 'modern-compiler',
222
+ implementation: require.resolve('sass-embedded'),
223
+ sassOptions: { quietDeps: true },
224
+ },
220
225
  },
221
226
  ],
222
227
  },
@@ -293,12 +298,12 @@ export default (env: Record<string, string>, argv: Record<string, string> = {})
293
298
  if (depName === 'swr') {
294
299
  // SWR is annoying with Module Federation
295
300
  // See: https://github.com/webpack/webpack/issues/16125 and https://github.com/vercel/swr/issues/2356
296
- obj['swr/'] = {
301
+ obj['swr/_internal'] = {
297
302
  requiredVersion: peerDependencies['swr'] ?? false,
298
303
  strictVersion: false,
299
304
  singleton: true,
300
- import: 'swr/',
301
- shareKey: 'swr/',
305
+ import: 'swr/_internal',
306
+ shareKey: 'swr/_internal',
302
307
  shareScope: 'default',
303
308
  version: require('swr/package.json').version,
304
309
  };