|
1 | 1 | import { makeBaseNPMConfig, makeNPMConfigVariants } from '../../rollup/index.js';
|
2 | 2 |
|
3 |
| -export default makeNPMConfigVariants( |
4 |
| - makeBaseNPMConfig({ |
5 |
| - // We need to include `instrumentServer.ts` separately because it's only conditionally required, and so rollup |
6 |
| - // doesn't automatically include it when calculating the module dependency tree. |
7 |
| - entrypoints: ['src/index.server.ts', 'src/index.client.ts', 'src/utils/instrumentServer.ts'], |
8 |
| - // prevent this nextjs code from ending up in our built package (this doesn't happen automatially because the name |
9 |
| - // doesn't match an SDK dependency) |
10 |
| - packageSpecificConfig: { external: ['next/router'] }, |
11 |
| - }), |
12 |
| -); |
| 3 | +export default [ |
| 4 | + ...makeNPMConfigVariants( |
| 5 | + makeBaseNPMConfig({ |
| 6 | + // We need to include `instrumentServer.ts` separately because it's only conditionally required, and so rollup |
| 7 | + // doesn't automatically include it when calculating the module dependency tree. |
| 8 | + entrypoints: ['src/index.server.ts', 'src/index.client.ts', 'src/utils/instrumentServer.ts'], |
| 9 | + |
| 10 | + // prevent this internal nextjs code from ending up in our built package (this doesn't happen automatially because |
| 11 | + // the name doesn't match an SDK dependency) |
| 12 | + packageSpecificConfig: { external: ['next/router'] }, |
| 13 | + }), |
| 14 | + ), |
| 15 | + ...makeNPMConfigVariants( |
| 16 | + makeBaseNPMConfig({ |
| 17 | + entrypoints: ['src/config/prefixLoaderTemplate.ts'], |
| 18 | + |
| 19 | + packageSpecificConfig: { |
| 20 | + output: { |
| 21 | + // preserve the original file structure (i.e., so that everything is still relative to `src`) |
| 22 | + entryFileNames: 'config/[name].js', |
| 23 | + |
| 24 | + // this is going to be add-on code, so it doesn't need the trappings of a full module (and in fact actively |
| 25 | + // shouldn't have them, lest they muck with the module to which we're adding it) |
| 26 | + sourcemap: false, |
| 27 | + esModule: false, |
| 28 | + }, |
| 29 | + }, |
| 30 | + }), |
| 31 | + ), |
| 32 | +]; |
0 commit comments