2018-04-11 12:22:25 -03:00
|
|
|
"use strict";
|
2022-08-03 18:30:45 +08:00
|
|
|
const path = require("node:path");
|
2018-04-11 12:22:25 -03:00
|
|
|
|
|
|
|
|
module.exports = {
|
|
|
|
|
entry: {
|
2018-04-11 14:26:48 -03:00
|
|
|
playground: "./playground/index.js",
|
2018-04-11 12:22:25 -03:00
|
|
|
},
|
|
|
|
|
output: {
|
2018-04-11 14:26:48 -03:00
|
|
|
filename: "[name].js",
|
2022-08-03 18:30:45 +08:00
|
|
|
path: path.join(__dirname, "static"),
|
2018-04-11 12:22:25 -03:00
|
|
|
},
|
|
|
|
|
module: {
|
|
|
|
|
rules: [
|
|
|
|
|
{
|
|
|
|
|
test: /\.js$/,
|
|
|
|
|
exclude: /node_modules/,
|
2018-04-11 14:26:48 -03:00
|
|
|
loader: "babel-loader",
|
2018-04-11 12:22:25 -03:00
|
|
|
options: {
|
2019-10-03 19:37:37 +08:00
|
|
|
presets: ["@babel/env", "@babel/react"],
|
2018-04-11 12:22:25 -03:00
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
],
|
2018-04-11 18:22:03 -03:00
|
|
|
},
|
|
|
|
|
externals: {
|
2018-04-17 19:40:02 -03:00
|
|
|
clipboard: "ClipboardJS",
|
2018-04-11 18:22:03 -03:00
|
|
|
codemirror: "CodeMirror",
|
|
|
|
|
react: "React",
|
|
|
|
|
"react-dom": "ReactDOM",
|
2018-04-11 12:22:25 -03:00
|
|
|
},
|
2018-04-11 14:26:48 -03:00
|
|
|
};
|