heybran / create-webcomp Goto Github PK
View Code? Open in Web Editor NEWA NPM package to quickly scaffold a new web components project powered by Vite.
Home Page: https://www.npmjs.com/package/create-webcomp
A NPM package to quickly scaffold a new web components project powered by Vite.
Home Page: https://www.npmjs.com/package/create-webcomp
您好 我也是一个对Web Components感兴趣的前端开发者。我是在B站发现您的项目的,国内关于WeB Components的资料很少,而您的视频和讲解我也受益匪浅,非常感谢。
问题是这样的,我单独运行了 template-html-css-js
这个项目(并没有运行整个REPO)。DEV 命令可以正常运行,但是 build 命令会报以下错误。请问您遇到过以下错误吗?
npm WARN config global `--global`, `--local` are deprecated. Use `--location=global` instead.
> [email protected] build
> vite build
vite v4.5.0 building for production...
✓ 6 modules transformed.
✓ built in 149ms
[vite:build-html] Unable to parse HTML; parse5 error code unexpected-character-in-unquoted-attribute-value
at C:/Users/Administrator/Desktop/template-html-css-js/src/components/my-app/index.html:1:31
1 | export default "<div><a href=\"https://vitejs.dev\" target=\"_blank\"><img class=\"logo vite\" alt=\"Vite logo\"> </a><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/Web_components\" target=\"_blank\"><img class=\"logo vanilla web-components\" alt=\"Web Components logo\"></a><h1>Hello Vite & Web Components!</h1><div class=\"card\"><my-counter count=\"0\"></my-counter></div><p class=\"read-the-docs\">Click on the Vite or
Web Components logo to learn more</p></div>";
| ^
file: C:/Users/Administrator/Desktop/template-html-css-js/src/components/my-app/index.html
error during build:
Error: Unable to parse HTML; parse5 error code unexpected-character-in-unquoted-attribute-value
at C:/Users/Administrator/Desktop/template-html-css-js/src/components/my-app/index.html:1:31
1 | export default "<div><a href=\"https://vitejs.dev\" target=\"_blank\"><img class=\"logo vite\" alt=\"Vite logo\"> </a><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/Web_components\" target=\"_blank\"><img class=\"logo vanilla web-components\" alt=\"Web Components logo\"></a><h1>Hello Vite & Web Components!</h1><div class=\"card\"><my-counter count=\"0\"></my-counter></div><p class=\"read-the-docs\">Click on the Vite or
Web Components logo to learn more</p></div>";
| ^
at handleParseError (file:///C:/Users/Administrator/Desktop/template-html-css-js/node_modules/vite/dist/node/chunks/dep-bb8a8339.js:37523:11)
at Parser.onParseError (file:///C:/Users/Administrator/Desktop/template-html-css-js/node_modules/vite/dist/node/chunks/dep-bb8a8339.js:37449:13)
at Tokenizer._err (file:///C:/Users/Administrator/Desktop/template-html-css-js/node_modules/vite/dist/node/chunks/dep-f0c7dae0.js:1125:89)
at Tokenizer._stateAttributeValueUnquoted (file:///C:/Users/Administrator/Desktop/template-html-css-js/node_modules/vite/dist/node/chunks/dep-f0c7dae0.js:2687:22)
at Tokenizer._callState (file:///C:/Users/Administrator/Desktop/template-html-css-js/node_modules/vite/dist/node/chunks/dep-f0c7dae0.js:1632:22)
at Tokenizer._runParsingLoop (file:///C:/Users/Administrator/Desktop/template-html-css-js/node_modules/vite/dist/node/chunks/dep-f0c7dae0.js:1149:22)
at Tokenizer.write (file:///C:/Users/Administrator/Desktop/template-html-css-js/node_modules/vite/dist/node/chunks/dep-f0c7dae0.js:1174:14)
at Function.parse (file:///C:/Users/Administrator/Desktop/template-html-css-js/node_modules/vite/dist/node/chunks/dep-f0c7dae0.js:4856:26)
at parse (file:///C:/Users/Administrator/Desktop/template-html-css-js/node_modules/vite/dist/node/chunks/dep-f0c7dae0.js:7927:19)
at traverseHtml (file:///C:/Users/Administrator/Desktop/template-html-css-js/node_modules/vite/dist/node/chunks/dep-bb8a8339.js:37445:17)
Would be nice to add a corresponding templates with TypeScript.
prettier
config file.rome
.Same as https://github.com/bluwy/create-vite-extra, should add Deno templates since Deno supports npm
package now.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.