Consider the following two files:  app.js  import Game       from './game/game'; import React      from 'react'; import ReactDOM   from 'react-dom';  export default (absPath) => {   let gameElement = document.getElementBy...
I'm new to browserify and trying to load npm modules in browser but I'm getting the following error:     Uncaught ReferenceError: require is not defined   I'm following the tutorial from http://browserify.org/. Created javascript file wit...
I'm still new to ES6 and module loaders and I'm currently looking at combining a browserify setup with ES6. I was wondering if I would still need browserify/requirejs if I'm using ES6 modules. Seems like both allow you to define modules...
I am using Browserify to compile a large Node.js application into a single file (using options --bare and --ignore-missing [to avoid troubles with lib-cov in Express]).  I have some code to dynamically load modules based on what is available in a dir...
I'm using browserify-shim and I want to use a generic jQuery plugin. I have looked over the Browserify-shim docs multiple times and I just can't seem to understand what's going on and/or how it knows where to put plugins, attach to the jQ...
When I have a file x.js that looks like this:  x.js  module.exports = function (n) { return n * 111 }   and I run browserify from the command line like so:  browserify -r ./x.js > bundle.js   I get an output file that looks like this (roughly):...
I am trying to require a file with browserify using variables passed into a function:  var playersOptions = {     name: 'players',     ajax: 'team-overview',     route: {         name: 'overview',         path: 'playersOve...
I try to write these code   gulp.task('script', function() {   'use strict'   return gulp.src(['app.js', 'components/**/*.jsx'])     .pipe(babel())     .pipe(browserify())     .pipe(gulp.dest("dist")); });   bu...
I have a headache on my hands. Here's my current setup:   bower to get vendor libraries (angular in this case) gulp task to run browserify debowerify to make the bower libraries compatible with browserify   App.js (before browserify):  'use s...
(I should clarify up front: My question is about closures and client module patterns in Javascript. It's not about how to use jQuery.noConflict().)  I've got a bit of Javascript that people can add to their websites. I want my own code to hav...

Tags

Recent Questions

Top Questions

Home Tags Terms of Service Privacy Policy DMCA Contact Us

©2020 All rights reserved.