Skip to content

Commit

Permalink
fix: fix pwa + ts + lint (close #937)
Browse files Browse the repository at this point in the history
  • Loading branch information
yyx990803 committed Mar 3, 2018
1 parent b728624 commit b878767
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/@vue/cli-plugin-pwa/generator/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ module.exports = api => {
// inject import for registerServiceWorker script into main.js
const lines = main.split(/\r?\n/g).reverse()
const lastImportIndex = lines.findIndex(line => line.match(/^import/))
lines[lastImportIndex] += `\nimport './registerServiceWorker${isTS ? `.ts` : ``}'`
lines[lastImportIndex] += `\nimport './registerServiceWorker'`
files[file] = lines.reverse().join('\n')
}
})
Expand Down

0 comments on commit b878767

Please sign in to comment.