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

Commit 52a2ddd

Browse files
committed
feat(config): add publicPath field
1 parent 9c23db0 commit 52a2ddd

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

packages/fusuma/src/configs/fusumarc.js

+1
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ const config = {
4242
build: {
4343
ssr: true,
4444
useCache: true,
45+
publicPath: '/'
4546
},
4647
};
4748

packages/fusuma/src/webpack/webpack.config.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ module.exports = (
3030
const { url, description, thumbnail, siteName, sns, title } = meta;
3131
const { sidebar, targetBlank, showIndex, isVertical, loop, code, chart, math } = slide;
3232
const { js: jsPath, css: cssPath, webpack: webpackPath } = fileExtends;
33-
const { ssr, useCache } = build;
33+
const { ssr, useCache, publicPath } = build;
3434
const { basePath, remoteOrigin, htmlBody = '', buildStage, port, outputDirPath } = internal;
3535
const config = (() => {
3636
switch (type) {
@@ -47,7 +47,7 @@ module.exports = (
4747
entry,
4848
output: {
4949
path: outputDirPath,
50-
publicPath: '/',
50+
publicPath: process.env.NODE_ENV === 'production' ? publicPath : '/',
5151
},
5252
resolveLoader: {
5353
modules: [

0 commit comments

Comments
 (0)