Gathering detailed insights and metrics for monaco-editor-esm-webpack-plugin
Gathering detailed insights and metrics for monaco-editor-esm-webpack-plugin
Gathering detailed insights and metrics for monaco-editor-esm-webpack-plugin
Gathering detailed insights and metrics for monaco-editor-esm-webpack-plugin
npm install monaco-editor-esm-webpack-plugin
Typescript
Module System
Node Version
NPM Version
JavaScript (100%)
Total Downloads
77,359
Last Day
20
Last Week
137
Last Month
1,525
Last Year
16,583
MIT License
29 Stars
33 Commits
3 Forks
1 Watchers
9 Branches
1 Contributors
Updated on Dec 11, 2024
Latest Version
2.1.0
Package Id
monaco-editor-esm-webpack-plugin@2.1.0
Unpacked Size
58.31 kB
Size
46.74 kB
File Count
7
NPM Version
7.5.3
Node Version
15.10.0
Cumulative downloads
Total Downloads
Last Day
-42.9%
20
Compared to previous day
Last Week
-61%
137
Compared to previous week
Last Month
13%
1,525
Compared to previous month
Last Year
-20.4%
16,583
Compared to previous year
4
3
It dependency on monaco-editor-webpack-plugin.
If you want copy a monaco editor with localization, you can see primefaces-monaco
The webpack's plugin for monaco editor to compile the worker and handle with localization.
npm install monaco-editor-esm-webpack-plugin --save-dev
npm install monaco-editor monaco-editor-webpack-plugin monaco-editor-nls
webpack.config.js
const MonacoWebpackPlugin = require('monaco-editor-esm-webpack-plugin');
module.exports = {
entry: './index.js',
output: {
path: path.resolve(__dirname, 'dist'),
filename: 'app.js'
},
module: {
rules: [
{
test: /\.js/,
enforce: 'pre',
include: /node_modules[\\\/]monaco-editor[\\\/]esm/,
use: MonacoWebpackPlugin.loader
},
{
test: /\.css$/,
use: ['style-loader', 'css-loader']
}
]
},
plugins: [
new MonacoWebpackPlugin()
]
};
Set the locale data in your code
// index.js
import { setLocaleData } from 'monaco-editor-nls';
import zh_CN from 'monaco-editor-nls/locale/zh-hans';
setLocaleData(zh_CN);
// You must import/require after `setLocaleData`
// Do not use `import * as monaco from 'XXX'`, but can use `import('xxx').then(XXX)`
const monaco = require('monaco-editor/esm/vs/editor/editor.api');
monaco.editor.create(document.getElementById('root'), { language: 'javascript' });
There only two options for this plugin. But you can set the monaco-editor-webpack-plugin's options in this options. such as: new MonacoWebpackPlugin({ languages: ['typescript'] })
isMonacoEditorWebapckPlugin - whether monaco-editor-webpack-plugin is used. Default: true
isReplaceNls - whether replace the nls file. Default: true
Why the project can't start after add the plugin with monaco-editor
and monaco-editor-webpack-plugin
?
The version of monaco-editor
should match with monaco-editor-webpack-plugin
, you can see: https://github.com/microsoft/monaco-editor-webpack-plugin/#version-matrix
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
license file detected
Details
Reason
Found 0/23 approved changesets -- score normalized to 0
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
Reason
project is not fuzzed
Details
Reason
branch protection not enabled on development/release branches
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Reason
39 existing vulnerabilities detected
Details
Score
Last Scanned on 2025-06-30
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More