GithubHelp home page GithubHelp logo

gulp-prepack's People

Contributors

sdgluck avatar smildlzj avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

gulp-prepack's Issues

InitializationError();

This is likely to do with prepack itself, but I saw a similar issue opened here, so I just wanted to make certain that I am using this gulp plugin properly, or if there may be an issue with it:

Error output:

not an object
TypeError
    at unknown:51:40 <- line is below.
    at forEach (native)
    at hatchListeners (unknown:39:3)
    at addListeners (unknown:547:3)
    at load (unknown:561:3)
    at unknown:948:5
    at unknown:540:12
    at forEach (native)
    at subRoutines (unknown:539:3)
    at load (unknown:560:3)
    at unknown:502:1
    at call (native)
    at s (unknown:1:246)
    at e (unknown:1:425)
    at unknown:1:1
/Users/Salomon/salomonsmeke.github.io/node_modules/prepack/lib/prepack-standalone.js:60
    throw new InitializationError();

gulp:

/* produce-source:
  * Source production task.
*/
gulp.task('produce-source', () => {
  browserify('js/main.js')
  .transform(babelify.configure({
    presets: ['es2015']
  }))
  .bundle()
  .pipe(source('bundle.js'))
  .pipe(buffer())
  .pipe(prepack())
  //.pipe(replace('"use strict";', ''))
  //.pipe(insert.prepend('"use strict";'))
  // I dont know why babelify doesnt default to scoping the whole thing as strict.
  //.pipe(uglify())
  .pipe(gulp.dest('build/js'));

The problem line:

(var node = document.getElementById(id);)

note: id is in the 40th character position, it is defined within that function as: var id = egg.id;

EDIT: I got past this by defining globals, I am still encountering problems, but Ill close this. Sorry for the inconvenience!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.