Closed stephiescastle closed 1 year ago
For dev, I guess this is a bug in nuxt. https://github.com/nuxt/nuxt.js/issues/15735
For build, maybe replacing
<template>
<img src="/copied-files/colors.svg" />
</template>
with
<template>
<img :src="'/copied-files/colors.svg'" />
</template>
works?
Confirming that the suggested workaround for build does work. Looking forward to a fix for https://github.com/nuxt/nuxt.js/issues/15735!
Closing as I confirmed the bug in nuxt was fixed in nuxt 3.1.1. https://stackblitz.com/edit/github-hqd9rq-mjmrun?file=nuxt.config.ts
Great plugin! We've been using it with Nuxt 3, and vite-plugin-static-copy@0.9.0 worked great with nuxt@3.0.0-rc.8. However, now that Nuxt 3 stable has been released, we're having trouble getting it to work.
Configuration
On a mac using node v18.12.1:
Results
On
npm run dev
, the files aren't copied, and no error is shown.On
npm run build
, the following error occurs, and the app fails to build due to missing assetcolors.svg
: