-
-
Notifications
You must be signed in to change notification settings - Fork 368
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
[RFC] prod --source-maps should be decoupled #319
Comments
All sourcemap are "inlined," primarily for dev-runtime instruments. Tho, this issue raised an interesting point - should sourcemap for prod be inlined or decoupled into sourcemap files?
Oh shoot I need to release a new patch! #307 fixed that but I went on to try to fix #313 and haven't make a release since... |
@leotronolone 0.59.2 just released, and should address the |
@louisgv thanks for the quick response!! Just verified your fix on the latest build 👍 Gotcha, to give you more context I am trying to upload source maps to sentry so that we can see de-minified stack traces/files. For our use case decoupling mappings into separate files or having the option to do so would be nice! Inline mappings do work with sentry but we would have to remove them before deployment(our extension will be public so we don't want our code to be public). I also tried running the build without --source-maps to see if we could just do 2 builds(1 for sentry, 1 for deployment) but it generated a different content hash between builds, causing the file names to mis-match/breaking sentry file mapping. |
Got it, I think this will be an RFC instead of BUG. It makes sense for sourcemap to be separated in prod imo since it's likely be used to instrument remotely instead of locally. |
* chore: bump deps * moving prod sourcemap to separate files, fix #319 * bump canary
What happened?
The issue:
Running the following command to generate sourcemaps for a prod build does not generate js source map files:
plasmo build --source-maps
I also attempted the following combinations with no luck:
plasmo build --env production --source-maps
plasmo build --env prod --source-maps
plasmo build --env="production" --source-maps
plasmo build --env="prod" --source-maps
NODE_ENV=production plasmo build --source-maps
Steps to reproduce:
cd with-background
npm install
plasmo build --source-maps
build/chrome-mv3-dev
orbuild/chrome-mv3-prod
for missing source map filesFindings
I noticed the artifact folder in
build
is always set tochrome-mv3-dev
when using the --env param. It seems to only do a prod named buildchrome-mv3-dev
if we set NODE_ENV=production. Wondering if there is an issue with how env is being set?Run with
plasmo build --source-maps
Run with
NODE_ENV=production plasmo build --source-maps
Related changes: #189
Version
Latest
What OS are you seeing the problem on?
MacOSX
What browsers are you seeing the problem on?
Chrome
Relevant log output
No response
(OPTIONAL) Contact Details
No response
Code of Conduct
The text was updated successfully, but these errors were encountered: