-
-
Notifications
You must be signed in to change notification settings - Fork 5k
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
fix(webpack): resolve consola to latest #5729
Conversation
@pi0 Will consola change it in future ? |
@clarkdo We keep this dist path consistent :) |
@pi0 Changed. For So do you think it's necessary to add alias in server ? |
@clarkdo for node, it won't and is guarded here: https://github.com/nuxt/consola/blob/master/src/node.js#L31 (nuxt is first in the chian that loads latest consola) For browser, we should add this guard :) |
But SSR will be run in different context, webpack may still resolve wrong consola. How about: // base.js
alias() {
return {
...this.buildContext.options.alias,
consola: require.resolve(`consola/dist/consola${this.isServer ? '' : '.browser'}.js`)
}
} |
Codecov Report
@@ Coverage Diff @@
## dev #5729 +/- ##
========================================
+ Coverage 95.6% 95.6% +<.01%
========================================
Files 82 82
Lines 2662 2663 +1
Branches 683 683
========================================
+ Hits 2545 2546 +1
Misses 98 98
Partials 19 19
Continue to review full report at Codecov.
|
Codecov Report
@@ Coverage Diff @@
## dev #5729 +/- ##
=====================================
Coverage 95.6% 95.6%
=====================================
Files 82 82
Lines 2662 2662
Branches 683 683
=====================================
Hits 2545 2545
Misses 98 98
Partials 19 19
Continue to review full report at Codecov.
|
@clarkdo better idea 👍 |
Fix #5721
Fix nuxt-community/auth-module#348