Open
Conversation
jardicc
reviewed
Apr 7, 2026
Comment on lines
+218
to
+241
| outputOptions(options) { | ||
| const projectRoot = process.cwd(); | ||
| const originalTransform = options.sourcemapPathTransform; | ||
| options.sourcemapPathTransform = (relativeSourcePath, sourcemapPath) => { | ||
| let finalPath = relativeSourcePath; | ||
|
|
||
| // Preserve the user's custom transform if they defined one in the config | ||
| if (typeof originalTransform === "function") { | ||
| finalPath = | ||
| originalTransform(relativeSourcePath, sourcemapPath) || finalPath; | ||
| } | ||
|
|
||
| const mapDir = path.dirname(sourcemapPath); | ||
|
|
||
| // Calculate the exact path from the project root | ||
| const absoluteSourcePath = path.resolve(mapDir, finalPath); | ||
| const relativeToRoot = path.relative(projectRoot, absoluteSourcePath); | ||
| const cleanPath = relativeToRoot.replace(/\\/g, "/"); | ||
|
|
||
| return `uxp-plugin://${cleanPath}`; | ||
| }; | ||
|
|
||
| return options; | ||
| }, |
Collaborator
There was a problem hiding this comment.
I am not sure you need this. I seen you Bolt generated valid relative path by default. It even mapped correctly.
Or is it for a different purpose?
| sourcemap: mode && ["dev", "build"].includes(mode) ? "inline" : false, | ||
| // sourcemap: mode && ["dev", "build"].includes(mode) ? true : false, | ||
| minify: false, | ||
| emptyOutDir: !shouldNotEmptyDir, |
Collaborator
There was a problem hiding this comment.
Setting this to "false" did the trick for me to stop cleaning .uxprc file. Of course it is only workaround. If you would like to keep functionality you would probably have to do custom cleaning plugin and hook it in bundler lifecycle.
The ultimate goal is to convince Adobe to add websocket endpoint to the UXP service to subscribe plugins list instead of relying on temporary files and patch. But that could take a long time.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.