-
Notifications
You must be signed in to change notification settings - Fork 228
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
swagger-ui-css-resource-not-found-in-production-mode #174
Comments
Hi, Does nestjs use webpack? Same issue with CSS not loading was resolved in webpack using the following solution #90 (comment) Thanks |
Thank you for response |
Can you post a link to a simple repo that displays the issue? I am unfamiliar with NestJS and how it works for production mode. It might also be worthwhile raising with NestJS as they are more likely to understand why there is an issue. Ultimately this module assumes the CSS files etc will be included in any build process. A solution might be for you to have a build step which copies the files from the node_modules into the static assets.
…Sent from my iPhone
On 16 Apr 2020, at 18:47, jagdishsinh jadeja ***@***.***> wrote:
Thank you for response
I have already checked that issue
I am not using webpack only core nest and nodejs
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or unsubscribe.
|
Hi |
Looks like you can configure webpack with Nest
https://github.com/nestjs/nest/tree/master/sample/08-webpack
You should be able to use this to copy in the css files as I previously mentioned. Either that or you add a script prior to build to copy in the css files from node_modules into the dist folder
…Sent from my iPhone
On 17 Apr 2020, at 07:42, jagdishsinh jadeja ***@***.***> wrote:
Hi
here is my code repo https://github.com/jagdishjadeja/nest-swagger-demo
here is url where app is hosted https://swagger-demo.now.sh/api/
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or unsubscribe.
|
is there any other option other than this? |
Not that I am aware off - I am open to PRs or ideas for how to solve from any Webpack or NestJS experts :) |
Like editing index.html for swagger ? and adding another url/path of css file ? |
Not that I can think of - this module relies on these files being
statically served by the application and it retrieves them from NPM. Adding
a url or path to the files is possible but by that stage it would probably
be easier to just download the swagger-ui files, host them and set them up
yourself.
Adding a build step to this module is also possible. - however this is
probably best solved outside of this module, as it is mostly likely
build tool specific.
As mentioned before if someone provided a clean mechanism via a PR that
worked I would be happy to accept.
…On Tue, Apr 21, 2020 at 9:23 AM jagdishsinh jadeja ***@***.***> wrote:
Like editing index.html for swagger ? and adding another url/path of css
file ?
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#174 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AA2PM6YSEAIUIQVJG2FM4DLRNVJYFANCNFSM4MJVLDOA>
.
|
in productin mode css is not loading
https://stackoverflow.com/questions/60082388/nestjs-swagger-ui-css-resource-not-found-in-production-mode
I am facing same issue as this link
The text was updated successfully, but these errors were encountered: