Skip to content

Commit

Permalink
unwind babel and local build changes
Browse files Browse the repository at this point in the history
  • Loading branch information
powellandy committed Nov 27, 2017
1 parent b3f01e9 commit b978b8c
Show file tree
Hide file tree
Showing 6 changed files with 22 additions and 41 deletions.
5 changes: 4 additions & 1 deletion .babelrc
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
{
"presets": ["react", "env", "stage-0"]
"presets": ["react", "es2015", "stage-0"],
"plugins": [
"react-hot-loader/babel"
]
}
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,3 @@ node_modules
lib/
npm-debug.log
.vscode
package-lock.json
22 changes: 7 additions & 15 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,20 +31,12 @@
"author": "AllenFang",
"license": "MIT",
"devDependencies": {
"babel-cli": "^6.26.0",
"babel-core": "^6.26.0",
"babel-eslint": "^6.1.0",
"babel-loader": "^6.4.1",
"babel-plugin-react-transform": "^3.0.0",
"babel-plugin-transform-class-properties": "^6.24.1",
"babel-plugin-transform-es2015-modules-commonjs": "^6.26.0",
"babel-plugin-transform-imports": "^1.4.1",
"babel-plugin-transform-object-assign": "^6.22.0",
"babel-plugin-transform-object-entries": "^1.0.0",
"babel-polyfill": "^6.26.0",
"babel-preset-env": "^1.6.1",
"babel-preset-react": "^6.24.1",
"babel-preset-stage-0": "^6.22.0",
"babel-core": "^6.0.0",
"babel-eslint": "^6.0.0",
"babel-loader": "^6.0.0",
"babel-preset-es2015": "^6.18.0",
"babel-preset-react": "^6.16.0",
"babel-preset-stage-0": "^6.16.0",
"babelify": "^6.4.0",
"bootstrap": "3.3.5",
"browserify": "^11.2.0",
Expand Down Expand Up @@ -72,7 +64,7 @@
"styled-components": "^1.2.1",
"vinyl-source-stream": "^1.1.0",
"watchify": "^3.0.0",
"webpack": "^3.6.0",
"webpack": "^1.12.4",
"webpack-dev-server": "^1.12.1"
},
"dependencies": {
Expand Down
2 changes: 1 addition & 1 deletion webpack.example.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ module.exports = {
},

plugins: [
new webpack.optimize.CommonsChunkPlugin({name:"vendor", filename:"vendor.bundle.js",}),
new webpack.optimize.CommonsChunkPlugin('vendors', 'vendors.js'),
new webpack.HotModuleReplacementPlugin(),
new webpack.NoErrorsPlugin(),
new webpack.ProgressPlugin(function(percentage, message) {
Expand Down
32 changes: 9 additions & 23 deletions webpack.umd.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,15 @@
// - That's it! Now when you npm publish you'll have a version available on npmcdn as well

var path = require('path');
//var webpack = require('webpack');
var webpack = require('webpack');

module.exports = {
entry: {
'react-bootstrap-table': './src/index.js'
},
devtool: '#cheap-module-source-map',
output: {
path: path.join(__dirname, './dist'),
path: './dist',
filename: '[name].js',
library: 'ReactBootstrapTable',
libraryTarget: 'umd'
Expand All @@ -43,29 +43,15 @@ module.exports = {
}
}],
module: {
preLoaders: [{
test: /\.js$/,
exclude: [/node_modules/, path.resolve(__dirname, './src/filesaver.js')],
loader: 'eslint'
}],
loaders: [{
test: /\.es6\.js$/,
test: /\.js$/,
exclude: /node_modules/,
loader: 'babel-loader',
query: {
presets: ['react', 'env', 'stage-0'],
plugins: ['transform-object-assign',
'transform-es2015-arrow-functions',
'transform-class-properties',
'transform-object-entries'],
},
},
{
test: /\.jsx?$/,
exclude: /node_modules/,
loader: 'babel-loader',
query: {
presets: ['react', 'env', 'stage-0'],
plugins: ['transform-object-assign',
'transform-es2015-arrow-functions',
'transform-class-properties',
'transform-object-entries'],
},
loaders: ['babel']
}]
}
};
1 change: 1 addition & 0 deletions webpack.umd.min.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ var umdConfig = require('./webpack.umd.config');
process.env.NODE_ENV = 'production';

umdConfig.output.filename = '[name].min.js';
umdConfig.devtool = null;
umdConfig.plugins = [
new webpack.optimize.OccurrenceOrderPlugin(),
new webpack.optimize.UglifyJsPlugin()
Expand Down

0 comments on commit b978b8c

Please sign in to comment.