前端是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()
添加回答
举报
0/150
提交
取消
