-
-
Notifications
You must be signed in to change notification settings - Fork 662
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
Fetching CSV not working with custom delimiter? + outdated codesandbox #304
Comments
Figured it out. I was running in the wrong direction because I thought the I did also realize that the release number was limited to 0.3.0 because of the difference between @nuxtjs/content and @nuxt/content, but I'm leaving this open still because the fork-able codesandbox needs to be updated. |
The sandbox has been updated @thely Sorry for the delay: https://codesandbox.io/s/nuxt-content-l164h |
Hi @benjamincanac , And in my Nuxt config:
My CSV file
Result of ContentDoc :
ExpectedResult :
|
Version
@nuxt/content: 1.5.0
nuxt: 2.13
Reproduction Link
https://codesandbox.io/s/nuxtcontent-demo-k565s?file=/pages/_slug.vue
NOTE: the default nuxt/content codesandbox that we're asked to fork on new issues can't get a nuxt/content release beyond 0.3.0. So this sandbox is experiencing a completely different issue, because
options
doesn't exist before 1.3.0, but it's what I have.Steps to reproduce
Get a tab-delimited CSV file. Attempt to use the
{delimiter: "\t"}
option with it; it breaks (on later versions of content, it doesn't break, but it also doesn't use the delimiter). Try removing the options object, so the top line readsconst test = await $content("test")
. It works, but only without options.What is Expected?
I want to be able to load in a tab-delimited CSV file, and figured I could use the csvtojson parameters in an options object.
What is actually happening?
The custom delimiter doesn't work. It still just has a bunch of
\t
s all over the place.The text was updated successfully, but these errors were encountered: