如何配置publicPath Webpack

时间:2018-11-29 15:30:49

标签: webpack webpack-dev-server

我的webpack生产配置中的此输出配置

def drawrect(drawcontext, xy, color=None, width=1):
    (x1, y1), (x2, y2) = xy
    offset = 1
    for i in range(0, width):
        drawcontext.rectangle(((x1, y1), (x2, y2)), outline=color)
        x1 = x1 - offset
        y1 = y1 + offset
        x2 = x2 + offset
        y2 = y2 - offset

在src中,我写

# example
from PIL import Image, ImageDraw
im = Image.new("RGB", (150, 150), color="white")
draw = ImageDraw.Draw(im)

drawrect(draw, [(50, 50), (100, 100)], outline="red", width=5)
del draw
im.show()

它正在与webpack开发服务器一起使用,我可以获取图像,但生产无法正常工作。

0 个答案:

没有答案