Giter Site home page Giter Site logo

umijs / umi Goto Github PK

View Code? Open in Web Editor NEW
14.9K 263.0 2.6K 146.74 MB

A framework in react community ✨

Home Page: https://umijs.org

License: MIT License

JavaScript 2.74% CSS 0.51% TypeScript 92.48% Smarty 3.34% Less 0.07% HTML 0.81% Vue 0.04%
umi react-framework umijs react

umi's Issues

umi-test jsTranformer not exported properly? (TypeError: Jest: a transform must export a `process` function.)

I get jest-runtime errors

 FAIL  src/components/Authorized/CheckPermissions.test.js
   Test suite failed to run

    TypeError: Jest: a transform must export a `process` function.

      at ScriptTransformer._getTransformer (node_modules/jest-runtime/build/script_transformer.js:152:15)
          at Generator.next (<anonymous>)

This issue doesn't exist in 0.3.0 only in 0.3.1
Please see ant-design/ant-design-pro#776 for more information

umi roadmap

1.0

  • PWA
  • Improve router, #26
  • website
  • Comb configuration items

1.x

  • Improve lighthouse score
  • Plugin system
  • umi-plugin-dva

More webpack configs

Todos

  • sass
  • enableCSSModules -> disableCSSModules
  • devtool (e.g. enable sourcemap in production)

Configs don't support

  • extraBabelPresets and extraBabelPlugins (use babel instead)
  • multipage
  • autoprefixer ( use browsers instead)
  • dllPlugin
  • svgSpriteLoaderDirs
  • library
  • libraryTarget
  • cssModulesExclude

Config changes

  • entry

New Configs

  • babel
  • copy
  • commons
  • browserslist
  • extraResolveModules

Improve umi/dynamic, support config loading component

umi/dynamic 改进

原来的方式:

dynamic(resolve);

支持传入 loading 组件:

dynamic(resolve, {
  loading,
});

支持配置 page 加载时的 LoadingComponent

在 config.js 中,配置 loading 指向返回 LoadComponent 的文件。

{
  "loading": "./PageLoadingComponent"
}

Support specify plugins in dev and build

# Normal usage
$ umi build --plugins path/to/plugin.js

# Multiple plugins
$ umi build --plugins path/to/plugin1.js,path/to/plugin2.js

This will merge with plugins in config.js.

<Link><FormattedMessage /></Link> doesn't work.

<Link to="/test-page" className={styles.test}>
  <FormattedMessage id="lang.message" />
</Link>

will generate the following HTML, can't click.

<span>some message</span>
<Link to="/test-page" className={styles.test}>
  <span>some message</span>
</Link>

will generate the same HTML as in (1.), it can be clicked, but with no pointer cursor.

<Link to="/test-page" className={styles.test}>
  <a><FormattedMessage id="lang.message" /></a>
</Link>

this works fine.

I think it's a bug.

Another thing, Link only accept one child, the following code will throw an exception.

<Link to='xxx'>
  <Icon class=''/> Message
</Link>

Improve eslint

  • print error when .eslintrc JSON parse failed
  • reload dev server when .eslintrc is modified

Improve router

  • use react-router-dom
  • support props.query
  • support variable path (consider static generate)
  • support global layout

Config parameters in route '/search/person/:query/:n'

I can create page file pages/search/person.js to match /search/person.html
Can I put parameters in url?
/search/person/:query/:n

I did this before with react-rotuer:

  User: {
    path: '/user/:id',
    models: () => [import('models/user/detail')],
    component: () => import('./detail/'),
  },   

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.