Skip to content
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

How to reference a JSON file in a component? #149

Closed
timb-103 opened this issue Jul 28, 2023 · 2 comments
Closed

How to reference a JSON file in a component? #149

timb-103 opened this issue Jul 28, 2023 · 2 comments

Comments

@timb-103
Copy link
Sponsor

I'm trying to import a JSON file in a vue component, this is how I do it current in a non-module build:

import List from "~/src/json/list.json"

I've tried adding the json file to assets in the runtime folder, but can't figure it out.

@danielroe
Copy link
Member

Could you provide a reproduction that shows what you are doing? If it and the Vue components are both in the runtime directory, I would use a relative import.

@danielroe danielroe closed this as not planned Won't fix, can't repro, duplicate, stale May 22, 2024
@danielroe
Copy link
Member

Closing as this is an old issue that needs more info.

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

No branches or pull requests

2 participants