Module Processor
Following modules will be handed via umi
by default, so you don't have to worry about webpack configuration for them.
Module list
.js, .jsx, .mjs, .jsx, .json
: handled by babel-loader.ts, .tsx
: handled by ts-loader.graphql, .gql
: handled by graphql-tag/loader.css, .less, .sass
: handled by css-loader, postcss-loader, less-loader.svg
: handled by @svgr/core. You can import svg as component as below:
import { ReactComponent as Avatar } from './avatar.svg'
function Example() {
return <Avatar />
}
All other unspecified modules will be handled via url-loader