mirror of
https://github.com/terribleplan/next.js.git
synced 2024-01-19 02:48:18 +00:00
next/dynamic Error Message Tweaks (#2798)
This commit is contained in:
parent
c692101649
commit
72edd591e6
|
@ -13,12 +13,12 @@ export default function dynamicComponent (p, o) {
|
||||||
} else {
|
} else {
|
||||||
// Now we are trying to use the modules and render fields in options to load modules.
|
// Now we are trying to use the modules and render fields in options to load modules.
|
||||||
if (!p.modules || !p.render) {
|
if (!p.modules || !p.render) {
|
||||||
const errorMessage = 'Options to `next/dynamic` should contains `modules` and `render` fields.'
|
const errorMessage = '`next/dynamic` options should contain `modules` and `render` fields'
|
||||||
throw new Error(errorMessage)
|
throw new Error(errorMessage)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (o) {
|
if (o) {
|
||||||
const errorMessage = 'Include options in the first argument which contains `modules` and `render` fields.'
|
const errorMessage = 'Add additional `next/dynamic` options to the first argument containing the `modules` and `render` fields'
|
||||||
throw new Error(errorMessage)
|
throw new Error(errorMessage)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue