Git Product home page Git Product logo

esbuild-plugin-vue-next's People

Contributors

bigfish8 avatar byfairweather avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

esbuild-plugin-vue-next's Issues

Wrong commonjs types

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.

TS Handbook

Do not extract CSS

Is there any way to keep CSS from SFCs in JS instead of emitting a CSS file ?

"Uncaught ReferenceError: cssModules is not defined" if alwaysStrict: true configured in tsconfig.json

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!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.