
Research
/Security News
Weaponizing Discord for Command and Control Across npm, PyPI, and RubyGems.org
Socket researchers uncover how threat actors weaponize Discord across the npm, PyPI, and RubyGems ecosystems to exfiltrate sensitive data.
rollup-plugin-monaco-editor
Advanced tools
A rollup plugin to import monaco editor
For now, this plugin supports monaco-editor@0.21.*
~ 0.31.*
.
The following versions have been tested:
0.21.2
0.22.3
0.24.0
0.25.0
0.26.1
0.27.0
0.29.1
0.30.1
0.31.1
This plugin should be used with other plugins. including
@rollup/plugin-node-resolve
rollup-plugin-postcss
(or other plugin can handle .css
files)@rollup/plugin-commonjs
// rollup.config.js
import { nodeResolve } from '@rollup/plugin-node-resolve';
import postcss from 'rollup-plugin-postcss';
import commonjs from '@rollup/plugin-commonjs';
import monaco from 'rollup-plugin-monaco-editor';
export default {
output: {
format: 'es',
dir: 'dist',
},
// ...other config
plugins: [
// ...other plugins
// handle .css files
postcss(),
monaco({
languages: ['json'],
}),
nodeResolve(),
commonjs(),
],
};
Plugin options can be passed in to rollup-plugin-monaco-editor
. They can be used to generate a smaller editor bundle by selecting only certain languages or only certain editor features:
languages
Type: string[]
Default: All available languages depends on the version of monaco-editor
installed.
Example:
monaco({
languages: ['json'],
});
monaco({
languages: ['html', 'css', 'javascript'],
});
features
Type: string
Default: All available features depends on the version of monaco-editor
installed.
Example:
monaco({
features: ['contextmenu'],
});
monaco({
features: ['rename'],
});
esm
Type: boolean
Default: true
if rollup.outputOptions.format
is esm
or es
, otherwise false
.
pathPrefix
Type: string
Default: rollup.outputOptions.dir
with leading slash.
sourcemap
Type: boolean
Default: true
You can set sourcemap
to false
to disable generate sourcemap. It makes build faster.
NOTE: pnpm@6 is used to manage this package
pnpm install
pnpm build
pnpm build:example
pnpm start:example
visit http://localhost:8080
to see the simple demo.
pnpm start
MIT @chengcyber
0.2.1
f61bc3f
Thanks @chengcyber! - Fix circular dependencies warningef141f3
Thanks @chengcyber! - Fix correctness of sourcemapa4b7682
Thanks @chengcyber! - Add sourcemap optionFAQs
> A rollup plugin to import monaco editor
We found that rollup-plugin-monaco-editor demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
/Security News
Socket researchers uncover how threat actors weaponize Discord across the npm, PyPI, and RubyGems ecosystems to exfiltrate sensitive data.
Security News
Socket now integrates with Bun 1.3’s Security Scanner API to block risky packages at install time and enforce your organization’s policies in local dev and CI.
Research
The Socket Threat Research Team is tracking weekly intrusions into the npm registry that follow a repeatable adversarial playbook used by North Korean state-sponsored actors.