You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After installing and loading it as a component with import Autocomplete from "@trevoreyre/autocomplete-vue":
ERROR in ./node_modules/@trevoreyre/autocomplete-vue/index.js
Module not found: Error: Can't resolve '../style.css' in 'xxxxxx/node_modules/@trevoreyre/autocomplete-vue'
So import Autocomplete from '@trevoreyre/autocomplete-vue'should already be redirecting to that dist/autocomplete.esm.js file automatically if you're using a bundler that understands ES modules. Or the .cjs.js files for bundlers that don't. Either way, it shouldn't be encountering that .css import under normal circumstances.
Can you give me a little more info on your bundling setup? If it's webpack or rollup? Can you create a small reproducible example?
I'm using it as part of https://github.com/Corollarium/modelarium. I don't have anything else to report, it's a pretty standard use following the docs and using laravel mix to build. But apparently the problem is the index.js file, which is loaded instead of the package.json indication. Perhaps mix is messing up something?
I haven't used Laravel Mix before, but if it's an abstraction on top of webpack then yes, that would be my first suspect. Sorry I can't help much more than that.
Thanks, but there's a clear problem that is not caused by any other software: file node_modules/@trevoreyre/autocomplete-vue/index.js includes ../style.css. This path is incorrect, and should be ./dist/style.css.
After installing and loading it as a component with
import Autocomplete from "@trevoreyre/autocomplete-vue"
:What works is this:
It seems that you need to fix the package build.
The text was updated successfully, but these errors were encountered: