Fix extension for module/nomodule
This commit is contained in:
parent
e68307df3a
commit
8b0a93b0ed
1 changed files with 4 additions and 4 deletions
|
@ -167,7 +167,7 @@ export class Head extends Component<
|
||||||
return (
|
return (
|
||||||
dedupe(dynamicImports)
|
dedupe(dynamicImports)
|
||||||
.map((bundle: any) => {
|
.map((bundle: any) => {
|
||||||
// `dynamicImports` will contain both `.js` and `.modern.js` when the
|
// `dynamicImports` will contain both `.js` and `.module.js` when the
|
||||||
// feature is enabled. This clause will filter down to the modern
|
// feature is enabled. This clause will filter down to the modern
|
||||||
// variants only.
|
// variants only.
|
||||||
if (!bundle.file.endsWith(getOptionalModernScriptVariant('.js'))) {
|
if (!bundle.file.endsWith(getOptionalModernScriptVariant('.js'))) {
|
||||||
|
@ -201,7 +201,7 @@ export class Head extends Component<
|
||||||
|
|
||||||
return files
|
return files
|
||||||
.map((file: string) => {
|
.map((file: string) => {
|
||||||
// `dynamicImports` will contain both `.js` and `.modern.js` when the
|
// `dynamicImports` will contain both `.js` and `.module.js` when the
|
||||||
// feature is enabled. This clause will filter down to the modern
|
// feature is enabled. This clause will filter down to the modern
|
||||||
// variants only.
|
// variants only.
|
||||||
// This also filters out non-JS assets.
|
// This also filters out non-JS assets.
|
||||||
|
@ -661,8 +661,8 @@ export class NextScript extends Component<OriginProps> {
|
||||||
src={
|
src={
|
||||||
assetPrefix +
|
assetPrefix +
|
||||||
(dynamicBuildId
|
(dynamicBuildId
|
||||||
? `/_next/static/client/pages/_app.${buildId}.modern.js`
|
? `/_next/static/client/pages/_app.${buildId}.module.js`
|
||||||
: `/_next/static/${buildId}/pages/_app.modern.js`) +
|
: `/_next/static/${buildId}/pages/_app.module.js`) +
|
||||||
_devOnlyInvalidateCacheQueryString
|
_devOnlyInvalidateCacheQueryString
|
||||||
}
|
}
|
||||||
nonce={this.props.nonce}
|
nonce={this.props.nonce}
|
||||||
|
|
Loading…
Reference in a new issue