monaco-editor webpack.config.js
source link: https://gist.github.com/codeStryke/e193d3bd6ecdad5b741cdf42ce663c7a
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
Instantly share code, notes, and snippets.
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'] }) ] };
Recommend
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK