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

Typescript Slow Experimental Mode #211

Open
jrwpatterson opened this issue Oct 29, 2020 · 0 comments
Open

Typescript Slow Experimental Mode #211

jrwpatterson opened this issue Oct 29, 2020 · 0 comments

Comments

@jrwpatterson
Copy link
Contributor

jrwpatterson commented Oct 29, 2020

Hi we are proxying you component library over the top of Material-UI and I wanted to see how a component looked in your preview.

I noticed there is a significant speed difference between Typescript and Javascript on loading your system locally.

Your material-ui-merge repo vs our version with only 5 components currently

material-ui-merge (Javascript) Our Component Library (Typescript)
Time To Load 11 seconds 140 seconds
Time to Recompile 7 seconds 82 seconds
Time to Dump 5 seconds 15 seconds

So unless I've done something really silly my dump file time for 5 components is longer than the dump time for the whole material-ui-merge

For reference on the same library, storybook has a time to load of 20 seconds

uxpin.config.js

module.exports = {
  components: {
    categories: [
      {
        name: 'Inputs',
        include: [
          'src/inputs/buttons/button.tsx',
          'src/inputs/text-field/text-field.tsx',
          'src/inputs/select/simple-select.tsx',
        ],
      },
      {
        name: 'Layouts',
        include: ['src/layout/container/container.tsx'],
      },
      {
        name: 'Navigations',
        include: ['src/navigation/nav-list/nav-list.tsx'],
      },
    ],
    webpackConfig: 'webpack.config.js',
  },
  name: 'MyCRM React Design UI',
}

webpack.config.js

const path = require('path')

module.exports = {
  output: {
    path: path.resolve(__dirname, 'build'),
    filename: 'bundle.js',
    publicPath: '/',
  },
  resolve: {
    modules: [__dirname, 'node_modules'],
    extensions: ['.tsx', '.ts', '*', '.js', '.jsx'],
  },
  devtool: 'source-map',
  module: {
    rules: [
      {
        test: /\.svg$/,
        exclude: /node_modules/,
        loader: 'svg-react-loader',
      },
      {
        loader: 'babel-loader',
        test: /\.tsx?$/,
        exclude: /node_modules/,
      },
      {
        enforce: 'pre',
        test: /\.tsx?$/,
        loader: 'source-map-loader',
      },
    ],
  },
}
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

No branches or pull requests

1 participant