@@ -15,31 +15,6 @@ const webpackBuild = (config) =>
1515
1616const { build : buildMaintenance } = require ( './src/js/maintenance/build.js' ) ;
1717
18- const buildPath = path . resolve ( __dirname , 'build' ) ;
19-
20- const ssrWebpackConfig = {
21- target : 'node' ,
22- mode : 'production' ,
23- entry : {
24- integrations : path . resolve ( __dirname , 'src/js/integrations/ssr.js' ) ,
25- } ,
26- output : {
27- path : buildPath ,
28- filename : '[name]-ssr.js' ,
29- library : { type : 'commonjs2' } ,
30- } ,
31- resolve : {
32- modules : [ path . resolve ( __dirname , 'src' ) , 'node_modules' ] ,
33- } ,
34- externals : ( { request } , callback ) => {
35- if ( request && / ^ [ a - z A - Z @ ] / . test ( request ) ) {
36- callback ( null , `commonjs2 ${ request } ` ) ;
37- } else {
38- callback ( ) ;
39- }
40- } ,
41- } ;
42-
4318const build = async ( ) => {
4419 const webpackConfig = webpackConfigBuilder ( 'production' ) ;
4520
@@ -57,29 +32,6 @@ const build = async () => {
5732 process . stdout . write ( `Webpack build completed successfully:\n${ webpackStats . toString ( { colors : true } ) } \n\n` ) ;
5833 }
5934
60- /** @type {webpack.Stats } */
61- let webpackSsrStats ;
62- try {
63- webpackSsrStats = await webpackBuild ( ssrWebpackConfig ) ;
64- } catch ( error ) {
65- webpackSsrStats = error ;
66- }
67- if ( webpackSsrStats . hasErrors ( ) ) {
68- process . stderr . write ( `SSR Webpack build failed:\n${ webpackSsrStats . toString ( { colors : true } ) } \n\n` ) ;
69- throw new Error ( 'SSR Webpack build failed' ) ;
70- } else {
71- process . stdout . write (
72- `SSR Webpack build completed successfully:\n${ webpackSsrStats . toString ( { colors : true } ) } \n\n` ,
73- ) ;
74- }
75-
76- // eslint-disable-next-line global-require
77- const { render : renderIntegrations } = require ( './build/integrations-ssr.js' ) ;
78- await renderIntegrations ( {
79- destination : path . resolve ( __dirname , webpackConfig . output . path ) ,
80- templateHostname : 'bitrise.io' ,
81- } ) ;
82-
8335 // Build maintenance.html (depends on dist/404.js from webpack)
8436 await buildMaintenance ( {
8537 distPath : path . resolve ( __dirname , webpackConfig . output . path ) ,
0 commit comments