Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: update tsconfig-client.json to use ESM #156

Merged
merged 1 commit into from
Oct 28, 2020

Conversation

layershifter
Copy link
Contributor

This PR updates tsconfig-client.json to target module: es6 to enable tree-shaking properly, this also mentioned in official Webpack guide (https://webpack.js.org/guides/typescript/).

module: commonjs

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const react_northstar_1 = require("@fluentui/react-northstar");
console.log(react_northstar_1.teamsTheme);

Output is 1.37 MiB because Module Concatenation used for tree shaking in Webpack 4 does not work with Common JS.

module: es6

import { teamsTheme } from "@fluentui/react-northstar";
console.log(teamsTheme);

Output is 417 KiB.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants