Skip to content

Commit

Permalink
build(api): Fix for nrwl/nx#14708
Browse files Browse the repository at this point in the history
undefined
  • Loading branch information
ZenSoftware committed Mar 7, 2023
1 parent 262ef43 commit 19ed8fb
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion apps/api/webpack.config.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,15 @@
const { composePlugins, withNx } = require('@nrwl/webpack');
const path = require('path');

module.exports = composePlugins(withNx(), (config, { options, context }) => {
/**
* Temporary fix for [@nrwl/nest VSCode breakpoints no longer working](https://github.com/nrwl/nx/issues/14708#issuecomment-1457996600)
*/
config.output.devtoolModuleFilenameTemplate = function (info) {
const rel = path.relative(process.cwd(), info.absoluteResourcePath);
return `webpack:///./${rel}`;
};

/**
* The generated Prisma client does not produce source maps, so we need to
* filter out the source map loader for the generated client.
Expand All @@ -17,7 +26,7 @@ module.exports = composePlugins(withNx(), (config, { options, context }) => {
options: {
filterSourceMappingUrl: (url, resourcePath) => {
if (/generated/.test(resourcePath)) {
return 'skip';
return false;
}

return true;
Expand Down

0 comments on commit 19ed8fb

Please sign in to comment.