Skip to content
This repository has been archived by the owner on Jun 24, 2020. It is now read-only.

Commit

Permalink
Minify es6 (#61)
Browse files Browse the repository at this point in the history
* remove transpilation to es5

* update webpack config

* fix tests
  • Loading branch information
Alexander Ivantsov authored Oct 3, 2017
1 parent 445738f commit a3a7fe2
Show file tree
Hide file tree
Showing 7 changed files with 200 additions and 331 deletions.
4 changes: 1 addition & 3 deletions .babelrc
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
{
"presets": [
["es2015", {"modules": false}],
"react"
],
"plugins": [
"transform-object-rest-spread",
"transform-class-properties",
"transform-async-to-generator"
"transform-class-properties"
],
"env": {
"test": {
Expand Down
5 changes: 2 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@
"release": "node ./scripts/release"
},
"dependencies": {
"babel-polyfill": "^6.26.0",
"lodash.debounce": "^4.0.8",
"prop-types": "^15.5.10",
"query-string": "^5.0.0",
Expand All @@ -50,10 +49,9 @@
"babel-core": "^6.26.0",
"babel-eslint": "^8.0.1",
"babel-loader": "^7.1.2",
"babel-plugin-transform-async-to-generator": "^6.24.1",
"babel-plugin-transform-class-properties": "^6.24.1",
"babel-plugin-transform-es2015-modules-commonjs": "^6.26.0",
"babel-plugin-transform-object-rest-spread": "^6.26.0",
"babel-preset-es2015": "^6.24.1",
"babel-preset-react": "^6.24.1",
"circular-dependency-plugin": "^4.2.0",
"codecov": "^2.3.0",
Expand All @@ -78,6 +76,7 @@
"react-test-renderer": "^16.0.0",
"rimraf": "^2.6.2",
"style-loader": "^0.18.2",
"uglifyjs-webpack-plugin": "^1.0.0-beta.2",
"web-ext": "^2.0.0",
"webext-i18n": "^1.1.0",
"webpack": "^3.5.5",
Expand Down
1 change: 0 additions & 1 deletion src/pages/background/index.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import 'babel-polyfill';
import {LOAD_STORAGE_DATA} from 'shared/redux-consts/meta';
import store from './redux/store';
import './redux/ext-store'; // init redux-webext store
Expand Down
1 change: 0 additions & 1 deletion src/pages/popup/index.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import 'babel-polyfill';
import React from 'react';
import ReactDOM from 'react-dom';
import {Provider} from 'react-redux';
Expand Down
1 change: 0 additions & 1 deletion src/pages/settings/index.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import 'babel-polyfill';
import React from 'react';
import ReactDOM from 'react-dom';
import {Provider} from 'react-redux';
Expand Down
13 changes: 2 additions & 11 deletions webpack/prod.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
const webpack = require('webpack');
const UglifyJSPlugin = require('uglifyjs-webpack-plugin');
const ExtractTextPlugin = require('extract-text-webpack-plugin');
const {generateHtmlPlugins} = require('./utils');
const {
Expand Down Expand Up @@ -32,17 +33,7 @@ module.exports = (target) => ({
'process.env.NODE_ENV': JSON.stringify('production'),
__DEV__: false,
}),
new webpack.optimize.UglifyJsPlugin({
beautify: false,
mangle: {
screw_ie8: true,
keep_fnames: true,
},
compress: {
screw_ie8: true,
},
comments: false,
}),
new UglifyJSPlugin(),
plugins.circularDependency,
plugins.copy,
plugins.shell(target),
Expand Down
Loading

0 comments on commit a3a7fe2

Please sign in to comment.