-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Include src/ files in npm release (for resolving source maps) #2680
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Approving and merging this into master, but will perform bundle size testing before release.
Thanks @justingrant 💯 |
Some stats on the effects of this PR (changes seem acceptable to me) ANGULAR Pre-src inclusion (Gzipped): All (1.22 MB) Post-src inclusion (Gzipped): All (1.23 MB) REACT Pre-src inclusion (Gzipped) All (419.15 KB) Post-src inclusion (Gzipped) All (419.55 KB) VUE Pre-src inclusion (Gzipped) All (293.7 KB) Post-src inclusion (Gzipped) All (293.86 KB) |
This commit fixes a remaining handful of sourcemap issues remaining after my previous sourcemap-related PRs aws-amplify#3059 and aws-amplify#2680: * adds mapping for new folders: predictions, datastore, amplify-ui-angular, amplify-ui-components, amplify-ui-react, amplify-ui-storybook, amplify-ui-vue, api-graphql, api-rest * removes webpack:/// prefix from oddball, non-file paths emitted by webpack (e.g. `webpack/universalModuleDefinition` or `fs (ignored)`). This prevents warnings from source-map-loader and related tools. * The same code that fixes the "weird path" fix above also fixes a problem with aws-amplify#3059 where it would pre-pend webpack:/// as a fall-through case, even when the path was already a valid relative URL and didn't need that prefix. Also, according to @loganfsmyth (the most knowledgeable sourcemap expert I know), OSS library sourcemaps should always use relative URLs and should never use the webpack:/// prefix. Therefore, this PR removes that prefix. * updates the amplify-ui package's webpack config to emit sourcemaps * fixes paths to CSS files in the sourcemaps of amplify-ui package * adds sourcemaps for aws-amplify-vue package
This pull request has been automatically locked since there hasn't been any recent activity after it was closed. Please open a new issue for related bugs. Looking for a help forum? We recommend joining the Amplify Community Discord server |
Fixes #2234
Description of changes:
Currently it's very hard to debug Amplify apps because no original source is available to the debugger because the source files are stripped out when publishing to npm. Intstead, you need to debug into the transpiled source which (especially for async methods like in the API package!) is incredibly difficult.
This PR removes
src/**
from.npmignore
in 13 packages that previously excluded thesrc
folder and its subdirectories.By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.