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

Bug: monaco editor does not consider dependencyVersion defined in store #269

Open
larsrickert opened this issue Aug 1, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@larsrickert
Copy link

Hey, we are using the @vue/repl package for the playground of our onyx component library.
We have added a select to choose the used version of the onyx library and have defined the dependencyVersion property of useStore() like so:

const onyxVersion = ref("1.0.0-beta.0");
const { vueVersion, importMap } = useVueImportMap({ vueVersion: "latest" });

const store = useStore(
  {
    builtinImportMap: computed(() =>
      mergeImportMap(importMap.value, {
        imports: {
          "sit-onyx": `https://cdn.jsdelivr.net/npm/sit-onyx@${onyxVersion.value}/dist/index.js`,
        },
      }),
    ),
    dependencyVersion: computed(() => {
      return { "sit-onyx": onyxVersion.value };
    }),
  },
  // initialize repl with previously serialized state
  location.hash.slice(1),
);

Since @vue/repl version 4.3.0 this no longer works because the editor always loads the latest version/tag (sit-onyx@latest) which is not correct because it should consider the dependencyVersion.

larsrickert added a commit to SchwarzIT/onyx that referenced this issue Aug 2, 2024
fixes #1489

- fix `Module '"sit-onyx"' has no exported member 'OnyxHeadline'` error
- version selects: show "beta" or "latest" version initially instead of
concrete version number
- support search for version selects
- persist selected onyx and typescript version (vue version is already
persisted)

I created a bug report for the `@vue/repl` package:
vuejs/repl#269
@sxzz sxzz added the bug Something isn't working label Aug 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants