Set environment variable using process.env
.
$ yarn add --dev @start/plugin-env
# or
$ npm install --save-dev @start/plugin-env
env(vars: { [key: string]: any })
import sequence from '@start/plugin-sequence'
import env from '@start/plugin-env'
import webpack from '@start/plugin-webpack'
export task = async () => {
const { default: webpackConfig } = await import('./webpack-config')
return sequence(
env({ NODE_ENV: 'production' }),
webpack(webpackConfig)
)
}