Skip to content
This repository was archived by the owner on Dec 5, 2024. It is now read-only.

Commit 0ac0aa1

Browse files
committed
fix(build): fix publicPath
1 parent 32cf761 commit 0ac0aa1

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

packages/fusuma/src/tasks/build.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ async function build(config, isConsoleOutput = true) {
4444
process.env.NODE_ENV = 'production';
4545
}
4646

47-
await deleteDir(outputDirPath, config.build.publicPath);
47+
await deleteDir(outputDirPath);
4848
await webpackBuild(config, isConsoleOutput, (type) => {
4949
if (type == 'start-build') {
5050
spinner.color = 'yellow';
@@ -54,7 +54,7 @@ async function build(config, isConsoleOutput = true) {
5454

5555
if (!config.meta.thumbnail && config.meta.url) {
5656
spinner.text = 'Generating og:image...';
57-
await createOgImage(outputDirPath);
57+
await createOgImage(outputDirPath, config.build.publicPath);
5858
}
5959

6060
spinner.stop();

packages/fusuma/src/utils/fileServer.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ async function fileServer(basePath, publicPath, port = 5445) {
77
const app = express();
88

99
app.use(express.static(basePath));
10-
app.use(`/${publicPath}`, express.static(basePath));
10+
app.use(publicPath, express.static(basePath));
1111

1212
const server = app.listen(port, (err) => {
1313
if (err) {

0 commit comments

Comments
 (0)