mirror of
https://github.com/dagu-org/dagu.git
synced 2025-12-27 22:26:13 +00:00
59 lines
1.2 KiB
JavaScript
59 lines
1.2 KiB
JavaScript
const MonacoWebpackPlugin = require('monaco-editor-webpack-plugin');
|
|
const path = require('path');
|
|
|
|
module.exports = {
|
|
entry: './src/index.tsx',
|
|
module: {
|
|
rules: [
|
|
{
|
|
test: /\.css$/,
|
|
use: ['style-loader', 'css-loader', 'postcss-loader'],
|
|
},
|
|
{
|
|
test: /\.(png|jpg|gif)$/i,
|
|
use: [
|
|
{
|
|
loader: 'url-loader',
|
|
options: {
|
|
encoding: 'base64',
|
|
},
|
|
},
|
|
],
|
|
},
|
|
{
|
|
test: /\.ico$/i,
|
|
type: 'asset/resource',
|
|
generator: {
|
|
filename: '[name][ext]',
|
|
},
|
|
},
|
|
{
|
|
test: /\.ttf$/,
|
|
type: 'asset/resource',
|
|
},
|
|
],
|
|
},
|
|
plugins: [
|
|
new MonacoWebpackPlugin({
|
|
languages: ['yaml'],
|
|
features: ['find'],
|
|
customLanguages: [
|
|
{
|
|
label: 'yaml',
|
|
entry: 'monaco-yaml',
|
|
worker: {
|
|
id: 'monaco-yaml/yamlWorker',
|
|
entry: 'monaco-yaml/yaml.worker',
|
|
},
|
|
},
|
|
],
|
|
}),
|
|
],
|
|
resolve: {
|
|
extensions: ['.tsx', '.ts', '.js', '.d.ts'],
|
|
alias: {
|
|
'@': path.resolve(__dirname, 'src'),
|
|
},
|
|
},
|
|
};
|