-
Notifications
You must be signed in to change notification settings - Fork 27.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'canary' of github.com:zeit/next.js into dynamic-granula…
…r-chunking
- Loading branch information
Showing
10 changed files
with
51 additions
and
7 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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
import 'firebase/firestore' | ||
export default () => <div>Firebase</div> |
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 |
---|---|---|
@@ -0,0 +1,2 @@ | ||
import 'firebase/firestore' | ||
export default () => <div>Firebase</div> |
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 |
---|---|---|
@@ -0,0 +1,33 @@ | ||
/* eslint-env jest */ | ||
/* global jasmine */ | ||
import path from 'path' | ||
import fs from 'fs-extra' | ||
import { nextBuild } from 'next-test-utils' | ||
|
||
jasmine.DEFAULT_TIMEOUT_INTERVAL = 1000 * 60 * 1 | ||
const appDir = path.join(__dirname, '..') | ||
const nextConfig = path.join(appDir, 'next.config.js') | ||
|
||
describe('Building Firebase', () => { | ||
// TODO: investigate re-enabling this test in node 12 environment | ||
xit('Throws an error when building with firebase dependency with worker_threads', async () => { | ||
await fs.writeFile( | ||
nextConfig, | ||
`module.exports = { experimental: { workerThreads: true } }` | ||
) | ||
const results = await nextBuild(appDir, [], { stdout: true, stderr: true }) | ||
expect(results.stdout + results.stderr).toMatch(/Build error occurred/) | ||
expect(results.stdout + results.stderr).toMatch( | ||
/grpc_node\.node\. Module did not self-register\./ | ||
) | ||
}) | ||
|
||
it('Throws no error when building with firebase dependency without worker_threads', async () => { | ||
await fs.remove(nextConfig) | ||
const results = await nextBuild(appDir, [], { stdout: true, stderr: true }) | ||
expect(results.stdout + results.stderr).not.toMatch(/Build error occurred/) | ||
expect(results.stdout + results.stderr).not.toMatch( | ||
/grpc_node\.node\. Module did not self-register\./ | ||
) | ||
}) | ||
}) |