Я попытаюсь использовать uglify с веб-пакетом, но получил эту ошибку:
Invalid configuration object. Webpack has been initialised using a configuration object that does not match the API schema.
- configuration has an unknown property 'optimization'. These properties are valid:
object { amd?, bail?, cache?, context?, dependencies?, devServer?, devtool?, entry, externals?, loader?, module?, name?, node?, output?, performance?, plugins?, profile?, recordsInputPath?, recordsOutputPath?, recordsPath?, resolve?, resolveLoader?, stats?, target?, watch?, watchOptions? }
У меня есть
const UglifyJsPlugin = require('uglifyjs-webpack-plugin');
и
optimization: {
minimizer: [new UglifyJsPlugin()]
}
в моем веб-пакете.config.js, похоже, веб-пакет не распознает «оптимизацию»?