diff --git a/apps/doc-gen/webpack.config.js b/apps/doc-gen/webpack.config.js index 6121171c63..afc48e847e 100644 --- a/apps/doc-gen/webpack.config.js +++ b/apps/doc-gen/webpack.config.js @@ -11,24 +11,24 @@ module.exports = composePlugins(withNx(), withReact(), (config) => { // add fallback for node modules config.resolve.fallback = { - ...config.resolve.fallback, - "crypto": require.resolve("crypto-browserify"), - "stream": require.resolve("stream-browserify"), + // ...config.resolve.fallback, + // "crypto": require.resolve("crypto-browserify"), + // "stream": require.resolve("stream-browserify"), "path": require.resolve("path-browserify"), - "http": require.resolve("stream-http"), - "https": require.resolve("https-browserify"), - "constants": require.resolve("constants-browserify"), - "os": false, //require.resolve("os-browserify/browser"), - "timers": false, // require.resolve("timers-browserify"), - "zlib": require.resolve("browserify-zlib"), + // "http": require.resolve("stream-http"), + // "https": require.resolve("https-browserify"), + // "constants": require.resolve("constants-browserify"), + // "os": false, //require.resolve("os-browserify/browser"), + // "timers": false, // require.resolve("timers-browserify"), + // "zlib": require.resolve("browserify-zlib"), "fs": false, - "module": false, - "tls": false, - "net": false, - "readline": false, - "child_process": false, - "buffer": require.resolve("buffer/"), - "vm": require.resolve('vm-browserify'), + // "module": false, + // "tls": false, + // "net": false, + // "readline": false, + // "child_process": false, + // "buffer": require.resolve("buffer/"), + // "vm": require.resolve('vm-browserify'), } // add externals @@ -37,6 +37,12 @@ module.exports = composePlugins(withNx(), withReact(), (config) => { solc: 'solc', } + config.module.rules.push({ + test: /\.hbs$/, + type: 'asset/source' + }) + + // add public path config.output.publicPath = '/'