mirror of
https://github.com/zhigang1992/react-jsonschema-form.git
synced 2026-01-12 22:50:02 +08:00
* feat: use monaco for playground * fix: don't automatically indent code added to playground * fix: automatic resizing
51 lines
1.1 KiB
JavaScript
51 lines
1.1 KiB
JavaScript
var path = require("path");
|
|
var webpack = require("webpack");
|
|
const MonacoWebpackPlugin = require('monaco-editor-webpack-plugin');
|
|
|
|
module.exports = {
|
|
mode: "development",
|
|
devtool: "source-map",
|
|
entry: [
|
|
"webpack-hot-middleware/client?reload=true",
|
|
"./playground/app"
|
|
],
|
|
output: {
|
|
path: path.join(__dirname, "build"),
|
|
filename: "bundle.js",
|
|
publicPath: "/static/"
|
|
},
|
|
plugins: [
|
|
new MonacoWebpackPlugin({
|
|
languages: ['json']
|
|
}),
|
|
new webpack.HotModuleReplacementPlugin(),
|
|
],
|
|
module: {
|
|
rules: [
|
|
{
|
|
test: /\.jsx?$/,
|
|
use: [
|
|
"babel-loader",
|
|
],
|
|
include: [
|
|
path.join(__dirname, "src"),
|
|
path.join(__dirname, "playground"),
|
|
path.join(__dirname, "node_modules", "codemirror", "mode", "javascript"),
|
|
]
|
|
},
|
|
{
|
|
test: /\.css$/,
|
|
use: [
|
|
"style-loader",
|
|
"css-loader",
|
|
],
|
|
include: [
|
|
path.join(__dirname, "css"),
|
|
path.join(__dirname, "playground"),
|
|
path.join(__dirname, "node_modules"),
|
|
],
|
|
},
|
|
]
|
|
}
|
|
};
|