Skip to content

Commit bd74742

Browse files
committed
build commonjs
1 parent c28c41d commit bd74742

File tree

4 files changed

+1413
-45
lines changed

4 files changed

+1413
-45
lines changed

.babelrc

+13-8
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,16 @@
11
{
2-
"presets": [
3-
[
4-
"env",
5-
{
6-
"modules": false,
2+
"presets": ["env", "flow"],
3+
"env": {
4+
"production": {
5+
"plugins": [
6+
[
7+
"babel-plugin-webpack-loaders",
8+
{
9+
"config": "${WEBPACK_CONFIG}",
10+
"verbose": true
11+
}
12+
]
13+
]
714
}
8-
],
9-
"flow"
10-
],
15+
}
1116
}

package.json

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "find-with-regex",
3-
"version": "1.1.2",
3+
"version": "1.1.3",
44
"description": "findWithRegex util",
55
"author": {
66
"name": "Nik Graf",
@@ -43,6 +43,8 @@
4343
"babel-preset-es2015": "^6.5.0",
4444
"babel-preset-flow": "^6.23.0",
4545
"babel-preset-stage-0": "^6.5.0",
46+
"babel-plugin-webpack-loaders": "^0.9.0",
47+
"webpack": "^2.2.1",
4648
"draft-js": "^0.10.5",
4749
"eslint": "^1.10.3",
4850
"eslint-config-airbnb": "5.0.0",

webpack.config.js

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
module.exports = {
2+
output: {
3+
publicPath: '/',
4+
libraryTarget: 'commonjs2', // necessary for the babel plugin
5+
},
6+
module: {
7+
loaders: [
8+
],
9+
},
10+
};

0 commit comments

Comments
 (0)