如何使Object.assign工作ie和...传播操作符在所有浏览器上工作。 以下是我的webpack配置文件。
const path = require('path');
module.exports = {
entry: './index.js',
output: {
path: path.join(__dirname, '../../public/admin-portal/js'),
publicPath: '../../public/admin-portal/js',
filename: 'app.js'
},
plugins: [
],
// support source maps
devtool: 'inline-source-map',
module: {
rules: [
{
test: /tinymce[\\/]skins[\\/]/,
loader: 'file-loader?name=[path][name].[ext]&context=node_modules/tinymce'
},
{ test: /\.html$/, exclude: /node_modules|bower_components/, use: ['html-loader'] },
{ test: /\.js$/, exclude: /node_modules|bower_components/, use: ['babel-loader?presets=es2015'] },
{ test: /\.css$/, exclude: /node_modules|bower_components/, use: ['style-loader', 'css-loader'] },
{ test: /\.scss$/, exclude: /node_modules|bower_components/, use: ['style-loader', 'css-loader', 'sass-loader'] },
// // load images (inline base64 URLs for <=30k images)
{ test: /\.(png|svg|jpg|gif)$/, exclude: /node_modules|bower_components/, use: ['url-loader?limit=30720'] }
]
}
};