Skip to content

Commit dd97823

Browse files
authored
fix: static files should be requested using relative paths (#234)
1 parent 9dfcd88 commit dd97823

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

packages/toolkit/webpack/config.build.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ const libBundle = createWebpackConfig({
2929
output: {
3030
library: 'AlexLib',
3131
libraryTarget: 'umd',
32+
publicPath: './',
3233
},
3334
externals: [
3435
{
@@ -84,6 +85,7 @@ const libBundleWithReact = createWebpackConfig({
8485
output: {
8586
library: 'AlexLib',
8687
libraryTarget: 'umd',
88+
publicPath: './',
8789
},
8890
externals: [
8991
// 此处没有 external React,将 React 打包进去以应对 React16 的集成方
@@ -127,6 +129,7 @@ const globalBundle = createWebpackConfig({
127129
output: {
128130
library: 'Alex',
129131
libraryTarget: 'global',
132+
publicPath: './',
130133
},
131134
externals: [
132135
{
@@ -169,6 +172,7 @@ const globalBundleWithReact = createWebpackConfig({
169172
output: {
170173
library: 'Alex',
171174
libraryTarget: 'global',
175+
publicPath: './',
172176
},
173177
externals: [
174178
{

0 commit comments

Comments
 (0)