Download next.js/test/integration/build-trace-extra-entries/app/next.config.js from Devendra174/react-code-dataset: direct link, hf CLI and curl.
- Browser
- Download file 772 Bytes
-
https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/next.js/test/integration/build-trace-extra-entries/app/next.config.js
- Command line
-
hf download hf://datasets/Devendra174/react-code-dataset/next.js/test/integration/build-trace-extra-entries/app/next.config.js
-
curl -L -o next.config.js https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/next.js/test/integration/build-trace-extra-entries/app/next.config.js
772 Bytes
| const path = require('path') | |
| module.exports = { | |
| webpack(cfg, { isServer, nextRuntime }) { | |
| console.log(cfg.entry) | |
| const origEntry = cfg.entry | |
| cfg.entry = async () => { | |
| const origEntries = await origEntry() | |
| if (isServer && nextRuntime === 'nodejs') { | |
| const curEntry = origEntries['pages/_app'] | |
| origEntries['pages/_app'] = [ | |
| path.join(__dirname, 'lib/get-data.js'), | |
| ...curEntry, | |
| ] | |
| console.log(origEntries) | |
| } | |
| return origEntries | |
| } | |
| return cfg | |
| }, | |
| outputFileTracingIncludes: { | |
| '/index': ['include-me/**/*'], | |
| '/route1': ['include-me/**/*'], | |
| }, | |
| outputFileTracingExcludes: { | |
| '/index': ['public/exclude-me/**/*'], | |
| '/route1': ['public/exclude-me/**/*'], | |
| }, | |
| } | |