diff --git a/nextjs-ecommerce-oneclick/next.config.js b/nextjs-ecommerce-oneclick/next.config.js new file mode 100644 index 00000000..62de3149 --- /dev/null +++ b/nextjs-ecommerce-oneclick/next.config.js @@ -0,0 +1,22 @@ +// next.config.js +const TerserPlugin = require('terser-webpack-plugin'); + +module.exports = { + future: { + webpack5: true, + }, + webpack: function (config) { + Object.assign(config.optimization, { + minimize: false, + minimizer: [ + new TerserPlugin({ + terserOptions: { + keep_fnames: true, // don't strip function names in production + }, + }), + ], + }); + + return config; + }, +};