monaco-yaml/examples/webpack/webpack.config.js
2021-07-18 13:29:54 +02:00

25 lines
535 B
JavaScript

const HtmlWebPackPlugin = require('html-webpack-plugin');
module.exports = {
entry: {
main: './src/index.js',
'editor.worker': 'monaco-editor/esm/vs/editor/editor.worker.js',
'yaml.worker': 'monaco-yaml/lib/esm/yaml.worker.js',
},
output: {
filename: '[name].bundle.js',
},
module: {
rules: [
{
test: /\.css$/,
use: ['style-loader', 'css-loader'],
},
{
test: /\.ttf$/,
loader: 'file-loader',
},
],
},
plugins: [new HtmlWebPackPlugin()],
};