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
25.8
Supply Chain
49.6
Quality
74.5
Maintenance
100
Vulnerability
99.3
License
JavaScript (100%)
Total Downloads
68,448
Last Day
13
Last Week
72
Last Month
594
Last Year
18,414
29 Stars
33 Commits
3 Forks
1 Watching
9 Branches
1 Contributors
Minified
Minified + Gzipped
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
-18.8%
13
Compared to previous day
Last week
-35.7%
72
Compared to previous week
Last month
-48.4%
594
Compared to previous month
Last year
-13.9%
18,414
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
34 existing vulnerabilities detected
Details
Score
Last Scanned on 2024-12-16
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