Skip to content

Commit b978b8c

Browse files
committed
unwind babel and local build changes
1 parent b3f01e9 commit b978b8c

File tree

6 files changed

+22
-41
lines changed

6 files changed

+22
-41
lines changed

.babelrc

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
11
{
2-
"presets": ["react", "env", "stage-0"]
2+
"presets": ["react", "es2015", "stage-0"],
3+
"plugins": [
4+
"react-hot-loader/babel"
5+
]
36
}

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,3 @@ node_modules
88
lib/
99
npm-debug.log
1010
.vscode
11-
package-lock.json

package.json

Lines changed: 7 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -31,20 +31,12 @@
3131
"author": "AllenFang",
3232
"license": "MIT",
3333
"devDependencies": {
34-
"babel-cli": "^6.26.0",
35-
"babel-core": "^6.26.0",
36-
"babel-eslint": "^6.1.0",
37-
"babel-loader": "^6.4.1",
38-
"babel-plugin-react-transform": "^3.0.0",
39-
"babel-plugin-transform-class-properties": "^6.24.1",
40-
"babel-plugin-transform-es2015-modules-commonjs": "^6.26.0",
41-
"babel-plugin-transform-imports": "^1.4.1",
42-
"babel-plugin-transform-object-assign": "^6.22.0",
43-
"babel-plugin-transform-object-entries": "^1.0.0",
44-
"babel-polyfill": "^6.26.0",
45-
"babel-preset-env": "^1.6.1",
46-
"babel-preset-react": "^6.24.1",
47-
"babel-preset-stage-0": "^6.22.0",
34+
"babel-core": "^6.0.0",
35+
"babel-eslint": "^6.0.0",
36+
"babel-loader": "^6.0.0",
37+
"babel-preset-es2015": "^6.18.0",
38+
"babel-preset-react": "^6.16.0",
39+
"babel-preset-stage-0": "^6.16.0",
4840
"babelify": "^6.4.0",
4941
"bootstrap": "3.3.5",
5042
"browserify": "^11.2.0",
@@ -72,7 +64,7 @@
7264
"styled-components": "^1.2.1",
7365
"vinyl-source-stream": "^1.1.0",
7466
"watchify": "^3.0.0",
75-
"webpack": "^3.6.0",
67+
"webpack": "^1.12.4",
7668
"webpack-dev-server": "^1.12.1"
7769
},
7870
"dependencies": {

webpack.example.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ module.exports = {
4848
},
4949

5050
plugins: [
51-
new webpack.optimize.CommonsChunkPlugin({name:"vendor", filename:"vendor.bundle.js",}),
51+
new webpack.optimize.CommonsChunkPlugin('vendors', 'vendors.js'),
5252
new webpack.HotModuleReplacementPlugin(),
5353
new webpack.NoErrorsPlugin(),
5454
new webpack.ProgressPlugin(function(percentage, message) {

webpack.umd.config.js

Lines changed: 9 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -14,15 +14,15 @@
1414
// - That's it! Now when you npm publish you'll have a version available on npmcdn as well
1515

1616
var path = require('path');
17-
//var webpack = require('webpack');
17+
var webpack = require('webpack');
1818

1919
module.exports = {
2020
entry: {
2121
'react-bootstrap-table': './src/index.js'
2222
},
2323
devtool: '#cheap-module-source-map',
2424
output: {
25-
path: path.join(__dirname, './dist'),
25+
path: './dist',
2626
filename: '[name].js',
2727
library: 'ReactBootstrapTable',
2828
libraryTarget: 'umd'
@@ -43,29 +43,15 @@ module.exports = {
4343
}
4444
}],
4545
module: {
46+
preLoaders: [{
47+
test: /\.js$/,
48+
exclude: [/node_modules/, path.resolve(__dirname, './src/filesaver.js')],
49+
loader: 'eslint'
50+
}],
4651
loaders: [{
47-
test: /\.es6\.js$/,
52+
test: /\.js$/,
4853
exclude: /node_modules/,
49-
loader: 'babel-loader',
50-
query: {
51-
presets: ['react', 'env', 'stage-0'],
52-
plugins: ['transform-object-assign',
53-
'transform-es2015-arrow-functions',
54-
'transform-class-properties',
55-
'transform-object-entries'],
56-
},
57-
},
58-
{
59-
test: /\.jsx?$/,
60-
exclude: /node_modules/,
61-
loader: 'babel-loader',
62-
query: {
63-
presets: ['react', 'env', 'stage-0'],
64-
plugins: ['transform-object-assign',
65-
'transform-es2015-arrow-functions',
66-
'transform-class-properties',
67-
'transform-object-entries'],
68-
},
54+
loaders: ['babel']
6955
}]
7056
}
7157
};

webpack.umd.min.config.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ var umdConfig = require('./webpack.umd.config');
66
process.env.NODE_ENV = 'production';
77

88
umdConfig.output.filename = '[name].min.js';
9+
umdConfig.devtool = null;
910
umdConfig.plugins = [
1011
new webpack.optimize.OccurrenceOrderPlugin(),
1112
new webpack.optimize.UglifyJsPlugin()

0 commit comments

Comments
 (0)