@nrwl/next static assets 404 with @nrwl/next:server executor
See original GitHub issueCurrent Behavior
When using the @nrwl/next:server executor (nx serve), static assets are served only from apps/app/public source folder. Even when we configure project.json like this:
"options": { "root": "apps/app", "outputPath": "dist/apps/app", "assets": [ { "input": "libs/ui/static", "glob": "**/*", "output": "" }, { "input": "libs/ui/icons/assets", "glob": "**/*", "output": "assets/icons" } ] },
This results in 404 resource not found for all static assets that are moved out of the next public folder into the nx library when launching the local dev server with nx serve app
Expected Behavior
nx serve app SHOULD serve static assets according to the configuration in project.json and NOT serve the static assets only from next public folder
Steps to Reproduce
This issue may not be prioritized if details are not provided to help us reproduce the issue.
Failure Logs
Environment
“next”: “12.2.3”,
NX Report complete - copy this into the issue template
Node : 16.15.0 OS : linux x64 yarn : 3.2.2
nx : 14.5.4 @nrwl/angular : Not Found @nrwl/cypress : 14.5.4 @nrwl/detox : Not Found @nrwl/devkit : 14.5.4 @nrwl/eslint-plugin-nx : 14.5.4 @nrwl/express : Not Found @nrwl/jest : 14.5.4 @nrwl/js : 14.5.4 @nrwl/linter : 14.5.4 @nrwl/nest : 14.5.4 @nrwl/next : 14.5.4 @nrwl/node : 14.5.4 @nrwl/nx-cloud : 14.3.0 @nrwl/nx-plugin : Not Found @nrwl/react : 14.5.4 @nrwl/react-native : Not Found @nrwl/schematics : Not Found @nrwl/storybook : 14.5.4 @nrwl/web : 14.5.4 @nrwl/workspace : 14.5.4 typescript : 4.7.4
Community plugins: @nx-go/nx-go: 2.6.0 @nx-tools/nx-docker: 3.0.2 nest-commander-schematics: 3.0.0
Issue Analytics
- State:
- Created a year ago
- Reactions:5
- Comments:8 (1 by maintainers)
Top GitHub Comments
Any News on this issue?
@jaysoo help us