File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11import version from './package.json' with { type : 'json' } ;
22import { fileURLToPath } from "url" ;
33import path from 'path' ;
4+ //import prebuildTask from './scripts/preBuild.mjs';
5+
6+ //prebuildTask();
47
58const __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
5472export default nextConfig ;
Original file line number Diff line number Diff line change 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" ,
Load Diff This file was deleted.
Original file line number Diff line number Diff 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"
You can’t perform that action at this time.
0 commit comments