@dotcom-tool-kit/webpack 4.0.1 → 4.1.0
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/lib/tasks/webpack.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { type WebpackSchema } from '@dotcom-tool-kit/schemas/lib/tasks/webpack';
|
|
2
|
-
import { Task } from '@dotcom-tool-kit/base';
|
|
2
|
+
import { Task, TaskRunContext } from '@dotcom-tool-kit/base';
|
|
3
3
|
export default class Webpack extends Task<{
|
|
4
4
|
task: typeof WebpackSchema;
|
|
5
5
|
}> {
|
|
6
|
-
run(): Promise<void>;
|
|
6
|
+
run({ cwd }: TaskRunContext): Promise<void>;
|
|
7
7
|
}
|
|
8
8
|
//# sourceMappingURL=webpack.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"webpack.d.ts","sourceRoot":"","sources":["../../src/tasks/webpack.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,aAAa,EAAE,MAAM,4CAA4C,CAAA;AAC/E,OAAO,EAAE,IAAI,EAAE,MAAM,uBAAuB,CAAA;
|
|
1
|
+
{"version":3,"file":"webpack.d.ts","sourceRoot":"","sources":["../../src/tasks/webpack.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,aAAa,EAAE,MAAM,4CAA4C,CAAA;AAC/E,OAAO,EAAE,IAAI,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAA;AAM5D,MAAM,CAAC,OAAO,OAAO,OAAQ,SAAQ,IAAI,CAAC;IAAE,IAAI,EAAE,OAAO,aAAa,CAAA;CAAE,CAAC;IACjE,GAAG,CAAC,EAAC,GAAG,EAAC,EAAE,cAAc,GAAG,OAAO,CAAC,IAAI,CAAC;CAuBhD"}
|
package/lib/tasks/webpack.js
CHANGED
|
@@ -5,7 +5,7 @@ const logger_1 = require("@dotcom-tool-kit/logger");
|
|
|
5
5
|
const child_process_1 = require("child_process");
|
|
6
6
|
const webpackCLIPath = require.resolve('webpack-cli/bin/cli');
|
|
7
7
|
class Webpack extends base_1.Task {
|
|
8
|
-
async run() {
|
|
8
|
+
async run({ cwd }) {
|
|
9
9
|
this.logger.info('starting Webpack...');
|
|
10
10
|
const args = ['build', '--color', `--mode=${this.options.envName}`];
|
|
11
11
|
if (this.options.configPath) {
|
|
@@ -20,7 +20,7 @@ class Webpack extends base_1.Task {
|
|
|
20
20
|
// default in OpenSSL 3: https://github.com/webpack/webpack/issues/14532
|
|
21
21
|
execArgv = [...execArgv, '--openssl-legacy-provider'];
|
|
22
22
|
}
|
|
23
|
-
const child = (0, child_process_1.fork)(webpackCLIPath, args, { silent: true, execArgv });
|
|
23
|
+
const child = (0, child_process_1.fork)(webpackCLIPath, args, { silent: true, execArgv, cwd });
|
|
24
24
|
(0, logger_1.hookFork)(this.logger, 'webpack', child);
|
|
25
25
|
return (0, logger_1.waitOnExit)('webpack', child);
|
|
26
26
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dotcom-tool-kit/webpack",
|
|
3
|
-
"version": "4.0
|
|
3
|
+
"version": "4.1.0",
|
|
4
4
|
"main": "lib",
|
|
5
5
|
"description": "",
|
|
6
6
|
"author": "FT.com Platforms Team <platforms-team.customer-products@ft.com>",
|
|
@@ -17,9 +17,9 @@
|
|
|
17
17
|
"test": "cd ../../ ; npx jest --silent --projects plugins/webpack"
|
|
18
18
|
},
|
|
19
19
|
"dependencies": {
|
|
20
|
-
"@dotcom-tool-kit/base": "^1.
|
|
21
|
-
"@dotcom-tool-kit/error": "^4.0.
|
|
22
|
-
"@dotcom-tool-kit/logger": "^4.0.
|
|
20
|
+
"@dotcom-tool-kit/base": "^1.1.0",
|
|
21
|
+
"@dotcom-tool-kit/error": "^4.0.1",
|
|
22
|
+
"@dotcom-tool-kit/logger": "^4.0.1",
|
|
23
23
|
"webpack-cli": "^4.6.0",
|
|
24
24
|
"tslib": "^2.3.1"
|
|
25
25
|
},
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
"webpack": "4.x.x || 5.x.x"
|
|
29
29
|
},
|
|
30
30
|
"devDependencies": {
|
|
31
|
-
"@dotcom-tool-kit/schemas": "^1.
|
|
31
|
+
"@dotcom-tool-kit/schemas": "^1.2.0",
|
|
32
32
|
"@jest/globals": "^27.4.6",
|
|
33
33
|
"ts-node": "^10.0.0",
|
|
34
34
|
"webpack": "^4.42.1",
|