GithubHelp home page GithubHelp logo

nihalgonsalves / esbuild-plugin-browserslist Goto Github PK

View Code? Open in Web Editor NEW
42.0 2.0 4.0 2.15 MB

Configure esbuild targets based on a browserslist query

License: MIT License

TypeScript 94.51% Dockerfile 0.62% JavaScript 4.87%
esbuild esbuild-plugin browserslist javascript typescript

esbuild-plugin-browserslist's Introduction

Hi there ๐Ÿ‘‹

esbuild-plugin-browserslist's People

Contributors

actions-user avatar dependabot[bot] avatar github-actions[bot] avatar jfsiii avatar m-51 avatar nihalgonsalves avatar plmrry avatar rmehner avatar

Stargazers

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

Watchers

 avatar  avatar

esbuild-plugin-browserslist's Issues

Not working

'use strict'

const browserslist = require('browserslist')
const {
  resolveToEsbuildTarget
} = require('esbuild-plugin-browserslist')

const target = resolveToEsbuildTarget(
  browserslist('default', {
    printUnknownTargets: false
  })
)

console.log(target)
C:\wamp64\www\AdminLTE-ts\node_modules\browserslist\index.js:1179
        throw unknownQuery(name)
        ^
Error [BrowserslistError]: Unknown browser query `default`. Maybe you are using old Browserslist or made typo in query.
    at unknownQuery (C:\wamp64\www\AdminLTE-ts\node_modules\browserslist\index.js:285:10)
    at Function.select (C:\wamp64\www\AdminLTE-ts\node_modules\browserslist\index.js:1179:15)
    at C:\wamp64\www\AdminLTE-ts\node_modules\browserslist\index.js:336:33
    at Array.reduce (<anonymous>)
    at resolve (C:\wamp64\www\AdminLTE-ts\node_modules\browserslist\index.js:318:18)
    at browserslist (C:\wamp64\www\AdminLTE-ts\node_modules\browserslist\index.js:444:21)
    at Object.<anonymous> (C:\wamp64\www\AdminLTE-ts\build\config\esbuild.config.js:9:3)
    at Module._compile (internal/modules/cjs/loader.js:1063:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10)
    at Module.load (internal/modules/cjs/loader.js:928:32) {
  browserslist: true
}

Could not parse Browserslist result to a meaningful format. entry=safari TP

The following browserslist query:

  "last 3 Chrome major versions",
  "last 3 Safari major versions",
  "unreleased Chrome versions",
  "unreleased Safari versions"

Resolves to include:

...
safari TP

Which then is logged by esbuild-plugin-browserslist:

Could not parse Browserslist result to a meaningful format. entry=safari TP

The equivalent browsers for chrome do not cause esbuild-plugin-browserslist to emit such a log.

I believe that esbuild-plugin-browserslist should be updated to resolve this browser version into an esbuild target.

Thanks!

allow newer versions of esbuild

Attempting to use this plugin with newer versions of esbuild (v0.14) throws a package version error during install.

Could the package's version of esbuild be set to allow newer versions: ^0.13.0 instead of ~0.13.0?

"esbuild": "~0.13.8",

If not, could the esbuild version used in this package be bumped to v0.14?

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.