-
-
Notifications
You must be signed in to change notification settings - Fork 114
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Bug Report]: 通过脚本运行出现错误 #1295
Labels
bug
Something isn't working
Comments
我们看一下 |
尝试用一下 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Steps to reproduce
import { BaseBundler, BaseBundlerBuildOpts, BaseBundlerOpts } from "./BaseBundler";
import { build, Server, logger, Compiler } from '@farmfe/core';
// import react from '@farmfe/plugin-react';
interface FarmOpts extends BaseBundlerOpts {
}
export class Farm extends BaseBundler {
constructor(opts: FarmOpts) {
super(opts);
}
async build(_opts: BaseBundlerBuildOpts = {}) {
const buildOpts = {
root: this.opts.root,
plugins: [
// react,
],
};
await build(buildOpts);
}
async dev(_opts: BaseBundlerBuildOpts = {}) {
const buildOpts = {
root: this.opts.root,
output: {
publicPath: '/',
},
};
let compiler = new Compiler({
config: buildOpts,
jsPlugins: [
// react,
],
rustPlugins: [],
});
let server = new Server({
compiler,
logger,
});
await server.createServer({
// @ts-ignore
hmr: {
port: 3000,
host: '0.0.0.0',
},
port: 3000,
host: '0.0.0.0',
});
server.listen();
}
}
Reproduce link
No response
What is actually happening?
正常编译
这个是错误图片
System Info
The text was updated successfully, but these errors were encountered: