Skip to content

Commit a348407

Browse files
ijjkkodiakhq[bot]
andauthored
Ensure externals are correct for mini-css-extract-plugin (#25340)
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
1 parent 0aef272 commit a348407

File tree

13 files changed

+1241
-3
lines changed

13 files changed

+1241
-3
lines changed

packages/next/build/webpack/require-hook.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ const hookPropertyMap = new Map(
4343
],
4444
['webpack/lib/GraphHelpers', 'next/dist/compiled/webpack/GraphHelpers'],
4545
['webpack/lib/GraphHelpers.js', 'next/dist/compiled/webpack/GraphHelpers'],
46+
['webpack/lib/NormalModule', 'next/dist/compiled/webpack/NormalModule'],
4647
['webpack-sources', 'next/dist/compiled/webpack/sources'],
4748
['webpack-sources/lib', 'next/dist/compiled/webpack/sources'],
4849
['webpack-sources/lib/index', 'next/dist/compiled/webpack/sources'],

packages/next/compiled/mini-css-extract-plugin/index.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/next/compiled/mini-css-extract-plugin/loader.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/next/taskfile.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -694,7 +694,7 @@ export async function ncc_webpack_bundle5(task, opts) {
694694
}
695695

696696
const webpackBundlePackages = {
697-
webpack: 'next/dist/compiled/webpack/webpack',
697+
webpack: 'next/dist/compiled/webpack/webpack-lib',
698698
}
699699

700700
Object.assign(externals, webpackBundlePackages)
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
module.exports = {
2+
future: {
3+
webpack5: false,
4+
},
5+
}
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
import styles from './Component2.module.scss'
2+
3+
export default function Content2() {
4+
return (
5+
<div className={styles.container}>
6+
<h1 className={styles.header}>Where does it come from?</h1>
7+
<div className={styles.textContent}>
8+
Contrary to popular belief, Lorem Ipsum is not simply random text. It
9+
has roots in a piece of classical Latin literature from 45 BC, making it
10+
over 2000 years old. Richard McClintock, a Latin professor at
11+
Hampden-Sydney College in Virginia, looked up one of the more obscure
12+
Latin words, consectetur, from a Lorem Ipsum passage, and going through
13+
the cites of the word in classical literature, discovered the
14+
undoubtable source. Lorem Ipsum comes from sections 1.10.32 and 1.10.33
15+
of "de Finibus Bonorum et Malorum" (The Extremes of Good and Evil) by
16+
Cicero, written in 45 BC. This book is a treatise on the theory of
17+
ethics, very popular during the Renaissance. The first line of Lorem
18+
Ipsum, "Lorem ipsum dolor sit amet..", comes from a line in section
19+
1.10.32. The standard chunk of Lorem Ipsum used since the 1500s is
20+
reproduced below for those interested. Sections 1.10.32 and 1.10.33 from
21+
"de Finibus Bonorum et Malorum" by Cicero are also reproduced in their
22+
exact original form, accompanied by English versions from the 1914
23+
translation by H. Rackham.
24+
</div>
25+
</div>
26+
)
27+
}
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
.header {
2+
font-style: italic;
3+
}
4+
5+
.container {
6+
background-color: #dddddd;
7+
padding: 1rem;
8+
}
9+
10+
.textContent {
11+
color: #666;
12+
letter-spacing: -1px;
13+
}
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
import styles from './Content.module.css'
2+
import Content2 from './Component2'
3+
4+
export default function Content() {
5+
return (
6+
<div className={styles.container}>
7+
<h1 className={styles.header}>Where does it come from?</h1>
8+
<div className={styles.textContent}>
9+
Contrary to popular belief, Lorem Ipsum is not simply random text. It
10+
has roots in a piece of classical Latin literature from 45 BC, making it
11+
over 2000 years old. Richard McClintock, a Latin professor at
12+
Hampden-Sydney College in Virginia, looked up one of the more obscure
13+
Latin words, consectetur, from a Lorem Ipsum passage, and going through
14+
the cites of the word in classical literature, discovered the
15+
undoubtable source. Lorem Ipsum comes from sections 1.10.32 and 1.10.33
16+
of "de Finibus Bonorum et Malorum" (The Extremes of Good and Evil) by
17+
Cicero, written in 45 BC. This book is a treatise on the theory of
18+
ethics, very popular during the Renaissance. The first line of Lorem
19+
Ipsum, "Lorem ipsum dolor sit amet..", comes from a line in section
20+
1.10.32. The standard chunk of Lorem Ipsum used since the 1500s is
21+
reproduced below for those interested. Sections 1.10.32 and 1.10.33 from
22+
"de Finibus Bonorum et Malorum" by Cicero are also reproduced in their
23+
exact original form, accompanied by English versions from the 1914
24+
translation by H. Rackham.
25+
</div>
26+
<Content2 />
27+
</div>
28+
)
29+
}
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
.header {
2+
font-style: italic;
3+
}
4+
5+
.container {
6+
background-color: #dddddd;
7+
padding: 1rem;
8+
}
9+
10+
.textContent {
11+
color: #666;
12+
letter-spacing: -1px;
13+
}

0 commit comments

Comments
 (0)