mirror of
https://github.com/microsoft/monaco-editor.git
synced 2025-12-22 19:42:56 +01:00
Simplify sample, update npm deps to remove npm security errors
This commit is contained in:
parent
27b10e31fa
commit
c79ea537b5
7 changed files with 373 additions and 2383 deletions
|
|
@ -1,43 +1,22 @@
|
|||
const path = require("path");
|
||||
const MonacoWebpackPlugin = require("monaco-editor-webpack-plugin");
|
||||
const HtmlWebpackPlugin = require("html-webpack-plugin");
|
||||
|
||||
module.exports = {
|
||||
mode: process.env.NODE_ENV,
|
||||
entry: "./index.js",
|
||||
output: {
|
||||
path: path.resolve(__dirname, "dist"),
|
||||
filename: "[name].bundle.js",
|
||||
},
|
||||
module: {
|
||||
rules: [
|
||||
{
|
||||
test: /\.css$/,
|
||||
use: [
|
||||
"style-loader",
|
||||
"css-loader",
|
||||
],
|
||||
},
|
||||
{
|
||||
test: /\.(png|jpg|gif|svg|woff2?|ttf|eot|otf)$/,
|
||||
use: [
|
||||
{
|
||||
loader: "file-loader",
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
},
|
||||
plugins: [
|
||||
new MonacoWebpackPlugin({
|
||||
languages: ["typescript", "javascript", "css"],
|
||||
}),
|
||||
new HtmlWebpackPlugin()
|
||||
],
|
||||
devServer: {
|
||||
port: 4000,
|
||||
hot: process.env.NODE_ENV === 'development',
|
||||
open: true
|
||||
},
|
||||
devtool: process.argv.includes("--use-sourcemaps") ? "inline-source-map" : false,
|
||||
mode: process.env.NODE_ENV,
|
||||
entry: "./index.js",
|
||||
output: {
|
||||
path: path.resolve(__dirname, "dist"),
|
||||
filename: "[name].bundle.js",
|
||||
},
|
||||
module: {
|
||||
rules: [{
|
||||
test: /\.css$/,
|
||||
use: ["style-loader", "css-loader",],
|
||||
}],
|
||||
},
|
||||
plugins: [
|
||||
new MonacoWebpackPlugin({
|
||||
languages: ["typescript", "javascript", "css"],
|
||||
})
|
||||
]
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue