I use react-app-rewired in my project, like this:
const { injectBabelPlugin } = require('react-app-rewired');
module.exports = config => injectBabelPlugin(['import', {
libraryName: 'antd',
libraryDirectory: 'es',
style: 'css'
}], config);
and in my webpack entry file, I use babel-polyfill:
import 'babel-polyfill';
after npm run build... I get my project.
when I run my project in ie10, I get an error : "Set" is not defined.
I think babel-polyfill can not work in now, but I can't understand. How about it?
Don't know on this one and can't offer debug support as my time is limited. Given your ie10 requirement you might be better off using eject.
Oh, thanks.
Try this in config-overrides.js:
config.entry.unshift(
'babel-polyfill'
);
@froston Thanks! This works for me.
I have a browser capability problem with IE11, it can't support String.prototype.startswith method, this can fix it!
Most helpful comment
Try this in
config-overrides.js: