Catalog npm
PACKAGE EXPLORERView in registry

@0kzh/babel-preset-vite

npm

babel preset that emulates vite's non-standard functionality

babelenvglobhotpresetvite
Versions collected4
Direct dependencies10From release 0.0.3-semantically-released
Last observed20 Oct, 22:12 UTC

README

Current package documentation

babel-preset-vite

Build Status codecov version downloads MIT License

PRs Welcome Code of Conduct Discord

Watch on GitHub Star on GitHub Tweet

Please note: this plugin is intended to provide an approximation of some of Vite specific transformations when running the code in non-Vite environment, for example, running tests with a NodeJS based test runner.

The functionality within these transformations should not be relied upon in production.

This preset includes the following plugins:

Installation

npm install --save-dev babel-preset-vite

Usage

Without options:

{
  "presets": ["babel-preset-vite"]
}

With options:

{
  "presets": [
    [
      "babel-preset-vite",
      {
        "env": false, // defaults to true
        "glob": false, // defaults to true
        "hot": false // defaults to true
      }
    ]
  ]
}

Via CLI

babel --presets babel-preset-vite

Via Node API

require('@babel/core').transformSync('code', {
  presets: ['babel-preset-vite']
})

Options

env

boolean, defaults to true

Toggles whether or not to perform import.meta.env transformations.

glob

boolean, defaults to true

Toggles whether or not to perform import.meta.glob and import.meta.globEager transformations.

hot

boolean, defaults to true

Toggles whether or not to perform import.meta.hot transformations.

You can read more about configuring preset options here

Downloads & popularity

Awaiting observations

No metric observations yet

Download counts and popularity will appear here as the collector receives them.

Versions 4

Collected releases
VersionPublishedDirect dependenciesOpen version
0.0.3-semantically-releasedRegistry latest17 Jan 202310
0.0.2-semantically-released17 Jan 202310
0.0.1-semantically-released17 Jan 202310
0.0.0-semantically-released17 Jan 202310

Package advisories

0
No matching advisories collected

This describes our collected data; it is not a security assessment.

Repository

PENDING
opensourceraidguild/babel-vite

Shared repository data · GitHub

License detected in repository
Not collected

Metadata history

Meaningful changes
Current collected state Current

Observed since 20 Oct, 22:12 UTC

No superseded metadata states collected. Unchanged observations do not create new revisions.

Record identity

package:e41928d0b42620ebfa30cac681d21943840b1e617056c829d078b0429ceabae7