monaco-editor/samples/browser-esm-webpack/webpack.config.js

31 lines
709 B
JavaScript
Raw Normal View History

2018-03-14 23:37:11 +08:00
const path = require('path');
module.exports = {
mode: 'development',
entry: {
2020-09-02 23:35:10 +08:00
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'
2018-03-14 23:37:11 +08:00
},
output: {
globalObject: 'self',
2018-03-14 23:37:11 +08:00
filename: '[name].bundle.js',
path: path.resolve(__dirname, 'dist')
},
module: {
2020-09-02 23:35:10 +08:00
rules: [
{
test: /\.css$/,
use: ['style-loader', 'css-loader']
},
{
test: /\.ttf$/,
use: ['file-loader']
}
]
}
2018-03-14 23:37:11 +08:00
};