monaco-yaml/examples/webpack/webpack.config.js
Remco Haszing 13c46f5de6
Update dependencies
Most notably update to Webpack 5. Webpack 5 supports web workers without
the need of a loader, so the `webpack-worker-loader` example has been
removed.
2021-08-05 18:33:58 +02:00

24 lines
491 B
JavaScript

const HtmlWebPackPlugin = require('html-webpack-plugin');
module.exports = {
resolve: {
fallback: {
// Yaml-ast-parser-custom-tags imports buffer. This can be omitted safely.
buffer: false,
},
},
module: {
rules: [
{
test: /\.css$/,
use: ['style-loader', 'css-loader'],
},
{
// Monaco editor uses .ttf icons.
test: /\.ttf$/,
type: 'asset',
},
],
},
plugins: [new HtmlWebPackPlugin()],
};