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
feature: add static.prefix #2755
Conversation
Codecov Report
@@ Coverage Diff @@
## dev #2755 +/- ##
==========================================
+ Coverage 99.91% 99.91% +<.01%
==========================================
Files 23 23
Lines 1211 1213 +2
==========================================
+ Hits 1210 1212 +2
Misses 1 1
Continue to review full report at Codecov.
|
Dont we need a default value? |
|
) | ||
staticMiddleware.prefix = this.options.render.static.prefix |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code readability suggestion: Boolean(this.options.render.static.prefix)
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It may make unexpected behavior, if not config static.prefix
, it will be false and ignore the prefix, but prefix should not be ignored by default.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So what if we add a default value true
in https://github.com/nuxt/nuxt.js/blob/215832769edc42e7077e8db970fbcda3276ecf0a/lib/common/options.js#L308? This prefix is little confusing now. Because it doesn't means use this prefix string but means just use prefix 😆
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@pi0 Added the default value.
Sure,I will make a change tmr morning :)
Pooya Parsa <notifications@github.com>于2018年2月4日 周日23:28写道:
***@***.**** commented on this pull request.
------------------------------
In lib/core/renderer.js
<#2755 (comment)>:
> )
+ staticMiddleware.prefix = this.options.render.static.prefix
So what if we add a default value true in
https://github.com/nuxt/nuxt.js/blob/215832769edc42e7077e8db970fbcda3276ecf0a/lib/common/options.js#L308?
This prefix is little confusing now.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#2755 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AEHMWtRKj_PjjeGqu31UzbgKNkhIIEQyks5tRcyigaJpZM4R4PKC>
.
--
Regards,
Clark
|
b6587ee
to
e60a8e7
Compare
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Resolve #2753
Add
render.static.prefix
to check if need to appendrouter.base
toserveStatic