@jswork/craco-plugin-environment
TypeScript icon, indicating that this package has built-in type declarations

1.0.6 • Public • Published

craco-plugin-environment

Craco plugin for env.

version license size download

installation

npm install @jswork/craco-plugin-environment

usage

import cracoPluginEnvironment from '@jswork/craco-plugin-environment';

// global.d.ts
declare global {
  const APP_VARS: any;
}

// eslintrc.js
"globals": {
  "APP_VARS": true
}

// craco.config.js
{
  plugin: cracoPluginEnvironment,
  options: {
    vars: {
      BUILD_DATETIME: new Date().toLocaleString('en-US', {
        hour12: false,
        timeZone: 'Asia/ShangHai',
      }),
      BUILD_VERSION: pkg.version,
    },
  },
}

license

Code released under the MIT license.

Readme

Keywords

none

Package Sidebar

Install

npm i @jswork/craco-plugin-environment

Weekly Downloads

0

Version

1.0.6

License

MIT

Unpacked Size

5.35 kB

Total Files

6

Last publish

Collaborators

  • afeiship