grunt-browserify

Grunt-Browserify extensions flag not working

十年热恋 提交于 2020-01-15 11:34:13
问题 I am trying to use Grunt-browserify and reactify to parse and bundle React components written in jsx. I want to use the extension flag so that I don't have have to specify the file extension name of my modules, but I have been unable to get this to work. Here is some test code: A Gruntfile: 'use strict'; module.exports = function(grunt) { grunt.initConfig({ pkg: grunt.file.readJSON('package.json'), browserify: { dev: { src: 'src/app.jsx', dest: 'dest/app.js', options: { debug: true, transform

Grunt-Browserify extensions flag not working

大憨熊 提交于 2020-01-15 11:33:29
问题 I am trying to use Grunt-browserify and reactify to parse and bundle React components written in jsx. I want to use the extension flag so that I don't have have to specify the file extension name of my modules, but I have been unable to get this to work. Here is some test code: A Gruntfile: 'use strict'; module.exports = function(grunt) { grunt.initConfig({ pkg: grunt.file.readJSON('package.json'), browserify: { dev: { src: 'src/app.jsx', dest: 'dest/app.js', options: { debug: true, transform

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

血红的双手。 提交于 2019-12-09 12:46:34
问题 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 separately and assumed to be global, I've got this working just fine by doing a dirty bit of a replace in my build step that swaps out require("B") with global.B C is whats causing me issues though, its meant to be "just 8K" in size yet when I try

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

本秂侑毒 提交于 2019-12-03 15:58:41
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 separately and assumed to be global, I've got this working just fine by doing a dirty bit of a replace in my build step that swaps out require("B") with global.B C is whats causing me issues though, its meant to be "just 8K" in size yet when I try bundling it up with A my bundle jumps up to 600K+ as I assume its pulling in dependancies galore? This