module-builder
module-builder copied to clipboard
How to reference a JSON file in a component?
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.
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.
Closing as this is an old issue that needs more info.