Skip to content

Commit

Permalink
Strip the code from production bundle by default
Browse files Browse the repository at this point in the history
  • Loading branch information
zalmoxisus committed Jul 19, 2016
1 parent f2a9489 commit 676ef90
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 4 deletions.
2 changes: 1 addition & 1 deletion examples/counter/stores/appState.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { observable, action, extras } from 'mobx';
import remotedev from '../../../src'; // import remotedev from 'mobx-remotedev';
import remotedev from '../../../src/dev'; // import remotedev from 'mobx-remotedev/lib/dev';

const appState = observable({
count: 0
Expand Down
2 changes: 1 addition & 1 deletion examples/todomvc/src/stores/TodoStore.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import {observable, computed, action, autorun} from 'mobx';
import remotedev from '../../../../src'; // import remotedev from 'mobx-remotedev';
import remotedev from '../../../../src/dev'; // import remotedev from 'mobx-remotedev/lib/dev';
import TodoModel from '../models/TodoModel'
import * as Utils from '../utils';

Expand Down
2 changes: 1 addition & 1 deletion examples/todomvc/src/stores/ViewStore.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import {observable} from 'mobx';
import { ALL_TODOS } from '../constants';
import remotedev from '../../../../src'; // import remotedev from 'mobx-remotedev';
import remotedev from '../../../../src/dev'; // import remotedev from 'mobx-remotedev/lib/dev';

class ViewStore {
@observable todoBeingEdited = null;
Expand Down
6 changes: 5 additions & 1 deletion src/index.js
Original file line number Diff line number Diff line change
@@ -1 +1,5 @@
module.exports = require('./dev').default;
if (process.env.NODE_ENV === 'development') {
module.exports = require('./dev').default; // eslint-disable-line global-require
} else {
module.exports = store => store;
}

0 comments on commit 676ef90

Please sign in to comment.