bigfish8 / esbuild-plugin-vue-next Goto Github PK
View Code? Open in Web Editor NEWan esbuild plugin for vue 3.x SFC
an esbuild plugin for vue 3.x SFC
Hi,
I just noticed that the types for a commonjs require import are wrong:
const pluginVue = require("esbuild-plugin-vue-next");
/** @type {import('esbuild').BuildOptions} */
const BuildOptions = {
plugins: [pluginVue()], // will cause a type error (ts2349: This expression is not callable.)
// is defined at runtime.
}
const pluginVue = require("esbuild-plugin-vue-next").default;
/** @type {import('esbuild').BuildOptions} */
const BuildOptions = {
plugins: [pluginVue()], // correct type but will fail at runtime
// (with "TypeError: This expression is not callable.")
}
esModuleInterop is set to true.
...other than package.json and README.md. Please fix it.
Is there any way to keep CSS from SFCs in JS instead of emitting a CSS file ?
Hi!
Since esBuild v.0.14.44 alwaysStrict
implemented in tsconfig.json
, "Uncaught ReferenceError: cssModules is not defined" appears in browser console if Vue component uses css modules.
I've checked the code and looks like it's necessary to replace none strict styleImportCode += '\nscript.__cssModules = cssModules = {}'
with strict styleImportCode += '\nconst cssModules = script.__cssModules = {}'
in the entry.ts
.
I've tried to make a PR, but I don't have permissions to commit.
Hope this fix will be released.
Thanks!
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.