(nextConfig)
| 24 | }) |
| 25 | |
| 26 | const withRawExampleLoader = (nextConfig) => ({ |
| 27 | ...nextConfig, |
| 28 | webpack(config, options) { |
| 29 | config.module.rules.push({ |
| 30 | test: /examples(\/|\\)files(\/|\\).*$/, |
| 31 | use: 'raw-loader', |
| 32 | }) |
| 33 | |
| 34 | if (typeof nextConfig.webpack === 'function') { |
| 35 | return nextConfig.webpack(config, options) |
| 36 | } |
| 37 | |
| 38 | return config |
| 39 | }, |
| 40 | }) |
| 41 | |
| 42 | module.exports = withRawExampleLoader( |
| 43 | withGuidebooks( |