0.5.0 ⢠Published 10 months ago
@import-meta-env/babel v0.5.0
@import-meta-env/babel
This plugin is intended to provide an approximation of some of @import-meta-env/vite specific transformations when running the code in other environments, for example, running tests with a NodeJS based test runner.
ā The functionality within these transformations should not be relied upon in production.
š Quick Start
Install and register the plugin:
$ npm i dotenv @import-meta-env/babel
// babel.config.js
module.exports = {
plugins: ["module:@import-meta-env/babel"],
};
Adjust the test script in your package.json:
{
"scripts": {
// If you have a `.env` file:
"test": "your-test-script",
// If you don't have a `.env` file:
"test": "cross-env S3_BUCKET=YOURS3BUCKET your-test-script"
}
}
See also:
- examples
- @import-meta-env/vite - Inject environment variables into the import.meta.env object after building the application instead of statically replacing it during production.
0.5.0
10 months ago
0.4.5
2 years ago
0.4.4
2 years ago
0.4.3
2 years ago
0.3.0
3 years ago
0.4.1
3 years ago
0.4.0
3 years ago
0.4.2
2 years ago
0.1.10
3 years ago
0.2.1
3 years ago
0.2.0
3 years ago
0.2.3
3 years ago
0.2.2
3 years ago
0.1.8
3 years ago
0.1.7
3 years ago
0.1.9
3 years ago
0.1.4
3 years ago
0.1.3
3 years ago
0.1.6
3 years ago
0.1.5
3 years ago
0.1.2
3 years ago
0.1.1
3 years ago