The nx-copy-assets.plugin was introduced to the vite template in this PR https://github.com/nrwl/nx/pull/27593 and the issue is happening in this line https://github.com/nrwl/nx/pull/27593/files#diff-f22d9966a821341f390da67f5737dcc4fadeda567e3ecd05f94db8d5807b6b7bR32, for some reason the config.build.outDir is an absolute path when triggered task is storybook-build, when running a vite build task, config.build.outDir is a relative path.
Current Behavior
Whenever I run the
build-storybook
task on avite
generated library, it copies the files fromnxCopyAssetsPlugin
call invite.config.ts
toExpected Behavior
it copies the files from
nxCopyAssetsPlugin
to the configuredoutput
folderstorybook-static/README.md
GitHub Repo
https://github.com/batusai513/example-nx-vite-lib
Steps to Reproduce
npx create-nx-workspace test-nx-workspace-2 --pm pnpm --preset react-monorepo
pnpm exec nx run test-utils:build-storybook
Nx Report
Failure Logs
No response
Package Manager Version
No response
Operating System
Additional Information
The
nx-copy-assets.plugin
was introduced to the vite template in this PR https://github.com/nrwl/nx/pull/27593 and the issue is happening in this linehttps://github.com/nrwl/nx/pull/27593/files#diff-f22d9966a821341f390da67f5737dcc4fadeda567e3ecd05f94db8d5807b6b7bR32
, for some reason theconfig.build.outDir
is an absolute path when triggered task isstorybook-build
, when running a vitebuild
task,config.build.outDir
is a relative path.