0

我在使用 parcel 的中间件时遇到问题。

它总是说“未找到条目”!

我究竟做错了什么?

这是代码:

/* ----- Package Imports ----- */
import express from 'express';
import chalk from 'chalk';
import path from 'path';
/* ----- File Imports -----*/
import tools from './tools';

/* ----- End Imports -----*/
import Bundler from 'parcel-bundler';
const bundler = new Bundler('help.html', {});

/*<-------------- Start -------------->*/
const app = express();
app.use(bundler.middleware());

app.listen(2120, () => {
  console.log(chalk.white.bgRed('Server start...'));
  tools.loop(() => console.log(''), 2);
});
4

0 回答 0