Skip to content

Commit 336ac75

Browse files
committed
Fixed npmignore
1 parent d6f92a5 commit 336ac75

File tree

3 files changed

+9
-3
lines changed

3 files changed

+9
-3
lines changed

.npmignore

-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
.babelrc
88
.eslintrc
99
npm-debug.log
10-
lib
1110
src/
1211
examples/
1312
public/

examples/Container.js

+7-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,13 @@ import React, {PropTypes as T} from 'react'
22
import ReactDOM from 'react-dom'
33
import {Link} from 'react-router'
44

5-
import {GoogleApiWrapper} from '../src/index'
5+
let GoogleApiWrapper;
6+
if (__IS_DEV__) {
7+
GoogleApiWrapper = require('../src/index').GoogleApiWrapper
8+
} else {
9+
GoogleApiWrapper = require('../dist').GoogleApiWrapper
10+
}
11+
612
import styles from './styles.module.css'
713

814
export const Container = React.createClass({

webpack.config.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,8 @@ const defines =
5858
memo[`__${key.toUpperCase()}__`] = val;
5959
return memo;
6060
}, {
61-
__NODE_ENV__: JSON.stringify(env.NODE_ENV)
61+
__NODE_ENV__: JSON.stringify(env.NODE_ENV),
62+
__IS_DEV__: isDev
6263
})
6364

6465

0 commit comments

Comments
 (0)