Skip to content

Commit 010b4dd

Browse files
committed
Removed prebuild.cjs
1 parent c6f6aef commit 010b4dd

4 files changed

Lines changed: 21 additions & 56 deletions

File tree

next.config.mjs

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
import version from './package.json' with { type: 'json' };
22
import { fileURLToPath } from "url";
33
import path from 'path';
4+
//import prebuildTask from './scripts/preBuild.mjs';
5+
6+
//prebuildTask();
47

58
const __dirname = path.dirname(fileURLToPath(import.meta.url));
69

@@ -48,7 +51,22 @@ const nextConfig = {
4851
},
4952
turbopack: {
5053
root: path.join(__dirname),
51-
}
54+
},
55+
webpack: (config, { dev, isServer }) => {
56+
if (isServer && !dev) {
57+
config.plugins.push(
58+
new WebpackShellPluginNext({
59+
onBuildStart: {
60+
scripts: ['node ./scripts/preBuild.cjs'],
61+
blocking: true,
62+
parallel: false,
63+
},
64+
})
65+
);
66+
}
67+
68+
return config
69+
},
5270
};
5371

5472
export default nextConfig;

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@
4242
"@typescript-eslint/parser": "^8.60.0",
4343
"@webpack-cli/generators": "^3.0.7",
4444
"autoprefixer": "^10.5.0",
45+
"cross-spawn": "^7.0.6",
4546
"css-loader": "^7.1.4",
4647
"eslint": "^10.4.1",
4748
"eslint-config-next": "16.2.6",

scripts/preBuild.cjs

Lines changed: 0 additions & 55 deletions
This file was deleted.

yarn.lock

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10407,6 +10407,7 @@ __metadata:
1040710407
"@uidotdev/usehooks": "npm:^2.4.1"
1040810408
"@webpack-cli/generators": "npm:^3.0.7"
1040910409
autoprefixer: "npm:^10.5.0"
10410+
cross-spawn: "npm:^7.0.6"
1041010411
css-loader: "npm:^7.1.4"
1041110412
eslint: "npm:^10.4.1"
1041210413
eslint-config-next: "npm:16.2.6"

0 commit comments

Comments
 (0)