@itwin/backend-webpack-tools 3.3.0-dev.80 → 3.3.0-dev.83

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.
@@ -13,11 +13,11 @@ function getWebpackConfig(srcFile, outDir, profile) {
13
13
  mode: process.env.NODE_ENV,
14
14
  // These are the "entry points" to our application.
15
15
  // This means they will be the "root" imports that are included in JS bundle.
16
- entry: [
17
- srcFile
18
- ],
16
+ entry: [srcFile],
19
17
  output: {
20
- libraryTarget: "commonjs2",
18
+ library: {
19
+ type: "commonjs2",
20
+ },
21
21
  // The build folder.
22
22
  // Next line is not used in dev but WebpackDevServer crashes without it:
23
23
  path: outDir,
@@ -39,7 +39,11 @@ function getWebpackConfig(srcFile, outDir, profile) {
39
39
  node: {
40
40
  __dirname: false,
41
41
  __filename: false,
42
- }
42
+ },
43
+ stats: process.env.NODE_ENV === "production" ? "errors-warnings" : "verbose",
44
+ externalsPresets: {
45
+ electron: true,
46
+ },
43
47
  };
44
48
  };
45
49
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@itwin/backend-webpack-tools",
3
- "version": "3.3.0-dev.80",
3
+ "version": "3.3.0-dev.83",
4
4
  "description": "Configuration and scripts for iTwin.js agents and backends.",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -15,17 +15,14 @@
15
15
  "backend-webpack-tools": "./bin/backend-webpack-tools.js"
16
16
  },
17
17
  "dependencies": {
18
- "@itwin/core-webpack-tools": "3.3.0-dev.80",
18
+ "@itwin/core-webpack-tools": "3.3.0-dev.83",
19
19
  "case-sensitive-paths-webpack-plugin": "^2.1.2",
20
20
  "chalk": "^3.0.0",
21
21
  "concurrently": "^3.6.1",
22
22
  "fs-extra": "^8.1.0",
23
23
  "glob": "^7.1.2",
24
24
  "nodemon": "^2.0.4",
25
- "null-loader": "^0.1.1",
26
- "readline": "^1.3.0",
27
- "source-map-loader": "^1.0.0",
28
- "webpack": "4.42.0",
25
+ "webpack": "^5.64.4",
29
26
  "yargonaut": "^1.1.2",
30
27
  "yargs": "^17.4.0"
31
28
  },
@@ -41,6 +41,7 @@ function runWebpackAsync(compiler) {
41
41
  async function runWebpackBuild(config, name) {
42
42
  const compiler = createCompiler(webpack, config, ` ${name} `, "Starting build...");
43
43
  const stats = await runWebpackAsync(compiler);
44
+ compiler.close(() => {});
44
45
  return stats;
45
46
  }
46
47