Conversation
|
(some GH steps failing because of cache issues) |
Codecov Report
@@ Coverage Diff @@
## dev #6868 +/- ##
=======================================
Coverage 64.46% 64.46%
=======================================
Files 82 82
Lines 2744 2744
Branches 714 714
=======================================
Hits 1769 1769
Misses 741 741
Partials 234 234
Continue to review full report at Codecov.
|
|
@pi0 What's wrong with EDIT: Unless it takes into account vulnerability in some bugged node_modules cache |
clarkdo
left a comment
There was a problem hiding this comment.
@pi0 @kevinmarrec The github action failure is because of a new found DoS vulnerability in all versions of node-sass which doesn't have a patch yet.
https://www.npmjs.com/advisories/961
packages/core/src/index.js
Outdated
| @@ -1,3 +1,12 @@ | |||
| import { loadNuxtConfig } from '@nuxt/config' | |||
| import Nuxt from './nuxt' | |||
There was a problem hiding this comment.
We have export { default as Nuxt } from './nuxt' below, now it can be :
export NuxtSame for export { loadNuxtConfig } from '@nuxt/config'
There was a problem hiding this comment.
I was thinking this way ensure less breaking changes and the fact that we don't export something else by accident. Also fewer characters :)
getNuxt and loadNuxtConfig utilities| @@ -1 +1,10 @@ | |||
| import Builder from './builder' | |||
There was a problem hiding this comment.
Can be export default Builder ?
There was a problem hiding this comment.
The way of exporting classes can be improved in another PR :)
|
Is this a breaking change? If not, we’ll have 2 different programmatic ways, are we planning to remove old way in next release? |
|
@clarkdo No, this PR doesn't break the current type of usage but adding new recommended method of getting nuxt instance. |
|
Hi, @pi0 server.js const { Nuxt, Builder } = require('nuxt');
const nuxt = new Nuxt(config);
await nuxt.ready();nuxt.config.js export default {
publicRuntimeConfig: ($env) => {
return {
NODE_ENV: $env.NODE_ENV,
wtf: 'WTF',
};
},
}The resulting script instead of It would be great to deprecate legacy syntax or add support for |
Types of changes
Description
UPDATE: See docs
@nuxt/configpackage and abstract from CLI argumentsloadNuxtConfig,loadNuxt,getBuilder,buildandgetGeneratorGoal: Making programmatic usage better for making custom solutions without the need to worry about loading config, handling breaking changes for class constructors. Also making
@nuxt/climore lightweight only focusing on its own functionality.Example:
New programmatic usage for using as a middleware: See Example
Checklist: