Skip to content

Commit

Permalink
fix: #20
Browse files Browse the repository at this point in the history
  • Loading branch information
foxhound87 committed Sep 23, 2016
1 parent 0e188f6 commit 56fb745
Show file tree
Hide file tree
Showing 6 changed files with 22 additions and 19 deletions.
5 changes: 3 additions & 2 deletions .babelrc
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
"presets": ["es2015", "stage-0", "react"],
"plugins": [
"transform-decorators-legacy",
"transform-decorators",
"transform-class-properties"
"transform-class-properties",
"add-module-exports",
"transform-es2015-modules-umd"
]
}
1 change: 1 addition & 0 deletions demo/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
"mobx": "2.5.1",
"mobx-react": "3.5.6",
"mobx-react-devtools": "4.2.6",
"mobx-react-matchmedia": "1.1.1",
"react": "15.3.2",
"react-dom": "15.3.2"
},
Expand Down
1 change: 0 additions & 1 deletion demo/src/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,5 @@
</head>
<body>
<div id="app"></div>
<script src="main.js"></script>
</body>
</html>
1 change: 1 addition & 0 deletions demo/src/main.jsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import React from 'react';
import { render } from 'react-dom';
import DevTools from 'mobx-react-devtools';
// import { MatchMediaProvider } from 'mobx-react-matchmedia'; // eslint-disable-line
import { MatchMediaProvider } from '../../src';
import Breakpoints from './Breakpoints';

Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -63,9 +63,10 @@
"babel-cli": "6.14.0",
"babel-eslint": "6.1.2",
"babel-loader": "6.2.5",
"babel-plugin-add-module-exports": "0.2.1",
"babel-plugin-transform-class-properties": "6.11.5",
"babel-plugin-transform-decorators": "6.13.0",
"babel-plugin-transform-decorators-legacy": "1.3.4",
"babel-plugin-transform-es2015-modules-umd": "6.12.0",
"babel-plugin-transform-runtime": "6.15.0",
"babel-preset-es2015": "6.14.0",
"babel-preset-react": "6.11.1",
Expand Down
30 changes: 15 additions & 15 deletions webpack.config.babel.js
Original file line number Diff line number Diff line change
@@ -1,31 +1,31 @@
import { join } from 'path';

const include = join(__dirname, 'src');
const loaders = [{
test: /\.jsx?$/,
loader: 'babel-loader',
include: join(__dirname, 'src'),
}, {
test: /\.json$/,
loader: 'json-loader',
}];

export default {
devtool: 'source-map',
entry: './src/index',
output: {
path: join(__dirname, 'umd'),
libraryTarget: 'umd',
library: 'MobXReactMatchMedia',
},
resolve: {
root: include,
root: join(__dirname, 'src'),
modulesDirectories: ['node_modules'],
extensions: ['', '.js', '.jsx', '.json'],
alias: {
react: join(__dirname, 'node_modules', 'react'),
},
},
output: {
path: join(__dirname, 'umd'),
libraryTarget: 'umd',
library: 'MobXReactMatchMedia',
},
module: {
loaders: [{
test: /\.js$/,
loader: 'babel-loader',
include,
}, {
test: /\.json$/,
loader: 'json-loader',
}],
loaders,
},
};

0 comments on commit 56fb745

Please sign in to comment.