You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
74 lines
1.6 KiB
JavaScript
74 lines
1.6 KiB
JavaScript
5 years ago
|
"use strict";
|
||
|
|
||
|
const budoExpress = require("budo-express");
|
||
|
const path = require("path");
|
||
|
|
||
|
budoExpress({
|
||
|
port: 8000,
|
||
|
debug: true,
|
||
|
expressApp: require("../src/app")(),
|
||
|
basePath: path.resolve(__dirname, ".."),
|
||
|
entryPath: "src/client/index.jsx",
|
||
|
publicPath: "public",
|
||
|
bundlePath: "js/bundle.js",
|
||
|
livereload: "**/*.{css,html}",
|
||
|
browserify: {
|
||
|
extensions: [".jsx"],
|
||
|
plugin: [
|
||
|
"browserify-hmr"
|
||
|
],
|
||
|
transform: [
|
||
|
["babelify", {
|
||
|
presets: ["@babel/preset-env", "@babel/preset-react"],
|
||
|
// plugins: ["react-hot-loader/babel"]
|
||
|
}]
|
||
|
]
|
||
|
},
|
||
|
});
|
||
|
|
||
|
|
||
|
// const app = require("../src/app.js")();
|
||
|
|
||
|
// if (process.env.NODE_ENV === "development") {
|
||
|
// const budo = require("budo");
|
||
|
|
||
|
// function projectPath(targetPath) {
|
||
|
// return path.resolve(__dirname, "..", targetPath);
|
||
|
// }
|
||
|
|
||
|
// budo(projectPath("src/client/index.jsx"), {
|
||
|
// watchGlob: projectPath("public/css/*.css"),
|
||
|
// live: "**/*.css",
|
||
|
// stream: process.stdout,
|
||
|
// port: 8000,
|
||
|
// dir: projectPath("public"),
|
||
|
// serve: "js/bundle.js",
|
||
|
// debug: true,
|
||
|
// browserify: {
|
||
|
// extensions: [".jsx"],
|
||
|
// plugin: [
|
||
|
// "browserify-hmr"
|
||
|
// ],
|
||
|
// transform: [
|
||
|
// ["babelify", {
|
||
|
// presets: ["@babel/preset-env", "@babel/preset-react"],
|
||
|
// plugins: ["react-hot-loader/babel"]
|
||
|
// }]
|
||
|
// ]
|
||
|
// },
|
||
|
// middleware: function (req, res, next) {
|
||
|
// app.handle(req, res, (err) => {
|
||
|
// if (err != null && err instanceof Error) {
|
||
|
// res.send("<pre>" + err.stack + "</pre>");
|
||
|
// } else {
|
||
|
// next(err);
|
||
|
// }
|
||
|
// });
|
||
|
// }
|
||
|
// });
|
||
|
// } else {
|
||
|
// app.listen(3000).on("listening", () => {
|
||
|
// console.log("Listening...");
|
||
|
// });
|
||
|
// }
|