mirror of
https://github.com/danbulant/monaco-yaml
synced 2026-05-19 04:08:48 +00:00
37 lines
734 B
JavaScript
37 lines
734 B
JavaScript
const { resolve } = require('path');
|
|
|
|
const HtmlWebPackPlugin = require('html-webpack-plugin');
|
|
|
|
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: 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',
|
|
},
|
|
};
|