0.4.5 ā¢ Published 5 months ago
@import-meta-env/babel v0.4.5
@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.4.5
5 months ago
0.4.4
10 months ago
0.4.3
1 year ago
0.3.0
2 years ago
0.4.1
1 year ago
0.4.0
1 year ago
0.4.2
1 year ago
0.1.10
2 years ago
0.2.1
2 years ago
0.2.0
2 years ago
0.2.3
2 years ago
0.2.2
2 years ago
0.1.8
2 years ago
0.1.7
2 years ago
0.1.9
2 years ago
0.1.4
2 years ago
0.1.3
2 years ago
0.1.6
2 years ago
0.1.5
2 years ago
0.1.2
2 years ago
0.1.1
2 years ago