Skip to content
This repository was archived by the owner on Jan 18, 2022. It is now read-only.

Commit 3563168

Browse files
committed
Hack: replace process.env.NODE_ENV in vue.common.js
1 parent 5e036c3 commit 3563168

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/index.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,9 @@ export default function vue(options = {}) {
1212
name: 'vue',
1313
transform(source, id) {
1414
if (!filter(id) || !id.endsWith('.vue')) {
15+
if (id.endsWith('vue.common.js')) {
16+
return source.replace(/process\.env\.NODE_ENV/g, process.env.NODE_ENV || 'window.NODE_ENV')
17+
}
1518
return null;
1619
}
1720

0 commit comments

Comments
 (0)