Skip to content

Commit 0fea8c4

Browse files
authored
fix: UMD bundle containing process.env flag (#1749)
1 parent 1f6f149 commit 0fea8c4

File tree

2 files changed

+4
-6
lines changed

2 files changed

+4
-6
lines changed

Diff for: jest.config.js

+3-5
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,9 @@ module.exports = {
99
},
1010
testMatch: ['<rootDir>/test/unit/**/*.spec.js'],
1111
testPathIgnorePatterns: ['/node_modules/'],
12-
setupFilesAfterEnv: [
13-
'./test/setup.js'
14-
],
15-
"transform": {
16-
"^.+\\.js$": "<rootDir>/node_modules/babel-jest"
12+
setupFilesAfterEnv: ['./test/setup.js'],
13+
transform: {
14+
'^.+\\.js$': '<rootDir>/node_modules/babel-jest'
1715
},
1816
coverageDirectory: 'coverage',
1917
coverageReporters: ['json', 'lcov', 'text-summary', 'clover'],

Diff for: src/store.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ export function createStore (options) {
1010

1111
export class Store {
1212
constructor (options = {}) {
13-
if (process.env.NODE_ENV !== 'production') {
13+
if (__DEV__) {
1414
assert(typeof Promise !== 'undefined', `vuex requires a Promise polyfill in this browser.`)
1515
assert(this instanceof Store, `store must be called with the new operator.`)
1616
}

0 commit comments

Comments
 (0)