Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sourcemap is not generated #1

Open
psamim opened this issue Jun 2, 2021 · 4 comments
Open

Sourcemap is not generated #1

psamim opened this issue Jun 2, 2021 · 4 comments

Comments

@psamim
Copy link

psamim commented Jun 2, 2021

Hi,

I changed "sourceMap": true in angular.json (line 57) and then run yarn build:single-spa:navbar but no source maps are generated.

The source map file is there, but it is almost empty.

$ cat dist/navbar/main.js.map

{"version":3,"sources":[],"names":[],"mappings":"","file":"main.js","sourceRoot":""}

Thanks

@movingoregon
Copy link

movingoregon commented Jun 3, 2021

I can reproduce the same behavior also noticed following warning while running npm run build

WARNING in Conflict: Multiple assets emit different content to the same filename main.js.map

Update:
I got it around using eval-source-map. In extra-webpack-config.js add singleSpaWebpackConfig.devtool = "eval-source-map";

@psamim
Copy link
Author

psamim commented Jun 3, 2021

@skolipaka Thanks, I added what you said and it worked but first I got the error:

ERROR in budgets: initial exceeded maximum budget. Budget 1 MB was not met by 4.91 MB with a total of 5.91 MB.

I fixed the error by increasing the budget, but now the main.js file is more than 6MB which does not make sense.

@psamim
Copy link
Author

psamim commented Jun 7, 2021

This app is also using Angular 11 and single-spa, but generates source maps correctly. I am not sure what is different.

https://github.com/matt-gold/single-spa-angular-cli/tree/master/child1

@joeldenning
Copy link
Contributor

I don't work on this project much, but would review a pull request fixing this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants