mirror of
https://gitee.com/ant-design-vue/ant-design-vue.git
synced 2024-11-30 02:57:50 +08:00
c351cba0e7
* update webpack to 4.x
46 lines
1.1 KiB
JavaScript
46 lines
1.1 KiB
JavaScript
'use strict';
|
|
|
|
module.exports = function(modules) {
|
|
const plugins = [
|
|
require.resolve('babel-plugin-transform-vue-jsx'),
|
|
require.resolve('babel-plugin-inline-import-data-uri'),
|
|
require.resolve('babel-plugin-transform-es3-member-expression-literals'),
|
|
require.resolve('babel-plugin-transform-es3-property-literals'),
|
|
require.resolve('babel-plugin-transform-object-assign'),
|
|
require.resolve('babel-plugin-transform-object-rest-spread'),
|
|
require.resolve('babel-plugin-transform-class-properties'),
|
|
];
|
|
plugins.push([
|
|
require.resolve('babel-plugin-transform-runtime'),
|
|
{
|
|
polyfill: false,
|
|
},
|
|
]);
|
|
return {
|
|
presets: [
|
|
[
|
|
require.resolve('babel-preset-env'),
|
|
{
|
|
modules,
|
|
targets: {
|
|
browsers: [
|
|
'last 2 versions',
|
|
'Firefox ESR',
|
|
'> 1%',
|
|
'ie >= 9',
|
|
'iOS >= 8',
|
|
'Android >= 4',
|
|
],
|
|
},
|
|
},
|
|
],
|
|
],
|
|
plugins,
|
|
env: {
|
|
test: {
|
|
plugins: [require.resolve('babel-plugin-istanbul')],
|
|
},
|
|
},
|
|
};
|
|
};
|