diff --git a/lib/service-worker-builder.js b/lib/service-worker-builder.js index 0ea4152..8ec73d3 100644 --- a/lib/service-worker-builder.js +++ b/lib/service-worker-builder.js @@ -85,7 +85,13 @@ module.exports = class ServiceWorkerBuilder { _rollupTree(tree, entryFile, destFile) { let rollupReplaceConfig = { - include: ['/**/ember-service-worker/**/*.js'], + include: [ + '/**/ember-service-worker/**/*.js', + // same as above but for windows paths like D:\my-ember\ember-service-worker\whatever\sw.js; which are updated before this step to D:/my-ember/ember-service/worker/whatever/sw.js + // the original one doesn't work when the source code and the %TMP% folder, which ember started to use after v3.5, are located on different logical drives + // which is quite common in Windows. + /^[a-z]:\/(?:[^\/:*?"<>|\r\n]+\/)*ember-service-worker\/(?:[^\/:*?"<>|\r\n]+\/)*[^\/:*?"<>|\r\n]*\.js$/i + ], delimiters: ['{{', '}}'], ROOT_URL: this.options.rootURL };