snowpack-plugin-replace

1.0.4 • Public • Published

snowpack-plugin-replace

replace your code

Usage

Install

npm install --save-dev snowpack-plugin-replace

Config

add this plugin to your Snowpack config:

snowpack.config.js

{
  plugins: [[
    'snowpack-plugin-replace',
    {
      list: [
        {
          from: 'process.env',
          to: 'import.meta.env'
        }
      ],
    },
  ]]
}

options:

  • from: string or RegExp
  • to: string
  • file: string optional specify file path. its should be a full path

    For Example: require.resolve('./index.js')

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 1.0.4
    90
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 1.0.4
    90
  • 1.0.3
    0
  • 1.0.2
    0
  • 1.0.1
    0
  • 1.0.0
    0

Package Sidebar

Install

npm i snowpack-plugin-replace

Weekly Downloads

90

Version

1.0.4

License

MIT

Unpacked Size

3.29 kB

Total Files

5

Last publish

Collaborators

  • moonrailgun