Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
N
next.js
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Alex
next.js
Commits
3f51f0ed
Unverified
Commit
3f51f0ed
authored
Oct 04, 2019
by
Joe Haddad
Committed by
GitHub
Oct 04, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add support for CSS Module patching (#8957)
parent
3762e757
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
5 deletions
+3
-5
webpack-config.ts
packages/next/build/webpack-config.ts
+3
-5
No files found.
packages/next/build/webpack-config.ts
View file @
3f51f0ed
...
@@ -921,7 +921,8 @@ export default async function getBaseWebpackConfig(
...
@@ -921,7 +921,8 @@ export default async function getBaseWebpackConfig(
use
&&
use
&&
typeof
use
===
'object'
&&
typeof
use
===
'object'
&&
// Identify use statements only pertaining to `css-loader`
// Identify use statements only pertaining to `css-loader`
use
.
loader
===
'css-loader'
&&
(
use
.
loader
===
'css-loader'
||
use
.
loader
===
'css-loader/locals'
)
&&
use
.
options
&&
use
.
options
&&
typeof
use
.
options
===
'object'
&&
typeof
use
.
options
===
'object'
&&
// The `minimize` property is a good heuristic that we need to
// The `minimize` property is a good heuristic that we need to
...
@@ -963,10 +964,7 @@ export default async function getBaseWebpackConfig(
...
@@ -963,10 +964,7 @@ export default async function getBaseWebpackConfig(
// ... resolve the version of `css-loader` shipped with that
// ... resolve the version of `css-loader` shipped with that
// package instead of whichever was hoisted highest in your
// package instead of whichever was hoisted highest in your
// `node_modules` tree.
// `node_modules` tree.
const
correctCssLoader
=
resolveRequest
(
const
correctCssLoader
=
resolveRequest
(
use
.
loader
,
correctNextCss
)
'css-loader'
,
correctNextCss
)
if
(
correctCssLoader
)
{
if
(
correctCssLoader
)
{
// We saved the user from a failed build!
// We saved the user from a failed build!
use
.
loader
=
correctCssLoader
use
.
loader
=
correctCssLoader
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment