-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
Closed
Description
When importing the SFC file in another package from the vite application, the following error is output.
Failed to load module script: The server responded with a non-JavaScript MIME type of "text/html". Strict MIME type checking is enforced for module scripts per HTML spec.
Also, during vite build, an error is output that rollup cannot parse the SFC file.
The following is when running it in my local environment.
$ vite build
vite v0.10.2
Building for production...
[vite] Build errored out.
{ Error: Could not load /Users/intern/work/scouter_dev/dev/vite-playground/app/vite-app/Users/intern/work/scouter_dev/dev/vite-playground/packages/vite-components/components/BaseButton.vue?vue&type=script&lang=ts (imported by /Users/intern/work/scouter_dev/dev/vite-playground/packages/vite-components/components/BaseButton.vue): /Users/intern/work/scouter_dev/dev/vite-playground/app/vite-app/Users/intern/work/scouter_dev/dev/vite-playground/packages/vite-components/components/BaseButton.vue is not parsed it yet
at getDescriptor (/Users/intern/work/scouter_dev/dev/vite-playground/node_modules/rollup-plugin-vue/dist/index.js:202:11)
at Object.load (/Users/intern/work/scouter_dev/dev/vite-playground/node_modules/rollup-plugin-vue/dist/index.js:49:36)
at Promise.resolve.then (/Users/intern/work/scouter_dev/dev/vite-playground/node_modules/rollup/dist/shared/rollup.js:18100:25)
code: 'PLUGIN_ERROR',
plugin: 'vue',
hook: 'load',
watchFiles:
[ '/Users/intern/work/scouter_dev/dev/vite-playground/app/vite-app/index.html',
'/Users/intern/work/scouter_dev/dev/vite-playground/node_modules/vue/dist/vue.runtime.esm-bundler.js',
'/Users/intern/work/scouter_dev/dev/vite-playground/app/vite-app/App.vue',
'/Users/intern/work/scouter_dev/dev/vite-playground/app/vite-app/App.vue?vue&type=script&lang=ts',
'/Users/intern/work/scouter_dev/dev/vite-playground/app/vite-app/App.vue?vue&type=template&id=d36c9542',
'/Users/intern/work/scouter_dev/dev/vite-playground/node_modules/@vue/runtime-dom/dist/runtime-dom.esm-bundler.js',
'/Users/intern/work/scouter_dev/dev/vite-playground/packages/vite-components/components/BaseButton.vue',
'/Users/intern/work/scouter_dev/dev/vite-playground/app/vite-app/Users/intern/work/scouter_dev/dev/vite-playground/packages/vite-components/components/BaseButton.vue?vue&type=script&lang=ts',
'/Users/intern/work/scouter_dev/dev/vite-playground/app/vite-app/Users/intern/work/scouter_dev/dev/vite-playground/packages/vite-components/components/BaseButton.vue?vue&type=template&id=43a490e4' ] }
Work repository
https://github.com/ushironoko/vite-playground
The repository consists of mono repos, and another packages can be found in packages / vite-components.
This worked fine when I placed the SFC file in the same workspace. Do you know the cause?
Thank you.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels