使用watchify制作捆绑包后出现blob错误 [英] get blob error after using watchify to make a bundle

查看:93
本文介绍了使用watchify制作捆绑包后出现blob错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我要做什么? 我想使用节点模块和es6 javascript语法创建一个项目.为了使它尽可能地模块化和独立,我决定转而进行观察. 我的html页面看起来像这样

What I am trying to do? I want to create a project using node modules and es6 javascript syntax. To make it as modular and independent as it is possible, I decided to switch to watchify. My html page is looking something like this

...some unrelated html code

<dib id='content'></div>
<script type='text/javascript' src='correct(checked) path to my bundle.js file'></script>

...some unrelated html code

我的whatchify命令如下所示

my whatchify command is look like this

watchify src/app.js -o destination/bundle.js -t [babelify --presets [ es2015 ] ]

我的家属看起来像这样

"dependencies": {
    "bluebird": "^3.5.1",
    "jquery": "^3.3.1",
    "three": "^0.92.0",
    "three-obj-exporter": "0.0.1",
    "three-obj-loader": "^1.1.3"
  },
  "devDependencies": {
    "babel-cli": "^6.26.0",
    "babel-core": "^6.26.3",
    "babel-preset-env": "^1.6.1",
    "babel-preset-es2015": "^6.24.1",
    "babel-preset-stage-2": "^6.24.1",
    "babelify": "^8.0.0",
    "nodemon": "^1.17.4"
  }

现在,我的src文件中没有太多内容,我只是从test.js文件中导入了一个测试函数,并需要使用jquery.

for now there is no much in my src file I just imported a test function from a test.js file and required jquery.

import print from './taskobject';

function test(){
    return 0;
}

现在,我不了解什么? 从字面上看,我什么也没做,但是我仍然在控制台中不断出现以下错误

Now, whats I don't understand? Literally I do nothing, but I still keep getting the following error in console

GET blob:http://127.0.0.1/fbfa8eff-f538-42cf-aa2d-ae2940247aaf 0 ()
(anonymous) @ inject.preload.js:373
__webpack_require__ @ bootstrap a58e717ca664391e8660:19
splitSelector.splitSelector @ common.js:103
__webpack_require__ @ bootstrap a58e717ca664391e8660:19
exports.textToRegExp @ bootstrap a58e717ca664391e8660:62
(anonymous) @ bootstrap a58e717ca664391e8660:62

有问题吗? 我需要webpack来使用watchify/browserify吗?我是否使用了编译" es6 + node代码所需的所有预设?我错过了什么?

A question? Do I need webpack to use watchify/browserify? Do I used all preset I needed for "compiling" es6+node code? What have I missed?

推荐答案

我认为此错误是由Adblocker中的最新错误引起的. https://issues.adblockplus.org/ticket/6744

I believe this error is caused by a recent bug in Adblocker. https://issues.adblockplus.org/ticket/6744

尝试使用带有和不带有Adblocker的不同浏览器,看看是否有区别.

Try different browsers with and without Adblocker and see if that makes a difference.

这篇关于使用watchify制作捆绑包后出现blob错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆