Comments (4)
Hey all, I've found the issue.
Check out the usage for Monaco Editor Webpack Plugin.
react-monaco-editor
should be using:
import * as monaco from 'monaco-editor/esm/vs/editor/editor.api'
but it uses
import * as monaco from 'monaco-editor'
instead. This forces monaco-editor-webpack-plugin to build the entire editor instead of only what you tell it.
I've solved this issue by adding an alias for monaco-editor
in my webpack.config.js
:
const path = require('path');
const webpack = require('webpack');
const MonacoEditorPlugin = require('monaco-editor-webpack-plugin');
module.exports = {
mode: 'development',
entry: './src/app.js',
devtool: 'source-map',
output: {
path: path.resolve('dist'),
filename: 'app.js'
},
module: {
rules: [{
test: /\.css$/,
use: ['style-loader', 'css-loader']
}]
},
// ALIAS
resolve: {
alias: {
'monaco-editor': 'monaco-editor/esm/vs/editor/editor.api.js'
}
},
plugins: [
new MonacoEditorPlugin({
languages: ['javascript', 'typescript'],
features: []
})
]
};
This issue should be closed as it has nothing to do with monaco-editor-webpack-plugin
from monaco-editor-webpack-plugin.
Same here.
Also features: ['!toggleHighContrast', '!accessibilityHelp', '!contextmenu', '!codelens']
doesn't seem to work.
from monaco-editor-webpack-plugin.
I have the same issue with the same setup. Is there any temporary workaround to force those bundles to not be generated?
from monaco-editor-webpack-plugin.
I ran into the same problem just a few minutes ago. I actually thought something was wrong with my webpack...
from monaco-editor-webpack-plugin.
Related Issues (20)
- How to chunk monaco-editor?
- Add support for webpack 5 HOT 4
- All languages are bundled HOT 3
- Safari errors HOT 2
- Error: Cannot find module 'vs/editor/contrib/anchorSelect/anchorSelect' HOT 3
- How to lazy load the chunk of monaco editor? HOT 3
- MonacoEnvironment.getWorker() doesn't fire for custom language HOT 4
- Example with "customLanguages" config section needed HOT 9
- Namespace 'webpack' has no exported member 'WebpackPluginInstance'. HOT 1
- trouble when trying to use monaco-editor on my own server HOT 6
- Cannot find module 'vs/editor/contrib/rename/onTypeRename' HOT 2
- Module not found : rename/onTypeRename HOT 1
- Use compiler.webpack instead of require('webpack') HOT 8
- [3.0.0] peerDependencies range specifies only 0.22.x; README says 0.23 is supported HOT 1
- Unable to use `global.MonacoEnvironment = { globalAPI: true }` to define a global monaco object
- Cannot read property 'split' of undefined HOT 1
- Outdated languages list HOT 2
- The monaco-editor version you rely on is not up to date HOT 1
- How does monaco-editor-webpack-plugin support go language?I need help!!! HOT 1
- What is the role of monaco-editor-webpack-plugin? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from monaco-editor-webpack-plugin.