node.js - generate sourcemap from browserify and uglify -


i want generate min js sourcemap using browserify , uglify.

i using node , npm script.

when run "npm run processjs", gives me bundle.js , bundle.js.map. when open app in chrome, chrome show code file of "bundle.js", not file of origin js of each module.

"buildjs": "node node_modules/browserify/bin/cmd.js src/index.js -o src/bundle.js" , "uglifyjs": "node_modules/uglify-js/bin/uglifyjs src/bundle.js -o src/bundle.js --source-map src/bundle.js.map -p relative", "processjs": "npm run buildjs && npm run uglifyjs", 

is there anyway source map map each module js, instead of single bundle.js

so want part of browserify part include --debug flag. docs:

--debug -d enable source maps allow debug files separately. rather mapping in uglify step map bundle


Comments

Popular posts from this blog

Magento/PHP - Get phones on all members in a customer group -

php - .htaccess mod_rewrite for dynamic url which has domain names -

Website Login Issue developed in magento -