@ptkhanh94npm/possimus-mollitia-earum

1.0.0 • Public • Published

@ptkhanh94npm/possimus-mollitia-earum

Create constants that replace various expressions at build-time

Install

npm install --save-dev @ptkhanh94npm/possimus-mollitia-earum

Usage

// babel.config.json
{
  "plugins": [
    ["define-patterns", {
      "replacements": {
        "process.env.NODE_ENV": "production",
        "typeof window": "object",
        "__DEV__": true,
        "require('currentBuildNumber')": 42
      }
    }]
  ]
}

Example

Input:

process.env.NODE_ENV

Options:

{
	"replacements": {
		"process.env.NODE_ENV": "development"
	}
}

Output:

"development"

For more examples see input.txt and output.txt.

Readme

Keywords

Package Sidebar

Install

npm i @ptkhanh94npm/possimus-mollitia-earum

Weekly Downloads

1

Version

1.0.0

License

MIT

Unpacked Size

17.2 kB

Total Files

10

Last publish

Collaborators

  • skylerlabsventure