diff --git a/lib/app-cache.js b/lib/app-cache.js index 90240937..ba304e3f 100644 --- a/lib/app-cache.js +++ b/lib/app-cache.js @@ -147,7 +147,7 @@ var AppCache = (function () { key: 'getPageContent', value: function getPageContent() { if (this.events) { - return _fs2['default'].readFileSync(_path2['default'].join(__dirname, '../tpls/appcache-frame.tpl'), 'utf-8'); + return _fs2['default'].readFileSync(_path2['default'].join(__dirname, '../tpls/appcache-frame.html'), 'utf-8'); } else { return ''; } diff --git a/lib/default-options.js b/lib/default-options.js index 83a9177e..a36a9a01 100644 --- a/lib/default-options.js +++ b/lib/default-options.js @@ -52,7 +52,7 @@ exports['default'] = { ServiceWorker: { output: 'sw.js', - entry: _path2['default'].join(__dirname, '../tpls/empty-entry.js'), + entry: _path2['default'].join(__dirname, '../tpls/empty-entry.ejs'), scope: null, events: false, minify: null, diff --git a/lib/index.js b/lib/index.js index 432e68d1..2a0758b9 100644 --- a/lib/index.js +++ b/lib/index.js @@ -252,7 +252,7 @@ var OfflinePlugin = (function () { }; var emitFn = function emitFn(compilation, callback) { - var runtimeTemplatePath = _path3['default'].resolve(__dirname, '../tpls/runtime-template.js'); + var runtimeTemplatePath = _path3['default'].resolve(__dirname, '../tpls/runtime-template.ejs'); var hasRuntime = true; if (compilation.fileDependencies.indexOf) { diff --git a/lib/misc/runtime-loader.js b/lib/misc/runtime-loader.js index bdfbb5d0..96500b5b 100644 --- a/lib/misc/runtime-loader.js +++ b/lib/misc/runtime-loader.js @@ -10,7 +10,7 @@ module.exports.pitch = function (remainingRequest, precedingRequest, data) { var callback = this.async(); var params = JSON.parse(this.query.slice(1)); - var templatePath = path.join(__dirname, '../../tpls/runtime-template.js'); + var templatePath = path.join(__dirname, '../../tpls/runtime-template.ejs'); this.addDependency(templatePath); diff --git a/src/app-cache.js b/src/app-cache.js index 43183918..64c978d5 100644 --- a/src/app-cache.js +++ b/src/app-cache.js @@ -139,7 +139,7 @@ export default class AppCache { getPageContent() { if (this.events) { - return fs.readFileSync(path.join(__dirname, '../tpls/appcache-frame.tpl'), 'utf-8'); + return fs.readFileSync(path.join(__dirname, '../tpls/appcache-frame.html'), 'utf-8'); } else { return ''; } diff --git a/src/default-options.js b/src/default-options.js index 9105f6af..ea18e69f 100644 --- a/src/default-options.js +++ b/src/default-options.js @@ -39,7 +39,7 @@ export default { ServiceWorker: { output: 'sw.js', - entry: path.join(__dirname, '../tpls/empty-entry.js'), + entry: path.join(__dirname, '../tpls/empty-entry.ejs'), scope: null, events: false, minify: null, diff --git a/src/index.js b/src/index.js index 903bada2..f72f5c39 100644 --- a/src/index.js +++ b/src/index.js @@ -253,7 +253,7 @@ export default class OfflinePlugin { }; const emitFn = (compilation, callback) => { - const runtimeTemplatePath = path.resolve(__dirname, '../tpls/runtime-template.js'); + const runtimeTemplatePath = path.resolve(__dirname, '../tpls/runtime-template.ejs'); let hasRuntime = true; if (compilation.fileDependencies.indexOf) { diff --git a/src/misc/runtime-loader.js b/src/misc/runtime-loader.js index f26ffd33..4e13d616 100644 --- a/src/misc/runtime-loader.js +++ b/src/misc/runtime-loader.js @@ -8,7 +8,7 @@ module.exports.pitch = function(remainingRequest, precedingRequest, data) { const callback = this.async(); const params = JSON.parse(this.query.slice(1)); - const templatePath = path.join(__dirname, '../../tpls/runtime-template.js'); + const templatePath = path.join(__dirname, '../../tpls/runtime-template.ejs'); this.addDependency(templatePath); diff --git a/tpls/appcache-frame.tpl b/tpls/appcache-frame.html similarity index 100% rename from tpls/appcache-frame.tpl rename to tpls/appcache-frame.html diff --git a/tpls/empty-entry.js b/tpls/empty-entry.ejs similarity index 100% rename from tpls/empty-entry.js rename to tpls/empty-entry.ejs diff --git a/tpls/runtime-template.js b/tpls/runtime-template.ejs similarity index 100% rename from tpls/runtime-template.js rename to tpls/runtime-template.ejs