Gathering detailed insights and metrics for monaco-editor-webpack-plugin
Gathering detailed insights and metrics for monaco-editor-webpack-plugin
Gathering detailed insights and metrics for monaco-editor-webpack-plugin
Gathering detailed insights and metrics for monaco-editor-webpack-plugin
monaco-editor-esm-webpack-plugin
The webpack's plugin for monaco editor to compile the worker and handle with localization
@swordjs/monaco-editor-webpack-plugin
A webpack plugin for the Monaco Editor
monaco-editor-locales-plugin
A webpack plugin for monaco-editor locales setting
monaco-editor-chinese-plugin
A webpack plugin for monaco-editor Chinese setting
A browser based code editor
npm install monaco-editor-webpack-plugin
Typescript
Module System
Node Version
NPM Version
53.2
Supply Chain
67.6
Quality
79.9
Maintenance
100
Vulnerability
99.3
License
JavaScript (61.25%)
TypeScript (37.2%)
HTML (1.49%)
CSS (0.04%)
Shell (0.02%)
SCSS (0.01%)
Total Downloads
57,759,839
Last Day
11,514
Last Week
212,497
Last Month
1,356,342
Last Year
16,847,971
40,900 Stars
3,430 Commits
3,617 Forks
526 Watching
23 Branches
295 Contributors
Latest Version
7.1.0
Package Id
monaco-editor-webpack-plugin@7.1.0
Unpacked Size
23.35 kB
Size
7.42 kB
File Count
12
NPM Version
8.19.4
Node Version
16.20.0
Publised On
10 Jul 2023
Cumulative downloads
Total Downloads
Last day
-83.1%
11,514
Compared to previous day
Last week
-41.9%
212,497
Compared to previous week
Last month
-8.5%
1,356,342
Compared to previous month
Last year
42.1%
16,847,971
Compared to previous year
1
2
A plugin to simplify loading the Monaco Editor with webpack.
1npm install monaco-editor-webpack-plugin
webpack.config.js
:1const MonacoWebpackPlugin = require('monaco-editor-webpack-plugin'); 2const path = require('path'); 3 4module.exports = { 5 entry: './index.js', 6 output: { 7 path: path.resolve(__dirname, 'dist'), 8 filename: 'app.js' 9 }, 10 module: { 11 rules: [ 12 { 13 test: /\.css$/, 14 use: ['style-loader', 'css-loader'] 15 }, 16 { 17 test: /\.ttf$/, 18 type: 'asset/resource' 19 } 20 ] 21 }, 22 plugins: [new MonacoWebpackPlugin()] 23};
If using Webpack 4 or lower, it is necessary to use the file-loader instead of Asset Modules like the code below:
1{ 2 test: /\.ttf$/, 3 use: ['file-loader'] 4}
index.js
:1import * as monaco from 'monaco-editor'; 2// or import * as monaco from 'monaco-editor/esm/vs/editor/editor.api'; 3// if shipping only a subset of the features & languages is desired 4 5monaco.editor.create(document.getElementById('container'), { 6 value: 'console.log("Hello, world")', 7 language: 'javascript' 8});
Options can be passed in to MonacoWebpackPlugin
. They can be used to generate a smaller editor bundle by selecting only certain languages or only certain editor features:
filename
(string
) - custom filename template for worker scripts, respects the same options as loader-utils' interpolateName. Useful for adding content-based hashes so that files can be served with long-lived caching headers.
'[name].worker.js'
.publicPath
(string
) - custom public path for worker scripts, overrides the public path from which files generated by this plugin will be served. This wins out over Webpack's dynamic runtime path and can be useful to avoid attempting to load workers cross-origin when using a CDN for other static resources. Use e.g. '/' if you want to load your resources from the current origin..
''
.languages
(string[]
) - include only a subset of the languages supported. By default, all languages shipped with the monaco-editor
will be included.
Some languages share the same web worker. If one of the following languages is included, you must also include the language responsible for instantiating their shared worker:
Language | Instantiator |
---|---|
javascript | typescript |
handlebars | html |
scss, less | css |
To view a list of all available languages, you can run import metadata from 'monaco-editor/esm/metadata'; console.log(metadata.languages);
.
features
(string[]
) - include only a subset of the editor features. By default, all features shipped with the monaco-editor
will be included. Instead of enumerating included features, it is also possible to exclude certain default features prefixing them with an exclamation mark '!'.
To view a list of all available features, you can run import metadata from 'monaco-editor/esm/metadata'; console.log(metadata.features);
.
globalAPI
(boolean
) - specify whether the editor API should be exposed through a global monaco
object or not. This option is applicable to 0.22.0
and newer version of monaco-editor
. Since 0.22.0
, the ESM version of the monaco editor does no longer define a global monaco
object unless global.MonacoEnvironment = { globalAPI: true }
is set (change log).
false
.monaco-editor-webpack-plugin | monaco-editor |
---|---|
7.*.* | >= 0.31.0 |
6.*.* | 0.30.* |
5.*.* | 0.29.* |
4.*.* | 0.25.* , 0.26.* , 0.27.* , 0.28.* |
3.*.* | 0.22.* , 0.23.* , 0.24.* |
2.*.* | 0.21.* |
1.9.* | 0.20.* |
1.8.* | 0.19.* |
1.7.* | 0.18.* |
This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit https://cla.microsoft.com.
When you submit a pull request, a CLA-bot will automatically determine whether you need to provide a CLA and decorate the PR appropriately (e.g., label, comment). Simply follow the instructions provided by the bot. You will only need to do this once across all repos using our CLA.
This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact opencode@microsoft.com with any additional questions or comments.
No vulnerabilities found.
Reason
30 commit(s) out of 30 and 1 issue activity out of 30 found in the last 90 days -- score normalized to 10
Reason
all last 30 commits are reviewed through GitHub
Reason
no vulnerabilities detected
Reason
security policy file detected
Details
Reason
license file detected
Details
Reason
no dangerous workflow patterns detected
Reason
no binaries found in the repo
Reason
update tool detected
Details
Reason
branch protection is not maximal on development and all release branches
Details
Reason
dependency not pinned by hash detected -- score normalized to 7
Details
Reason
no badge detected
Reason
non read-only tokens detected in GitHub workflows
Details
Reason
project is not fuzzed
Score
Last Scanned on 2022-08-15
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