Buckets:
silverwolf-x/project / test /production /app-dir /reference-tree-shaking /reference-tree-shaking.test.ts
| import { nextTestSetup } from 'e2e-utils' | |
| describe('reference-tree-shaking', () => { | |
| const { next } = nextTestSetup({ | |
| files: __dirname, | |
| }) | |
| it('Should apply removeUnusedImports tree shaking to client and server references', async () => { | |
| const res = await next.fetch('/') | |
| expect(await res.text()).toContain('This is Server') | |
| // Only Turbopack applies inner graph tree shaking here | |
| if (process.env.IS_TURBOPACK_TEST) { | |
| const serverReferences = await next.readFile( | |
| '.next/server/server-reference-manifest.json' | |
| ) | |
| expect(serverReferences).not.toContain('library/action.js') | |
| const clientReferences = await next.readFile( | |
| '.next/server/app/page_client-reference-manifest.js' | |
| ) | |
| expect(clientReferences).not.toContain('library/client.js') | |
| } | |
| }) | |
| }) | |
Xet Storage Details
- Size:
- 828 Bytes
- Xet hash:
- 78afba663880c37056f54474bcf4cd113977089c774b0c1ecb9357bce78130a1
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.