mirror of
https://github.com/danbulant/monaco-yaml
synced 2026-05-25 12:52:23 +00:00
`react-monaco-editor` has a dependency on `monaco-editor@*`. This makes it annoying to manage the exact version of `monaco-editor` that’s being used.
36 lines
731 B
JavaScript
36 lines
731 B
JavaScript
const HtmlWebPackPlugin = require('html-webpack-plugin');
|
|
const path = require('path');
|
|
|
|
module.exports = {
|
|
entry: {
|
|
main: './index.js',
|
|
'editor.worker': 'monaco-editor/esm/vs/editor/editor.worker.js',
|
|
'yaml.worker': 'monaco-yaml/lib/esm/yaml.worker.js',
|
|
},
|
|
output: {
|
|
globalObject: 'this',
|
|
filename: '[name].bundle.js',
|
|
path: path.resolve(__dirname, 'dist'),
|
|
},
|
|
module: {
|
|
rules: [
|
|
{
|
|
test: /\.css$/,
|
|
use: ['style-loader', 'css-loader'],
|
|
},
|
|
{
|
|
test: /\.ttf$/,
|
|
loader: 'file-loader',
|
|
},
|
|
],
|
|
},
|
|
plugins: [
|
|
new HtmlWebPackPlugin({
|
|
template: './index.html',
|
|
}),
|
|
],
|
|
node: {
|
|
fs: 'empty',
|
|
module: 'empty',
|
|
},
|
|
};
|