Giter Site home page Giter Site logo

angular2-load-children-loader's Introduction

angular2-load-children-loader's People

Contributors

josephliccini avatar quramy avatar

Stargazers

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

Watchers

 avatar  avatar  avatar

angular2-load-children-loader's Issues

feature request: naming bundles

This is working great for me with Angular2 final and Webpack 2.1.0-beta.22. Thank you!

I'd love the option to name the resulting bundles by the module name instead of 0, 1, 2 ... etc

install this webpack every time I start the server

Please a question, will I have to install this webpack every time I start the server in production? Because every day that I start work on the project the hotas do not work in production mode so I have to install this web pack, if that would have a permanent form? Thanks for the help

__webpack_require__(...) is not a function

I'm getting an error when using this loader:
dll.vendors.bundle.js.gz?8609335โ€ฆ:38082 EXCEPTION: Uncaught (in promise): TypeError: __webpack_require__(...) is not a function

The loader seems to transpile it correctly. My routes

{
   path: 'detail',
   loadChildren: '../+detail/detail.module#DetailModule',
   canActivate: [RouteProtection]
}, {
   path: 'monsoon',
   loadChildren: '../+monsoon-reports/monsoon.module#MonsoonModule',
   canActivate: [RouteProtection]
},

Here is the AOT compiled app.bundle.js

 Object.defineProperty(AppModuleInjector.prototype, "_ROUTES_47", {
        get: function () {
            if ((this.__ROUTES_47 == null)) {
                (this.__ROUTES_47 = [[
                        {
                            path: '',
                            component: import51.LoginComponent
                        },
                        {
                            path: 'detail',
                            loadChildren: function () { return __webpack_require__(118)("DetailModuleNgFactory"); }
                        },
                        {
                            path: 'monsoon',
                            loadChildren: function () { return __webpack_require__(119)("MonsoonModuleNgFactory"); },
                            canActivate: [import35.RouteProtection]
                        },
                        {
                            path: 'ticket',
                            component: import52.TicketComponent,
                            canActivate: [import35.RouteProtection]
                        },
                        {
                            path: 'grid1',
                            component: import53.HomeComponent,
                            canActivate: [import35.RouteProtection]
                        },
                        {
                            path: 'grid2',
                            component: import54.SubscriberComponent,
                            canActivate: [import35.RouteProtection]
                        },
                        {
                            path: 'login',
                            component: import51.LoginComponent
                        },
                        {
                            path: 'about',
                            component: import55.AboutComponent,
                            canActivate: [import35.RouteProtection]
                        },
                        {
                            path: '**',
                            component: import56.NotFound404Component
                        },
                        {
                            path: '404',
                            component: import56.NotFound404Component
                        }
                    ]
                ]);
            }
            return this.__ROUTES_47;
        },
        enumerable: true,
        configurable: true
    });

__webpack_require__ does exist during other parts of the app loading, but for some reason at this point in the app, its not a function.

However, if I use es6 promise loader:
loadChildren: 'es6-promise?,[name]!../+detail/detail.module#DetailModule'
It works fine in both AOT mode and JIT mode.

Any ideas what I'm doing wrong which causes it not to work in non-lazy load (without es6-promise)?

webpack error

Hi I'm trying to use your loader but I receive in the console this kind of error:
VM6476:48 EXCEPTION: Uncaught (in promise): TypeError: __webpack_require__(...) is not a function

my webpack.config is:

rules: [
      // Support for .ts files.
      {
        test: /\.ts$/,
        loaders: ['awesome-typescript-loader?'inlineSourceMap=true&sourceMap=false', 'angular2-load-children-loader', 'angular2-template-loader', '@angularclass/hmr-loader'],
        exclude: [isTest ? /\.(e2e)\.ts$/ : /\.(spec|e2e)\.ts$/, /node_modules\/(?!(ng2-.+))/]
      },

and I use in that way:

 imports: [
        BrowserModule,
        HttpModule,
        FormsModule,
        RouterModule.forRoot([
            {path: '', loadChildren: './home/home.module#HomeModule'},
            {path: 'about', loadChildren: './about/about.module#AboutModule'}
        ])],

Wbpack-version: "webpack": "^2.1.0-beta.25",
what I did wrong?

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.