Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

<!DOCTYPE> is case-sensitive #107

Closed
bates64 opened this issue May 9, 2020 · 0 comments
Closed

<!DOCTYPE> is case-sensitive #107

bates64 opened this issue May 9, 2020 · 0 comments

Comments

@bates64
Copy link
Contributor

bates64 commented May 9, 2020

Describe the bug

<!doctype html> causes vite build to crash with a cryptic error stack. The DOCTYPE is case-insensitive.

System Info

  • required vite version: master
  • required Operating System: Windows
  • required Node version: 14.1.0

Logs

Building for production...
[vite] Build errored out.
SyntaxError: Incorrectly opened comment.
    at createCompilerError (C:\Users\alex\Documents\vite\node_modules\@vue\compiler-core\dist\compiler-core.cjs.js:16:19)
    at emitError (C:\Users\alex\Documents\vite\node_modules\@vue\compiler-core\dist\compiler-core.cjs.js:1173:29)
    at parseChildren (C:\Users\alex\Documents\vite\node_modules\@vue\compiler-core\dist\compiler-core.cjs.js:613:25)
    at Object.baseParse (C:\Users\alex\Documents\vite\node_modules\@vue\compiler-core\dist\compiler-core.cjs.js:560:23)
    at Object.parse (C:\Users\alex\Documents\vite\node_modules\@vue\compiler-dom\dist\compiler-dom.cjs.js:2942:25)
    at compileHtml (C:\Users\alex\Documents\vite\dist\build\buildPluginHtml.js:78:32)
    at Object.exports.createBuildHtmlPlugin (C:\Users\alex\Documents\vite\dist\build\buildPluginHtml.js:20:45)
    at async Object.build (C:\Users\alex\Documents\vite\dist\build\index.js:38:41)
    at async runBuild (C:\Users\alex\Documents\vite\dist\cli.js:141:9) {
  code: 11,
  loc: {
    start: { column: 1, line: 1, offset: 0 },
    end: { column: 1, line: 1, offset: 0 },
    source: ''
  }
}

Reproduction

<!doctype html>
$ vite build

This appears to be an issue in @vue/compiler-core. I tried changing this check to use s.toUpperCase() but it looks like vite is using an outdated(?) version of that package right now (so yarn linking it to master breaks vite in other ways).

@bates64 bates64 added the bug label May 9, 2020
@github-actions github-actions bot locked and limited conversation to collaborators Jul 16, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant