@utoo/pack 1.1.7 → 1.1.8-rc.2
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.
|
@@ -9,6 +9,16 @@ function readWebpackConfig(projectPath, rootPath) {
|
|
|
9
9
|
const projectPathOutOfRoot = projectPath === undefined
|
|
10
10
|
? process.cwd()
|
|
11
11
|
: path_1.default.join(rootPath !== null && rootPath !== void 0 ? rootPath : "", projectPath);
|
|
12
|
-
|
|
13
|
-
|
|
12
|
+
try {
|
|
13
|
+
const configPath = require.resolve("webpack.config", {
|
|
14
|
+
paths: [projectPathOutOfRoot],
|
|
15
|
+
});
|
|
16
|
+
return require(configPath);
|
|
17
|
+
}
|
|
18
|
+
catch (error) {
|
|
19
|
+
if (error && error.code === "MODULE_NOT_FOUND") {
|
|
20
|
+
throw new Error(`Webpack config not found in "${projectPathOutOfRoot}". Make sure a webpack configuration file (e.g., webpack.config.js) exists when using the --webpack flag.`);
|
|
21
|
+
}
|
|
22
|
+
throw error;
|
|
23
|
+
}
|
|
14
24
|
}
|
|
@@ -3,6 +3,16 @@ export function readWebpackConfig(projectPath, rootPath) {
|
|
|
3
3
|
const projectPathOutOfRoot = projectPath === undefined
|
|
4
4
|
? process.cwd()
|
|
5
5
|
: path.join(rootPath !== null && rootPath !== void 0 ? rootPath : "", projectPath);
|
|
6
|
-
|
|
7
|
-
|
|
6
|
+
try {
|
|
7
|
+
const configPath = require.resolve("webpack.config", {
|
|
8
|
+
paths: [projectPathOutOfRoot],
|
|
9
|
+
});
|
|
10
|
+
return require(configPath);
|
|
11
|
+
}
|
|
12
|
+
catch (error) {
|
|
13
|
+
if (error && error.code === "MODULE_NOT_FOUND") {
|
|
14
|
+
throw new Error(`Webpack config not found in "${projectPathOutOfRoot}". Make sure a webpack configuration file (e.g., webpack.config.js) exists when using the --webpack flag.`);
|
|
15
|
+
}
|
|
16
|
+
throw error;
|
|
17
|
+
}
|
|
8
18
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@utoo/pack",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.8-rc.2",
|
|
4
4
|
"main": "cjs/index.js",
|
|
5
5
|
"module": "esm/index.js",
|
|
6
6
|
"types": "esm/index.d.ts",
|
|
@@ -88,12 +88,12 @@
|
|
|
88
88
|
},
|
|
89
89
|
"repository": "git@github.com:utooland/utoo.git",
|
|
90
90
|
"optionalDependencies": {
|
|
91
|
-
"@utoo/pack-darwin-arm64": "1.1.
|
|
92
|
-
"@utoo/pack-darwin-x64": "1.1.
|
|
93
|
-
"@utoo/pack-linux-arm64-gnu": "1.1.
|
|
94
|
-
"@utoo/pack-linux-arm64-musl": "1.1.
|
|
95
|
-
"@utoo/pack-linux-x64-gnu": "1.1.
|
|
96
|
-
"@utoo/pack-linux-x64-musl": "1.1.
|
|
97
|
-
"@utoo/pack-win32-x64-msvc": "1.1.
|
|
91
|
+
"@utoo/pack-darwin-arm64": "1.1.8-rc.2",
|
|
92
|
+
"@utoo/pack-darwin-x64": "1.1.8-rc.2",
|
|
93
|
+
"@utoo/pack-linux-arm64-gnu": "1.1.8-rc.2",
|
|
94
|
+
"@utoo/pack-linux-arm64-musl": "1.1.8-rc.2",
|
|
95
|
+
"@utoo/pack-linux-x64-gnu": "1.1.8-rc.2",
|
|
96
|
+
"@utoo/pack-linux-x64-musl": "1.1.8-rc.2",
|
|
97
|
+
"@utoo/pack-win32-x64-msvc": "1.1.8-rc.2"
|
|
98
98
|
}
|
|
99
99
|
}
|