1.0.4 • Published 4 years ago

snowpack-plugin-replace v1.0.4

Weekly downloads
858
License
MIT
Repository
github
Last release
4 years ago

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')

1.0.4

4 years ago

1.0.3

4 years ago

1.0.2

4 years ago

1.0.1

4 years ago

1.0.0

4 years ago