为了账号安全,请及时绑定邮箱和手机立即绑定

python的web.py 做后台无法识别webpack 打出的bundle.js

python的web.py 做后台无法识别webpack 打出的bundle.js

江户川乱折腾 2019-02-27 10:22:05
前端是webpack+React的一个小demo,直接访问页面无报错使用web.py作为本地服务器时 控制台输出 Uncaught SyntaxError: Unexpected token <经验证发现 代码中出现<script type="text/javascript" src="./out/bundle.js"></script>时报错bundle.js为webpack打包出的文件前端代码在https://github.com/shisi1010/...python代码    # -*- coding: utf-8 -*-        import web        render = web.template.render('react_webpack')        urls = (        '/index', 'index',         '/(.*)', 'hello'    )    app = web.application(urls, globals())        class index:        def GET(self):            query = web.input()            return query        class hello:        def GET(self, name):            return render.xxx()    if __name__ == "__main__":        app.run()
查看完整描述

1 回答

  • 1 回答
  • 0 关注
  • 441 浏览
慕课专栏
更多

添加回答

举报

0/150
提交
取消
微信客服

购课补贴
联系客服咨询优惠详情

帮助反馈 APP下载

慕课网APP
您的移动学习伙伴

公众号

扫描二维码
关注慕课网微信公众号