Use a more minimal webpack config for examples

This commit is contained in:
Remco Haszing 2021-07-18 13:29:17 +02:00
parent b276fd26d1
commit 249de5dc34
No known key found for this signature in database
GPG key ID: 40D9F5FE9155FD3C
12 changed files with 6 additions and 39 deletions

3
.gitignore vendored
View file

@ -1,4 +1,5 @@
/node_modules/
dist/
node_modules/
/out/
/lib/
*.log

View file

@ -1,2 +0,0 @@
dist/
node_modules/

View file

@ -1,4 +1,4 @@
# Demo: Weback + Worker Loader + Monaco + Monaco YAML
# Usage example with Webpack and worker-loader
To run:

View file

@ -1,16 +1,6 @@
const { resolve } = require('path');
const HtmlWebPackPlugin = require('html-webpack-plugin');
module.exports = {
entry: {
main: './index.js',
},
output: {
globalObject: 'this',
filename: '[name].bundle.js',
path: resolve(__dirname, 'dist'),
},
module: {
rules: [
{
@ -23,13 +13,5 @@ module.exports = {
},
],
},
plugins: [
new HtmlWebPackPlugin({
template: './index.html',
}),
],
node: {
fs: 'empty',
module: 'empty',
},
plugins: [new HtmlWebPackPlugin()],
};

View file

@ -1,2 +0,0 @@
dist/
node_modules/

View file

@ -1,17 +1,13 @@
const { resolve } = require('path');
const HtmlWebPackPlugin = require('html-webpack-plugin');
module.exports = {
entry: {
main: './index.js',
main: './src/index.js',
'editor.worker': 'monaco-editor/esm/vs/editor/editor.worker.js',
'yaml.worker': 'monaco-yaml/lib/esm/yaml.worker.js',
},
output: {
globalObject: 'this',
filename: '[name].bundle.js',
path: resolve(__dirname, 'dist'),
},
module: {
rules: [
@ -25,13 +21,5 @@ module.exports = {
},
],
},
plugins: [
new HtmlWebPackPlugin({
template: './index.html',
}),
],
node: {
fs: 'empty',
module: 'empty',
},
plugins: [new HtmlWebPackPlugin()],
};