Move into monaco-editor-webpack-plugin folder

This commit is contained in:
Alex Dima 2021-11-05 12:13:58 +01:00
parent 06e4658c00
commit 94735b023f
No known key found for this signature in database
GPG key ID: 39563C1504FDD0C9
25 changed files with 0 additions and 0 deletions

View file

@ -0,0 +1,13 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Document</title>
</head>
<body>
<div id="container" style="width:800px;height:600px;border:1px solid #ccc"></div>
<script type="text/javascript" src="app.js"></script>
</body>
</html>

View file

@ -0,0 +1,7 @@
import * as monaco from 'monaco-editor/esm/vs/editor/editor.api';
monaco.editor.create(document.getElementById('container'), {
value: 'console.log("Hello, world")',
language: 'javascript'
});

View file

@ -0,0 +1,27 @@
const MonacoWebpackPlugin = require('../out/index.js');
const path = require('path');
const ASSET_PATH = 'http://localhost:8088/monaco-editor-webpack-plugin/test/dist/';
module.exports = {
mode: 'development',
entry: './index.js',
context: __dirname,
output: {
path: path.resolve(__dirname, 'dist'),
filename: 'app.js',
publicPath: ASSET_PATH
},
module: {
rules: [{
test: /\.css$/,
use: ['style-loader', 'css-loader']
}, {
test: /\.ttf$/,
use: ['file-loader']
}]
},
plugins: [
new MonacoWebpackPlugin()
]
};

View file

@ -0,0 +1,24 @@
const MonacoWebpackPlugin = require('../out/index.js');
const path = require('path');
module.exports = {
mode: 'development',
entry: './index.js',
context: __dirname,
output: {
path: path.resolve(__dirname, 'dist'),
filename: 'app.js'
},
module: {
rules: [{
test: /\.css$/,
use: ['style-loader', 'css-loader']
}, {
test: /\.ttf$/,
use: ['file-loader']
}]
},
plugins: [
new MonacoWebpackPlugin()
]
};