mirror of
https://github.com/danbulant/monaco-yaml
synced 2026-06-09 09:31:25 +00:00
Merge pull request #59 from remcohaszing/simplify-webpack-example-structures
Use a more minimal webpack config for examples
This commit is contained in:
commit
ce58d4b6d7
12 changed files with 6 additions and 39 deletions
3
.gitignore
vendored
3
.gitignore
vendored
|
|
@ -1,4 +1,5 @@
|
||||||
/node_modules/
|
dist/
|
||||||
|
node_modules/
|
||||||
/out/
|
/out/
|
||||||
/lib/
|
/lib/
|
||||||
*.log
|
*.log
|
||||||
|
|
|
||||||
2
examples/webpack-worker-loader/.gitignore
vendored
2
examples/webpack-worker-loader/.gitignore
vendored
|
|
@ -1,2 +0,0 @@
|
||||||
dist/
|
|
||||||
node_modules/
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
# Demo: Weback + Worker Loader + Monaco + Monaco YAML
|
# Usage example with Webpack and worker-loader
|
||||||
|
|
||||||
To run:
|
To run:
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,16 +1,6 @@
|
||||||
const { resolve } = require('path');
|
|
||||||
|
|
||||||
const HtmlWebPackPlugin = require('html-webpack-plugin');
|
const HtmlWebPackPlugin = require('html-webpack-plugin');
|
||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
entry: {
|
|
||||||
main: './index.js',
|
|
||||||
},
|
|
||||||
output: {
|
|
||||||
globalObject: 'this',
|
|
||||||
filename: '[name].bundle.js',
|
|
||||||
path: resolve(__dirname, 'dist'),
|
|
||||||
},
|
|
||||||
module: {
|
module: {
|
||||||
rules: [
|
rules: [
|
||||||
{
|
{
|
||||||
|
|
@ -23,13 +13,5 @@ module.exports = {
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
plugins: [
|
plugins: [new HtmlWebPackPlugin()],
|
||||||
new HtmlWebPackPlugin({
|
|
||||||
template: './index.html',
|
|
||||||
}),
|
|
||||||
],
|
|
||||||
node: {
|
|
||||||
fs: 'empty',
|
|
||||||
module: 'empty',
|
|
||||||
},
|
|
||||||
};
|
};
|
||||||
|
|
|
||||||
2
examples/webpack/.gitignore
vendored
2
examples/webpack/.gitignore
vendored
|
|
@ -1,2 +0,0 @@
|
||||||
dist/
|
|
||||||
node_modules/
|
|
||||||
|
|
@ -1,17 +1,13 @@
|
||||||
const { resolve } = require('path');
|
|
||||||
|
|
||||||
const HtmlWebPackPlugin = require('html-webpack-plugin');
|
const HtmlWebPackPlugin = require('html-webpack-plugin');
|
||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
entry: {
|
entry: {
|
||||||
main: './index.js',
|
main: './src/index.js',
|
||||||
'editor.worker': 'monaco-editor/esm/vs/editor/editor.worker.js',
|
'editor.worker': 'monaco-editor/esm/vs/editor/editor.worker.js',
|
||||||
'yaml.worker': 'monaco-yaml/lib/esm/yaml.worker.js',
|
'yaml.worker': 'monaco-yaml/lib/esm/yaml.worker.js',
|
||||||
},
|
},
|
||||||
output: {
|
output: {
|
||||||
globalObject: 'this',
|
|
||||||
filename: '[name].bundle.js',
|
filename: '[name].bundle.js',
|
||||||
path: resolve(__dirname, 'dist'),
|
|
||||||
},
|
},
|
||||||
module: {
|
module: {
|
||||||
rules: [
|
rules: [
|
||||||
|
|
@ -25,13 +21,5 @@ module.exports = {
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
plugins: [
|
plugins: [new HtmlWebPackPlugin()],
|
||||||
new HtmlWebPackPlugin({
|
|
||||||
template: './index.html',
|
|
||||||
}),
|
|
||||||
],
|
|
||||||
node: {
|
|
||||||
fs: 'empty',
|
|
||||||
module: 'empty',
|
|
||||||
},
|
|
||||||
};
|
};
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue