Questions tagged [grunt-browserify]

Grunt task for node-browserify.

Grunt task for node-browserify.:

https://github.com/jmreidy/grunt-browserify

49 questions
10
votes
0 answers

Chrome breakpoints jump to different lines

I'm running Chrome 48.0 and lately when I try to place breakpoints in the developer console, sometimes they will refuse to be placed at certain lines and instead jump to another line instead. Almost like when you try to place a breakpoint on a line…
Andrew
  • 1,890
  • 3
  • 16
  • 35
9
votes
2 answers

How to enable sourcemaps with grunt, browserify, and babelify

I'd like to generate sourcemaps for jsx files that are transpiled with babelify and browserify. It seems that some sourcemaps are being generated as a base64 encoded comment at the bottom of my output file, but stacktraces do not honor them. My…
Jim Geurts
  • 20,189
  • 23
  • 95
  • 116
7
votes
1 answer

List modules bundled by Browserify

I am using Browserify and Grunt to bundle our RendrJS webapp. I would like to analyze the bundle to see which modules it contains to see if any code is superfluous. This can happen since in Rendr some js code might only run on the server. How do I…
Skanaar
  • 370
  • 2
  • 9
6
votes
4 answers

How to keep Browserify bundle size sensible when using requires for thirdparty stuff (via grunt if it matters)

I'm trying to bundle up my own code (A) which in turn uses 2 third party components (B and C) where C also needs B. Everything as far as I know is written using CommonJS node style modules. A on its own when bundled comes out at 60K. B is included…
Pete Duncanson
  • 3,208
  • 2
  • 25
  • 35
5
votes
2 answers

Getting reactify and browserify to work with ES6

I have a browserify task that is configured like so: module.exports = function(grunt) { grunt.config.set('browserify', { dev: { src: 'assets/js/main.jsx', dest: '.tmp/public/js/main.js', options: { debug: true, …
fraxture
  • 5,113
  • 4
  • 43
  • 83
4
votes
2 answers

Grunt build failing - ParseError: 'import' and 'export' may appear only with 'sourceType: module'

I have gone through many posts on github and stackoverflow. I have the following dev dependencies in my package.json for the es6 to es5 transpilation. "babel-cli": "^6.26.0", "babel-core": "^6.26.0", "babel-loader":…
Rajesh Dwivedi
  • 382
  • 2
  • 13
3
votes
0 answers

Configure absolute path for ES6 style imports in Jasmine tests

I'm running unit tests using Jasmine (jasmine-es6 to be precise: https://github.com/vinsonchuong/jasmine-es6) and want to configure Jasmine to use absolute paths. I configured Grunt to use 'app' path as a root directory for source files when…
3
votes
0 answers

Using browserify shim with browserify insertGlobalVars option

I'm using browerify with browserify-shim to us the version of underscore and jQuery defined by the environment it's running in. I found myself requiring the same modules over and over again, so went to look for a way to automate that. The option…
Tim
  • 1,680
  • 2
  • 15
  • 21
3
votes
0 answers

grunt-browserify cant find module

I want grunt-browserify to include backbone in my project. Exerpts from my gruntfile: ... browserify: { vendor: { src: ['client/requires/**/*.js'], dest: 'build/vendor.js' }, .. This is the errormessage when running grunt…
2
votes
1 answer

How do I generate sourcemaps for Uglified files using Grunt?

I have a Grunt project that uses both Browserify and Uglify. Here are the core bits of it: browserify: { myapp: { options: { transform: ['babelify'], browserifyOptions: { debug: true }, }, src:…
Mridang Agarwalla
  • 43,201
  • 71
  • 221
  • 382
2
votes
0 answers

Grunt-browserify external libs give: Cannot find module

I'm working on app with Backbone Marionette and i'm building my files with grunt-browserify 3.8. Backbone, Marionette, underscore and jQuery are added with npm. I'm compiling all my files in one single file. Everything was working fine but the…
Giorgia Sambrotta
  • 1,133
  • 1
  • 15
  • 45
2
votes
0 answers

Browserify source maps are flattened

I am using grunt-browserify for running browserify: options: { watch :true, transform: ['babelify','envify'], external :vendorFiles, browserifyOptions: { debug: true } } When I run this task, the…
jacquard
  • 1,307
  • 1
  • 11
  • 16
2
votes
1 answer

browserify + browserify-shim angular global

I am including angular js from the google cdn via a script tag on the index page. I have the following in my package.json: "browserify": { "transform": [ "browserify-shim" ] }, "browserify-shim": { "angular":…
raygerrard
  • 812
  • 11
  • 13
2
votes
0 answers

How to create a vendor bundle with grunt-browserify

I'm working on a single page app that requires several third-party libs. To reduce build time I'm trying to create two separate bundles: one for the libs code and one for the app code. My build process uses grunt-browserify to generate the bundles.…
david_i_smith
  • 228
  • 3
  • 12
2
votes
0 answers

Browserify, shim different libraries in different browserify builds

I am using browserify + grunt to produce two separate JS outputs, a clientside and a serverside version of my app. eg. gruntfile.js browserify: { server: { files: { 'dist/server.js': ['src/serverside.js'], } }, client: { …
undefined
  • 33,537
  • 22
  • 129
  • 198
1
2 3 4