D
D
DarthJS2015-10-23 12:45:35
Angular
DarthJS, 2015-10-23 12:45:35

How to properly use webpack + angular templateCache?

Hello! I understand Webpack-om. There is an application on Angular, Gulp + Webpack is used.
I want everything to be pulled up through Angular $templateCache . I create a task in Galp, it makes a template file for me, where everything is clearly collected and requested to the glive app, everything works, then it's up to Webpack:

entry: {
        app: ["bootstrap-webpack!./bootstrap.config.js", './app/app.js'],
        vendor: ['angular', 'bootstrap', 'angular-ui-router', 'oclazyload']
    },

    output: {
        path: path.join(__dirname, "dist"),
        filename: '/bundle.js'
    },
  plugins: [
        new webpack.optimize.CommonsChunkPlugin( /* chunkName= */ "vendor", /* filename= */ "/vendor.bundle.js"),

The "dist" directory contains bundle.js & vendor.bundle.js. I launch index.html, and it swears at the lack of views! Wai? They have to get ripped off. Can someone please explain what I did or didn't understand.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Sergey, 2015-10-23
Protko @Fesor

https://github.com/angular-class/NG6-starter - something like this. That is, the angular template cache is not needed at all.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question