Giter Club home page Giter Club logo

bs-systemjs-hot-reloader's People

Contributors

sormy avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar

bs-systemjs-hot-reloader's Issues

Hot reloading it doesn't work anymore

Hi @sormy

I am playing with hot reloading on Systemjs, I decided to give it a shot bs +hot reloading.... the thing is this is not working for me as soon as I save a file it fails....

Uncaught (in promise) TypeError: Cannot read property 'URL/PATH OF THE FILE' of undefined
    at eval (http://localhost:3000/jspm_packages/npm/[email protected]/SystemHotReloader.js:510:29)
    at Array.reduce (native)
    at SystemHotReloader.getReloadChain (http://localhost:3000/jspm_packages/npm/[email protected]/SystemHotReloader.js:509:29)
    at SystemHotReloader.reloadModule (http://localhost:3000/jspm_packages/npm/[email protected]/SystemHotReloader.js:159:30)
    at SystemHotReloader.reloadPath (http://localhost:3000/jspm_packages/npm/[email protected]/SystemHotReloader.js:116:21)
    at http://localhost:3000/browser-sync/browser-sync-client.js?v=2.18.8:32:18

It looks like that this line:
const records = this.loader._loader.moduleRecords;

it always returns undefined....

I thought this could be the same problem as here (but it wasn't):
alexisvincent/systemjs-hot-reloader#74

so maybe It could be related with a breaking change on Systemjs 0.20 as they pointed here for systemjs-hot-reload:
alexisvincent/systemjs-hot-reloader#126

Is it alive?

Hi @sormy

Just want to know is this library still maintained or no.

Thanks!

CSSReloader crashes when using bs-systemjs-hot-reloader in es6 gulp browsersync

I'm trying to use bs-systemjs-hot-reloader with CssReloader enabled in a gulp task, however I get the following error when browsersync inits the plugins:

/Users/testuser/demoapp/jspm_packages/system.js:4615
      $__curScript = typeof __filename != 'undefined' ? { src: __filename } : null;
               ^

ReferenceError: $__curScript is not defined
    at /Users/testuser/demoapp/jspm_packages/system.js:5144:3
    at Object.<anonymous> (/Users/testuser/demoapp/jspm_packages/system.js:4:1)
    at Module._compile (module.js:571:32)
    at loader (/Users/testuser/demoapp/node_modules/babel-register/lib/node.js:144:5)
    at Object.require.extensions.(anonymous function) [as .js]     (/Users/testuser/demoapp/node_modules/babel-register/lib/node.js:154:7)
    at Module.load (module.js:488:32)
    at tryModuleLoad (module.js:447:12)
    at Function.Module._load (module.js:439:3)
    at Module.require (module.js:498:17)
    at require (internal/module.js:20:19)

The gulpfile.babel.js (using an ES6 gulpfile) is

import gulp from "gulp";
import browserSync from "browser-sync";
import bsSystemHotReloader from "bs-systemjs-hot-reloader";

gulp.task("server", ["less"], () =>
{
    var bs = browserSync.create();

bs.watch([
    'test.html',
    'jspm.config.js'
]).on('change', bs.reload);

bs.use(bsSystemHotReloader, {
    files: [
        'src/**/*.css',
        'src/**/*.js',
        'src/**/*.html',
    ], cssReloader: {
        jspmConfigFile: "jspmconfig/jspm.config.js",
    }
});

bs.init({
    online: false,
    open: false,
    reloadOnRestart: true,
    proxy: "https://localhost:9012",
    logLevel: "debug",
    serveStatic: ["."],
});
});` 

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.