Skip to content
This repository has been archived by the owner on Jan 18, 2022. It is now read-only.

Cant import javascript or other vue files into vue single file components #460

Open
DanielTerletzkiy opened this issue Dec 22, 2021 · 0 comments

Comments

@DanielTerletzkiy
Copy link

Version

5.0.0

Reproduction link

github.com

Steps to reproduce

open vue file, in script tag make an import to any file (vue, js, etc), compile and open project where you use the compiled plugin

What is expected?

rollup compiles everything into a single file and handles all imports accordingly

What is actually happening?

imports are still inside of compiled file, leading nowhere

Example:
Could not find module in path: 'vuelize/dist/src/mixins/flex' relative to '/node_modules/vuelize/dist/vuelize.esm.js'

flex was a js file imported in one of the now compiled vue components


i first noticed the problem while making recursive vue components, wich is, as of now, not achievable for me, because it requires the same vue file to be imported again to declare it inside the components. The import exists inside the compiled file, leading to nowhere and "crashing" the app with something like this:

Could not find module in path: 'vuelize/dist/src/mixins/flex' relative to '/node_modules/vuelize/dist/vuelize.esm.js'

i also tried decaring the source folder in the package.json, but then i dont have any way of reasonably importing, for both prod and dev, as prod esm.js files cant handle @ or~ imports

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

No branches or pull requests

1 participant