example.js
import("./templates/foo" /* webpackChunkName: "chunk-foo" */ ).then(function(foo) {
console.log('foo:', foo);
})
require.ensure([], function(require) {
var foo = require("./templates/foo");
console.log('foo:', foo);
}, "chunk-foo1");
var createContextVar = "r";
import("./templates/ba" + createContextVar /* webpackChunkName: "chunk-bar-baz" */ ).then(function(bar) {
console.log('bar:', bar);
})