web-cheat/monaco-editor-webpack-plugin/webpack.config.js
const MonacoWebpackPlugin = require('monaco-editor-webpack-plugin');
const path = require('path');
module.exports = {
entry: './index.js',
mode: 'production',
output: {
clean: true,
path: path.resolve(__dirname, 'dist'),
filename: 'index.js',
},
module: {
rules: [{
test: /\.css$/,
use: ['style-loader', 'css-loader']
}, {
test: /\.ttf$/,
use: ['file-loader']
}]
},
plugins: [
new MonacoWebpackPlugin({
languages: ['javascript', 'typescript'],
})
]
};