-
Notifications
You must be signed in to change notification settings - Fork 26.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
PostCSS support in next-dev (vercel/turbo#3065)
This adds the ability to add Source transforms on assets, which modify the source code of an asset before parsing. This adds postcss via node.js as first source transform. Co-authored-by: Tobias Koppers <tobias.koppers@googlemail.com>
- Loading branch information
1 parent
d78ad79
commit 132500b
Showing
25 changed files
with
414 additions
and
101 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,11 @@ | ||
const loadConfig = require("next/dist/server/config").default; | ||
const { PHASE_DEVELOPMENT_SERVER } = require("next/dist/shared/lib/constants"); | ||
import loadConfig from "next/dist/server/config"; | ||
import { PHASE_DEVELOPMENT_SERVER } from "next/dist/shared/lib/constants"; | ||
|
||
module.exports = (async () => { | ||
const loadNextConfig = async () => { | ||
const nextConfig = await loadConfig(PHASE_DEVELOPMENT_SERVER, process.cwd()); | ||
nextConfig.rewrites = await nextConfig.rewrites?.(); | ||
nextConfig.redirects = await nextConfig.redirects?.(); | ||
return nextConfig; | ||
})(); | ||
}; | ||
|
||
export { loadNextConfig as default }; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.