Created
October 20, 2021 00:47
-
-
Save codeStryke/e193d3bd6ecdad5b741cdf42ce663c7a to your computer and use it in GitHub Desktop.
monaco-editor webpack.config.js for sql language
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const TerserPlugin = require("terser-webpack-plugin"); | |
const MonacoWebpackPlugin = require('monaco-editor-webpack-plugin'); | |
const path = require('path'); | |
module.exports = { | |
entry: './index.js', | |
mode: 'development', | |
optimization: { | |
minimize: false, | |
minimizer: [ | |
new TerserPlugin({ | |
extractComments: false, | |
terserOptions: { | |
format: { | |
comments: false, | |
}, | |
}, | |
}), | |
], | |
}, | |
output: { | |
path: path.resolve(__dirname, 'dist'), | |
filename: 'monaco-editor.esm.js' | |
}, | |
module: { | |
rules: [{ | |
test: /\.css$/, | |
use: ['style-loader', 'css-loader'] | |
}, { | |
test: /\.ttf$/, | |
type: 'asset/resource' | |
}] | |
}, | |
plugins: [ | |
new MonacoWebpackPlugin({ languages: ['sql'] }) | |
] | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment