2016-07-06 98 views

回答

0

我怀疑你有bundle.js

ExpressJS可以使用此声明为静态的文件路径错误:app.use(express.static('public'))即,在站点根的公用文件夹

所以。当你browserify一定要输出JS公用文件夹,像这样:

browserify path/to/js/main.js -o public/bundle.js

那么你就可以访问你的bundle.js通过domain.com/bundle.js