chore(repo): fix webpack breakpoints not binding

This commit is contained in:
Francesco Spilla 2025-02-07 10:19:25 +01:00
parent 711f55ab11
commit a8596c8b4d
2 changed files with 28 additions and 3 deletions

20
.vscode/launch.json vendored Normal file
View File

@ -0,0 +1,20 @@
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "Attach to ebitemp-api",
"port": 9229,
"request": "attach",
"restart": true,
"skipFiles": [
"<node_internals>/**",
"${workspaceFolder}/node_modules/**/*.js"
],
"internalConsoleOptions": "neverOpen",
"type": "node"
}
]
}

View File

@ -1,9 +1,14 @@
const { NxAppWebpackPlugin } = require('@nx/webpack/app-plugin'); const { NxAppWebpackPlugin } = require('@nx/webpack/app-plugin');
const { join } = require('path'); const { join, relative } = require('path');
const workspaceRoot = join(__dirname, '../../');
module.exports = { module.exports = {
output: { output: {
path: join(__dirname, '../../dist/apps/ebitemp-api'), path: join(__dirname, '../../dist/apps/ebitemp-api'),
devtoolModuleFilenameTemplate(info) {
const rel = relative(workspaceRoot, info.absoluteResourcePath);
return `webpack:///./${rel}`;
},
}, },
plugins: [ plugins: [
new NxAppWebpackPlugin({ new NxAppWebpackPlugin({
@ -11,10 +16,10 @@ module.exports = {
compiler: 'tsc', compiler: 'tsc',
main: './src/main.ts', main: './src/main.ts',
tsConfig: './tsconfig.app.json', tsConfig: './tsconfig.app.json',
assets: ["./src/assets"], assets: ['./src/assets'],
optimization: false, optimization: false,
outputHashing: 'none', outputHashing: 'none',
generatePackageJson: true, generatePackageJson: true,
}) }),
], ],
}; };