diff --git a/web/pgadmin/tools/sqleditor/static/js/sqleditor.js b/web/pgadmin/tools/sqleditor/static/js/sqleditor.js index d9ffd27ca..85d5956ef 100644 --- a/web/pgadmin/tools/sqleditor/static/js/sqleditor.js +++ b/web/pgadmin/tools/sqleditor/static/js/sqleditor.js @@ -6,9 +6,10 @@ // This software is released under the PostgreSQL Licence // ////////////////////////////////////////////////////////////// -/* This is used to change publicPath of webpack at runtime for loading chunks */ /* eslint-disable */ -let __webpack_public_path__ = window.resourceBasePath; +/* This is used to change publicPath of webpack at runtime for loading chunks */ +/* Do not add let, var, const to this variable */ +__webpack_public_path__ = window.resourceBasePath; /* eslint-enable */ import {launchDataGrid} from 'tools/datagrid/static/js/show_query_tool'; diff --git a/web/webpack.config.js b/web/webpack.config.js index 642b508cb..e81ffc01a 100644 --- a/web/webpack.config.js +++ b/web/webpack.config.js @@ -47,6 +47,8 @@ const providePlugin = new webpack.ProvidePlugin({ pgAdmin: 'pgadmin', 'moment': 'moment', 'window.moment':'moment', + process: 'process/browser', + Buffer: ['buffer', 'Buffer'], }); // Helps in debugging each single file, it extracts the module files @@ -534,11 +536,6 @@ module.exports = [{ ], }, }, - }, { - test: require.resolve('snapsvg'), - use: { - loader: 'imports-loader?this=>window,fix=>module.exports=0', - }, }].concat(themeCssRules('standard')), // Prevent module from parsing through webpack, helps in reducing build time noParse: [/moment.js/],