@next-core/build-next-bricks 1.4.0 → 1.4.1
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/package.json +2 -2
- package/src/build.js +1 -15
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@next-core/build-next-bricks",
|
|
3
|
-
"version": "1.4.
|
|
3
|
+
"version": "1.4.1",
|
|
4
4
|
"description": "Build next bricks",
|
|
5
5
|
"homepage": "https://github.com/easyops-cn/next-core/tree/master/packages/build-next-bricks",
|
|
6
6
|
"license": "GPL-3.0",
|
|
@@ -46,5 +46,5 @@
|
|
|
46
46
|
"typescript": "^5.0.3",
|
|
47
47
|
"webpack": "^5.78.0"
|
|
48
48
|
},
|
|
49
|
-
"gitHead": "
|
|
49
|
+
"gitHead": "4b4ee2a1f0853f0538ba78973cd10d76c5312027"
|
|
50
50
|
}
|
package/src/build.js
CHANGED
|
@@ -60,7 +60,6 @@ const getCssLoaders = (cssOptions) => [
|
|
|
60
60
|
*/
|
|
61
61
|
async function getWebpackConfig(config) {
|
|
62
62
|
const packageDir = process.cwd();
|
|
63
|
-
// const isContainer = config.type === "container";
|
|
64
63
|
const isBricks = !config.type || config.type === "bricks";
|
|
65
64
|
const mode = config.mode || process.env.NODE_ENV;
|
|
66
65
|
|
|
@@ -126,7 +125,7 @@ async function getWebpackConfig(config) {
|
|
|
126
125
|
}
|
|
127
126
|
);
|
|
128
127
|
} catch (e) {
|
|
129
|
-
console.
|
|
128
|
+
console.warn(`Shared package not found: "${dep}"`);
|
|
130
129
|
return;
|
|
131
130
|
}
|
|
132
131
|
const depPackageJsonFile = await readFile(depPackageJsonPath, {
|
|
@@ -181,13 +180,6 @@ async function getWebpackConfig(config) {
|
|
|
181
180
|
|
|
182
181
|
/** @type {Record<string, { import: string; name: string; }>} */
|
|
183
182
|
const extraExposes = {};
|
|
184
|
-
// const initializeTsPath = path.join(packageDir, "src/initialize.ts");
|
|
185
|
-
// if (fs.existsSync(initializeTsPath)) {
|
|
186
|
-
// extraExposes.initialize = {
|
|
187
|
-
// import: `./${path.relative(packageDir, initializeTsPath)}`,
|
|
188
|
-
// name: "initialize",
|
|
189
|
-
// };
|
|
190
|
-
// }
|
|
191
183
|
|
|
192
184
|
const outputPath = path.join(packageDir, config.outputPath ?? "dist");
|
|
193
185
|
const chunksDir = isBricks ? "chunks/" : "";
|
|
@@ -302,12 +294,6 @@ async function getWebpackConfig(config) {
|
|
|
302
294
|
? {
|
|
303
295
|
splitChunks: {
|
|
304
296
|
cacheGroups: {
|
|
305
|
-
react: {
|
|
306
|
-
test: /[\\/]node_modules[\\/](?:react(?:-dom)?|scheduler)[\\/]/,
|
|
307
|
-
priority: -10,
|
|
308
|
-
reuseExistingChunk: true,
|
|
309
|
-
name: "react",
|
|
310
|
-
},
|
|
311
297
|
default: {
|
|
312
298
|
minChunks: 2,
|
|
313
299
|
priority: -20,
|