-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add size check to react-northstar build (#16686)
- Loading branch information
Showing
7 changed files
with
192 additions
and
63 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,29 @@ | ||
// @ts-check | ||
const { createWebpackConfig, buildEntries, buildEntry } = require('./webpackUtils'); | ||
const { | ||
buildEntries, | ||
buildEntry, | ||
createWebpackConfig, | ||
createFluentNorthstarFixtures, | ||
createFluentReactFixtures, | ||
createEntry, | ||
} = require('./webpackUtils'); | ||
|
||
// Create entries for all top level imports. | ||
const entries = buildEntries('@fluentui/react'); | ||
// If/when we start working in react-next again, the bundle size tests should be set up like this | ||
// so that only the components directly within react-next are tested. | ||
// buildEntries( | ||
// '@fluentui/react-next', | ||
// entries, | ||
// false /* do not include stats for better performance. */, | ||
// true /* onlyOwnComponents */, | ||
// ); | ||
const package = process.env.PACKAGE; | ||
|
||
// Create entries for single top level import. | ||
entries['react-compose'] = buildEntry('@fluentui/react-compose'); | ||
entries['keyboard-key'] = buildEntry('@fluentui/keyboard-key'); | ||
let entries; | ||
if (package === '@fluentui/react-northstar') { | ||
createFluentNorthstarFixtures(); | ||
entries = buildEntries('@fluentui/react-northstar'); | ||
} else if (package === '@fluentui/react') { | ||
createFluentReactFixtures(); | ||
createEntry('@fluentui/react-compose'); | ||
createEntry('@fluentui/keyboard-key'); | ||
|
||
entries = buildEntries('@fluentui/react'); | ||
entries['react-compose'] = buildEntry('@fluentui/react-compose'); | ||
entries['keyboard-key'] = buildEntry('@fluentui/keyboard-key'); | ||
} else { | ||
process.exit(1); | ||
} | ||
|
||
module.exports = createWebpackConfig(entries); |
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