mirror of
https://github.com/Smaug123/KaTeX
synced 2025-10-05 19:28:39 +00:00
16 lines
542 B
JavaScript
16 lines
542 B
JavaScript
/* eslint no-console:0 */
|
|
|
|
const WebpackDevServer = require("webpack-dev-server");
|
|
const webpack = require("webpack");
|
|
const webpackConfig = require("./webpack.config.js");
|
|
const PORT = 7936;
|
|
|
|
webpackConfig.compilerConfig.forEach((config) => {
|
|
config.entry.unshift(`webpack-dev-server/client?http://localhost:${PORT}/`);
|
|
});
|
|
const compiler = webpack(webpackConfig.compilerConfig);
|
|
const server = new WebpackDevServer(compiler, webpackConfig.devServerConfig);
|
|
|
|
server.listen(PORT);
|
|
console.log(`Serving on http://localhost:${PORT}/ ...`);
|