Skip to content

Commit 69abc64

Browse files
committedMar 19, 2019
fix: env option
1 parent 53af8ab commit 69abc64

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed
 

‎src/index.ts

+4-3
Original file line numberDiff line numberDiff line change
@@ -302,7 +302,7 @@ export class Bundler {
302302
...config.plugins.replace,
303303
values: {
304304
...Object.keys(env).reduce((res: Env, name) => {
305-
res[name] = JSON.stringify(env[name])
305+
res[`process.env.${name}`] = JSON.stringify(env[name])
306306
return res
307307
}, {}),
308308
...(config.plugins.replace && config.plugins.replace.values)
@@ -439,8 +439,9 @@ export class Bundler {
439439
inputConfig: {
440440
input: source.input,
441441
plugins,
442-
external: Object.keys(config.globals || {})
443-
.filter(v => !/^[\.\/]/.test(v)),
442+
external: Object.keys(config.globals || {}).filter(
443+
v => !/^[\.\/]/.test(v)
444+
),
444445
onwarn(warning) {
445446
if (typeof warning === 'string') {
446447
return logger.warn(warning)

0 commit comments

Comments
 (0)
Please sign in to comment.