Skip to content

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

Open
@larsrickert

Description

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.

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions