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

Nuxt3 public assets in layers #719

Open
6 tasks done
letoast opened this issue May 8, 2024 · 5 comments
Open
6 tasks done

Nuxt3 public assets in layers #719

letoast opened this issue May 8, 2024 · 5 comments
Labels
to triage This issue needs to be triaged

Comments

@letoast
Copy link

letoast commented May 8, 2024

Describe the bug

Assets in layers in /public folders aren't being referenced to in stories.

Reproduction

https://stackblitz.com/edit/histoire-nuxt3-starter-wkqjuq?file=components%2FTestVector.story.vue

System Info

System:
    OS: Windows 10 10.0.19045
    CPU: (16) x64 Intel(R) Xeon(R) CPU E5-2667 v3 @ 3.20GHz
    Memory: 83.14 GB / 127.92 GB
  Binaries:
    Node: 18.19.0 - C:\Program Files\nodejs\node.EXE
    Yarn: 1.22.19 - C:\Program Files (x86)\Yarn\bin\yarn.CMD
    npm: 10.2.3 - C:\Program Files\nodejs\npm.CMD
    pnpm: 8.6.11 - ~\AppData\Local\pnpm\pnpm.EXE
  Browsers:
    Chrome: 124.0.6367.119
    Edge: Chromium (123.0.2420.97)
    Internet Explorer: 11.0.19041.3636

Used Package Manager

yarn

Validations

@letoast letoast added the to triage This issue needs to be triaged label May 8, 2024
Copy link

stackblitz bot commented May 8, 2024

Fix this issue in StackBlitz Codeflow Start a new pull request in StackBlitz Codeflow.

@vivekrpatel8
Copy link

vivekrpatel8 commented May 9, 2024

@letoast Add following to histoire.config file:

export default defineConfig({
  plugins: [HstVue(), HstNuxt()],
  vite: {
    publicDir: './public',
  },
})

@letoast
Copy link
Author

letoast commented May 9, 2024

@letoast Add following to histoire.config file:

export default defineConfig({
  plugins: [HstVue(), HstNuxt()],
  vite: {
    publicDir: './public',
  },
})

Have you tried it in the reproduction that I provided?
image

@vivekrpatel8
Copy link

vivekrpatel8 commented May 9, 2024

@letoast Now try... You have to move public folder in root dir just like I did.

image

@letoast
Copy link
Author

letoast commented May 9, 2024

@vivekrpatel8 I'm not sure you know what Nuxt3 layers are but that's the whole point of Nuxt3 layers - separating your app into different parts, each doing it's part. Your solution doesn't help in my case. I know how the ./public folder works.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
to triage This issue needs to be triaged
Projects
None yet
Development

No branches or pull requests

2 participants