new MonacoEditorWebpackPlugin({ languages: ["xml"], features: [] }),
!isDev ? new MiniCssExtractPlugin(): undefined,
!isDev ? new TerserWebpackPlugin() : undefined,
new CleanWebpackPlugin()
]
как вариант: { plugins: [ new HtmlWebpackPlugin({ template: "./src/index.html" }), new MonacoEditorWebpackPlugin({ languages: ["xml"], features: [] }), ...( !isDev ? [ new MiniCssExtractPlugin(), new TerserWebpackPlugin() ] : [] ), new CleanWebpackPlugin() ] }
Обсуждают сегодня