问题
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
my whatchify command is look like this
watchify src/app.js -o destination/bundle.js -t [babelify --presets [ es2015 ] ]
while my dependenties look like this is looks like this
"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"
}
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
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?
回答1:
I believe this error is caused by a recent bug in Adblocker. https://issues.adblockplus.org/ticket/6744
Try different browsers with and without Adblocker and see if that makes a difference.
来源:https://stackoverflow.com/questions/50888287/get-blob-error-after-using-watchify-to-make-a-bundle