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

Get rid of Vite build warnings #709

Merged
merged 1 commit into from
Jun 25, 2024

Conversation

JulianKniephoff
Copy link
Member

There are quite a few errors like the following in the output of npm run build:

Error when using sourcemap for reporting an error: Can't resolve original location of error.

They all relate to the @mui package(-s). This seems to be related to vitejs/vite#15012.
I don't fully understand it, but apparently Rollup, which is used by Vite internally somehow,
doesn't preserve enough information to generate source maps properly.

This patch adds a plugin to do exactly that. We should probably remove it in the long run,
if the upstream issue(-s) ever get fixed. I created #708 to track that.

/cc #685

There are quite a few errors like the following in the output of `npm run build`:

    Error when using sourcemap for reporting an error: Can't resolve original location of error.

They all relate to the `@mui` package(-s). This seems to be related to vitejs/vite#15012.
I don't fully understand it, but apparently Rollup, which is used by Vite internally somehow,
doesn't preserve enough information to generate source maps properly.

This patch adds a plugin to do exactly that. We should probably remove it in the long run,
if the upstream issue(-s) ever get fixed. I created opencast#708 to track that.

/cc opencast#685
@JulianKniephoff JulianKniephoff added the type:code-enhancement Internal improvements to the codebase label Jun 19, 2024
Copy link
Contributor

This pull request is deployed at test.admin-interface.opencast.org/709/2024-06-19_13-39-04/ .
It might take a few minutes for it to become available.

Copy link
Contributor

Use docker or podman to test this pull request locally.

Run test server using develop.opencast.org as backend:

podman run --rm -it -p 127.0.0.1:3000:3000 ghcr.io/opencast/opencast-admin-interface:pr-709

Specify a different backend like stable.opencast.org:

podman run --rm -it -p 127.0.0.1:3000:3000 -e PROXY_TARGET=https://stable.opencast.org ghcr.io/opencast/opencast-admin-interface:pr-709

It may take a few seconds for the interface to spin up.
It will then be available at http://127.0.0.1:3000.
For more options you can pass on to the proxy, take a look at the README.md.

Copy link
Member

@lkiesow lkiesow left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems to work 👍

@lkiesow lkiesow self-assigned this Jun 19, 2024
@lkiesow lkiesow merged commit a81803e into opencast:main Jun 25, 2024
7 checks passed
@JulianKniephoff JulianKniephoff deleted the build-warnings branch June 25, 2024 16:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:code-enhancement Internal improvements to the codebase
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants