Open paustint opened 7 months ago
Thanks for the workaround here, I am also seeing this issue but switching to the glob object fixed it for now 👍🏻
I'm also experiencing this issue with latest nx (19.3.1), also glob pattern isn't working for md
files
any updates on this?
You can change the string from "apps/nx-test/src/assets"
to "apps/nx-test/src/assets/**/*"
. This fixed it for me without using the object syntax:
In project.json
, targets.build.options
:
"assets": ["apps/server/src/assets/**/*"],
The assets are copied to the dist/apps/{app-name]/src/assets
directory.
Current Behavior
Started a brand new node project from scratch with express. When I build the application, the assets directory is not copied into the dist folder. And when serving the application, all the assets return 404 since the assets directory is ignored.
:star: EDIT
I think the string version of the configuration may be broken, I looked at the docs for the "configuration playground" and trie the object format and the assets were handled correctly.
Expected Behavior
assets are copied over just like they are in all other scenarios.
GitHub Repo
https://github.com/paustint/nx-bug-report-1
Steps to Reproduce
In provided repo: run
npm run build
and notice assets are not copied over. runnpm run start
and noticecurl http://localhost:3000/assets/test.json
does not return file that should be returned.If you want to try from scratch like I did to create above repo:
Nx Report
Failure Logs
Package Manager Version
No response
Operating System
Additional Information
I first encountered this on my existing project, and created a new project from scratch to see what I might be doing wrong.... but the default configuration out of the box is broken.