Hi there,
I'm trying to create the most minimal bundle possible for a simple markdown editor, with no extra features enabled.
Here's my configuration:
const path = require("path");
const MonacoWebpackPlugin = require("monaco-editor-webpack-plugin");
module.exports = {
mode: 'production',
entry: "./index.js",
output: {
path: path.resolve(__dirname, "dist"),
filename: "[name].bundle.js",
},
module: {
rules: [{
test: /\.css$/,
use: ["style-loader", "css-loader",],
}, {
test: /\.ttf$/,
use: ['file-loader']
}],
},
plugins: [
new MonacoWebpackPlugin({
languages: ["markdown"],
features: [
'!accessibilityHelp',
'!bracketMatching',
'!caretOperations',
'!clipboard',
'!codeAction',
'!codelens',
'!colorDetector',
'!comment',
'!contextmenu',
'!coreCommands',
'!cursorUndo',
'!dnd',
'!find',
'!folding',
'!fontZoom',
'!format',
'!gotoError',
'!gotoLine',
'!gotoSymbol',
'!hover',
'!iPadShowKeyboard',
'!inPlaceReplace',
'!inspectTokens',
'!linesOperations',
'!links',
'!multicursor',
'!parameterHints',
'!quickCommand',
'!quickOutline',
'!referenceSearch',
'!rename',
'!smartSelect',
'!snippets',
'!suggest',
'!toggleHighContrast',
'!toggleTabFocusMode',
'!transpose',
'!wordHighlighter',
'!wordOperations',
'!wordPartOperations'
]
})
]
};
My main.bundle.js comes out at 1.5mb which seems quite big. Is this the minimum size of the editor or is there any way to slim this down even further?
Hi there,
I'm trying to create the most minimal bundle possible for a simple markdown editor, with no extra features enabled.
Here's my configuration:
My main.bundle.js comes out at 1.5mb which seems quite big. Is this the minimum size of the editor or is there any way to slim this down even further?