1.0.4 • Published 5 years ago
snowpack-plugin-replace v1.0.4
snowpack-plugin-replace
replace your code
Usage
Install
npm install --save-dev snowpack-plugin-replaceConfig
add this plugin to your Snowpack config:
snowpack.config.js
{
plugins: [[
'snowpack-plugin-replace',
{
list: [
{
from: 'process.env',
to: 'import.meta.env'
}
],
},
]]
}options:
- from:
stringorRegExp - to:
string - file:
stringoptional specify file path. its should be a full pathFor Example:
require.resolve('./index.js')