Catalog npm
Back to packageRELEASE DETAILS

0.0.2-semantically-released

npm

@0kzh/babel-preset-vite

babel preset that emulates vite's non-standard functionality

babelenvglobhotpresetvite
Published17 Jan 2023
Direct dependencies10
Transitive dependenciesNot calculated

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.

Declared dependencies 10

Native requirements
10 direct targetsNot calculated transitive count
Package / targetRequirementRelationship
@babel/runtime
Environment
{
  "local_name": "@babel/runtime",
  "alias": false,
  "peer_metadata": null
}
^7.13.9runtime
@types/babel__core
Environment
{
  "local_name": "@types/babel__core",
  "alias": false,
  "peer_metadata": null
}
^7.1.12runtime
@0kzh/babel-plugin-transform-vite-meta-env
Environment
{
  "local_name": "@0kzh/babel-plugin-transform-vite-meta-env",
  "alias": false,
  "peer_metadata": null
}
^0.0.0-semantically-releasedruntime
@0kzh/babel-plugin-transform-vite-meta-glob
Environment
{
  "local_name": "@0kzh/babel-plugin-transform-vite-meta-glob",
  "alias": false,
  "peer_metadata": null
}
^0.0.0-semantically-releasedruntime
@0kzh/babel-plugin-transform-vite-meta-hot
Environment
{
  "local_name": "@0kzh/babel-plugin-transform-vite-meta-hot",
  "alias": false,
  "peer_metadata": null
}
^0.0.0-semantically-releasedruntime
@babel/core
Environment
{
  "local_name": "@babel/core",
  "alias": false,
  "peer_metadata": null
}
^7.13.8development
@types/babel-plugin-tester
Environment
{
  "local_name": "@types/babel-plugin-tester",
  "alias": false,
  "peer_metadata": null
}
^9.0.1development
babel-plugin-tester
Environment
{
  "local_name": "babel-plugin-tester",
  "alias": false,
  "peer_metadata": null
}
^10.0.0development
kcd-scripts
Environment
{
  "local_name": "kcd-scripts",
  "alias": false,
  "peer_metadata": null
}
^12.0.0development
typescript
Environment
{
  "local_name": "typescript",
  "alias": false,
  "peer_metadata": null
}
^4.2.2development

Distribution files

1 collected
Distribution 1

Source distribution

Source file
Checksums from source
{
  "integrity": "sha512-gGW900TLJWzSbxJ1WE534J7jXIOC9vsZXutVQ3XTD4avNYm0swLPzbm28xzQ0nPHCxTXXQN+Xx9OETa4FGgOPQ==",
  "shasum": "1928c05b6789be143c4b4eacc0c25e38263a0537",
  "tarball": "https://registry.npmjs.org/@0kzh/babel-preset-vite/-/babel-preset-vite-0.0.2-semantically-released.tgz",
  "fileCount": 11,
  "unpackedSize": 11508,
  "signatures": [
    {
      "keyid": "SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA",
      "sig": "MEUCIQCbpYugc5M5BMLSyisCZqzOopYgYjBHyPoS96G3g+amdAIgLJApZchukWR5A+i2FjjNcH0Eq+mzPX+XElDXcxDfd5I="
    }
  ],
  "npm-signature": "-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjxu7pACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmob/hAAoG1OqBYvJERI2QJSc0iJyMt4YIFU4EfHSqz2eOG03h5el9zE\r\nfC4Ej9i4YbsIQyIUGhXSsTcVg3nFpa2TzxmarsSux8vVh2Zb4CRpevOJcJ6x\r\nP2wJXik47tPu8uhcUUdUDU5EOwRYsOsGwpb3qSNYoMnt0THLIGyumSdsvCyS\r\nSMDiGZEJva6ZXG02ry4xWA02iWh+0AyEtf4iq92kJZuceovoPqTveA8Q1q1+\r\nXNBOki32BdLJNhjzV5JH0akJj9WDYd7L0Zx557yIoMlgbw1wDLE7f/8oFuU+\r\nDdxg67H9OeQmNDdpy6M9fgRYiESYsMq86PJ2uDSW45b+IpvYIew4x0XAsRhk\r\nSvY0cjKPaQf+ogEDGKyXYrsFcEXG8Yqd0BNVEKthlRVlSQYwYApfTlcbDCJD\r\n5DYl2MoaULttkAxuF113Y1Dsf5dgVScGfYdwKsLJl+RCV74hgOd4LEjD7iRA\r\n0iZXLaaGoc5mjUyIjN6wwiZ2JX676YIxDka9B5n8OGR5X+xowI/VykrF12Kb\r\ngdn3P882Xg+HuQQQ+Ta5jYfPhi/FcD0mNWLMjvuuRNz6E9vNKZ6vSx6YUiCb\r\nZNgQtlRhArjcsI6rgqzZeoRAIfEYqzjkQvIyPsw2sEaL4v+/30j0kMoqSGwA\r\nZu/poq953csz3I/w2Nqo545GsVwWj/BXVpw=\r\n=Vzl3\r\n-----END PGP SIGNATURE-----\r\n"
}

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_version:3ac6f9c23916632d07461877e25465b774d57b70fa47478fc9c854ad3aa1e0fd

Other collected versions

0.0.3-semantically-released17 Jan0.0.1-semantically-released17 Jan0.0.0-semantically-released17 JanView all collected versions →