Skip to content

Commit 82f653a

Browse files
committed
build: remove process.env.NODE_ENV in UMD build
Currently it was included in the minified UMD bundle, making it impossible to use it in the browser.
1 parent a93e32b commit 82f653a

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

rollup.config.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import path from 'path'
33
import babel from 'rollup-plugin-babel'
44
import resolve from 'rollup-plugin-node-resolve'
55
import commonjs from 'rollup-plugin-commonjs'
6+
import replace from 'rollup-plugin-replace'
67
import { uglify } from 'rollup-plugin-uglify'
78
import pkg from './package.json'
89

@@ -49,6 +50,7 @@ export default [
4950
external: Object.keys(globals),
5051
plugins: [
5152
resolve(),
53+
replace({ 'process.env.NODE_ENV': JSON.stringify('production') }),
5254
babel(getBabelOptions({ useESModules: true })),
5355
commonjs({ include: '**/node_modules/**' }),
5456
uglify(),

0 commit comments

Comments
 (0)