antd-ts - made alias configable
This commit is contained in:
parent
d65070bcb0
commit
cb16919274
|
@ -25,7 +25,7 @@ const getClientEnvironment = require('./env');
|
|||
const ModuleNotFoundPlugin = require('react-dev-utils/ModuleNotFoundPlugin');
|
||||
const ForkTsCheckerWebpackPlugin = require('react-dev-utils/ForkTsCheckerWebpackPlugin');
|
||||
const typescriptFormatter = require('react-dev-utils/typescriptFormatter');
|
||||
|
||||
const pjson = require('../package.json');
|
||||
const postcssNormalize = require('postcss-normalize');
|
||||
|
||||
// Source maps are resource heavy and can cause out of memory issue for large source files.
|
||||
|
@ -269,14 +269,7 @@ module.exports = function(webpackEnv) {
|
|||
extensions: paths.moduleFileExtensions
|
||||
.map(ext => `.${ext}`)
|
||||
.filter(ext => useTypeScript || !ext.includes('ts')),
|
||||
alias: {
|
||||
// Support React Native Web
|
||||
// https://www.smashingmagazine.com/2016/08/a-glimpse-into-the-future-with-react-native-for-web/
|
||||
//'react-native': 'react-native-web',
|
||||
'omi': 'reomio',
|
||||
"react": "reomio",
|
||||
"react-dom": "reomio"
|
||||
},
|
||||
alias: pjson.alias,
|
||||
plugins: [
|
||||
// Adds support for installing with Plug'n'Play, leading to faster installs and adding
|
||||
// guards against forgotten dependencies and such.
|
||||
|
|
|
@ -160,5 +160,10 @@
|
|||
"@babel/plugin-proposal-object-rest-spread",
|
||||
"@babel/plugin-syntax-dynamic-import"
|
||||
]
|
||||
},
|
||||
"alias": {
|
||||
"omi": "reomio",
|
||||
"react": "reomio",
|
||||
"react-dom": "reomio"
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue