Skip to content

Plugin does not work. Produces incorrect import path #31

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

Open
or9 opened this issue Jan 22, 2025 · 0 comments
Open

Plugin does not work. Produces incorrect import path #31

or9 opened this issue Jan 22, 2025 · 0 comments

Comments

@or9
Copy link

or9 commented Jan 22, 2025

Source:

<script type="module">
import { createApp, ref } from "vue";
import "vuetify/styles";
import { createVuetify } from "vuetify";
import * as components from "vuetify/components";
import * as directives from "vuetify/directives";
import VueApp from "../VueApp/VueApp.vue";

const vuetify = createVuetify({
	components,
	directives,
});

createApp({
		setup() {
			return;
		}
	})
	.use(vuetify)
	.mount(`#root`);

</script>

Expected output:

import script from "./VueInit/VueInit.vue?type=script";
import { render } from "./VueInit.vue?type=template";
script.render = render;
script.__file = "./VueInit.vue";
var VueInit_default = script;
export {
  VueInit_default as default
};

Actual output:

import script from "/Users/…/…/…/…/src/…/…/VueInit/VueInit.vue?type=script";
import { render } from "/Users/…/…/…/…/src/…/…/VueInit/VueInit.vue?type=template";
script.render = render;
script.__file = "src/static/components/VueInit/VueInit.vue";
var VueInit_default = script;
export {
  VueInit_default as default
};

(full filesystem path replaced with "…" per segment)

import paths should not be changed unnecessarily, and should definitely not resolve to filesystem paths. If tsconfig is required to make base functionality work, that should be indicated in the documentation. This is not a typescript application, and there are no additional plugins for this build.

Other esbuild builds work fine. It's just this plugin which does not work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant