mirror of
https://github.com/microsoft/monaco-editor.git
synced 2025-12-22 18:32:56 +01:00
Reorganize, add webpack sample
This commit is contained in:
parent
f692f47f73
commit
f22dfb79ba
26 changed files with 8904 additions and 9 deletions
27
browser-esm-webpack/webpack.config.js
Normal file
27
browser-esm-webpack/webpack.config.js
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
const path = require('path');
|
||||
const webpack = require('webpack');
|
||||
|
||||
module.exports = {
|
||||
mode: 'development',
|
||||
entry: {
|
||||
"app": './index.js',
|
||||
"editor.worker": 'monaco-editor/esm/vs/editor/editor.worker.js',
|
||||
"json.worker": 'monaco-editor/esm/vs/language/json/json.worker',
|
||||
"css.worker": 'monaco-editor/esm/vs/language/css/css.worker',
|
||||
"html.worker": 'monaco-editor/esm/vs/language/html/html.worker',
|
||||
"ts.worker": 'monaco-editor/esm/vs/language/typescript/ts.worker',
|
||||
},
|
||||
output: {
|
||||
filename: '[name].bundle.js',
|
||||
path: path.resolve(__dirname, 'dist')
|
||||
},
|
||||
module: {
|
||||
rules: [{
|
||||
test: /\.css$/,
|
||||
use: [ 'style-loader', 'css-loader' ]
|
||||
}]
|
||||
},
|
||||
plugins: [
|
||||
new webpack.IgnorePlugin(/^((fs)|(path)|(os)|(crypto)|(source-map-support))$/, /vs\/language\/typescript\/lib/)
|
||||
],
|
||||
};
|
||||
Loading…
Add table
Add a link
Reference in a new issue