使用webpack时出错

时间:2015-12-28 15:00:03

标签: javascript node.js webpack

我创建了这个nodejs脚本,需要phantomjs来访问DOM:

var phantom = require('phantom');
phantom.create(function(ph) {
    ph.createPage(function(page) {
        page.open("editor3.html", function(status) {
            console.log("opened diagram? ", status);
            page.evaluate(function() {
                return document.getElementById("GraphImage").src;
            }, function(result) {
                console.log(result)
                ph.exit();
            });
        });
    });
},{
    dnodeOpts : {
        weak : false
    }
});

我正在尝试使用webpack来获取javascript代码,但是当我运行此命令时:

webpack ./entry.js bundle.js

我收到此错误:

WebpackError

0 个答案:

没有答案