Skip to content
This repository was archived by the owner on Jan 23, 2022. It is now read-only.

Commit c8305b9

Browse files
authored
Merge pull request #15 from mgreg90/fix_regex
Fix Bad Regex Causing Error
2 parents 7ff79b5 + 5875b05 commit c8305b9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

generator/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ module.exports = (api, opts, rootOptions) => {
3838
const contentMain = fs.readFileSync(api.resolve(api.entryFile), { encoding: 'utf-8' })
3939
const lines = contentMain.split(/\r?\n/g)
4040

41-
const renderIndex = lines.findIndex(line => line.match(/createApp\(App\)(\.use\(\w*\))*\.mount\('#app'\)/))
41+
const renderIndex = lines.findIndex(line => line.match(/createApp\(App\)(\.use\(\w*\))*\.mount\(['"]#app['"]\)/))
4242
const renderContent = lines[renderIndex]
4343
lines[renderIndex] = `const app = createApp(App)`
4444
lines[renderIndex + 1] = `installElementPlus(app)`

0 commit comments

Comments
 (0)