Skip to content

Commit

Permalink
fix: fix babel config
Browse files Browse the repository at this point in the history
  • Loading branch information
satya164 committed Oct 24, 2017
1 parent 9984126 commit 9837e86
Show file tree
Hide file tree
Showing 5 changed files with 175 additions and 111 deletions.
4 changes: 2 additions & 2 deletions .babelrc
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"presets": [
"es2015",
"stage-3"
"env",
"stage-2"
],
"plugins": [
"transform-flow-strip-types",
Expand Down
36 changes: 17 additions & 19 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,25 +35,23 @@
"author": "Satyajit Sahoo <satyajit.happy@gmail.com> (https://github.com/satya164/)",
"license": "MIT",
"dependencies": {
"autoprefixer": "^7.1.4",
"autoprefixer": "^7.1.6",
"babel-core": "^6.26.0",
"babel-loader": "^7.1.2",
"babel-plugin-transform-react-constant-elements": "^6.23.0",
"babel-plugin-transform-react-inline-elements": "^6.22.0",
"babel-plugin-transform-runtime": "^6.23.0",
"babel-polyfill": "^6.26.0",
"babel-preset-es2015": "^6.24.1",
"babel-preset-env": "^1.6.1",
"babel-preset-react": "^6.24.1",
"babel-preset-react-hmre": "^1.1.1",
"babel-preset-stage-3": "^6.24.1",
"babel-preset-stage-2": "^6.24.1",
"babel-runtime": "^6.26.0",
"chalk": "^2.1.0",
"chalk": "^2.3.0",
"cheerio": "^1.0.0-rc.2",
"command-exists": "^1.2.2",
"css-literal-loader": "^0.2.0",
"css-loader": "^0.28.7",
"extract-text-webpack-plugin": "^3.0.0",
"file-loader": "^0.11.2",
"extract-text-webpack-plugin": "^3.0.1",
"file-loader": "^1.1.5",
"glob-expand": "^0.2.1",
"koa": "^2.3.0",
"koa-compose": "^4.0.0",
Expand All @@ -64,33 +62,33 @@
"memory-fs": "^0.4.1",
"ncp": "^2.0.0",
"opn": "^5.1.0",
"postcss-loader": "^2.0.6",
"resolve-url-loader": "^2.1.0",
"style-loader": "^0.18.2",
"url-loader": "^0.5.9",
"webpack": "^3.6.0",
"yargs": "^9.0.1"
"postcss-loader": "^2.0.8",
"resolve-url-loader": "^2.1.1",
"style-loader": "^0.19.0",
"url-loader": "^0.6.2",
"webpack": "^3.8.1",
"yargs": "^10.0.3"
},
"devDependencies": {
"babel-cli": "^6.26.0",
"babel-eslint": "^8.0.1",
"babel-jest": "^21.2.0",
"babel-plugin-transform-flow-strip-types": "^6.22.0",
"coveralls": "^2.13.2",
"coveralls": "^3.0.0",
"cz-conventional-changelog": "^2.0.0",
"del": "^3.0.0",
"del-cli": "^1.1.0",
"eslint": "^4.7.2",
"eslint": "^4.9.0",
"eslint-config-satya164": "^1.0.1",
"eventsource": "^1.0.5",
"flow-bin": "^0.55.0",
"flow-bin": "^0.57.3",
"husky": "^0.14.3",
"jest": "^21.2.1",
"mkdirp": "^0.5.1",
"prettier": "^1.7.2",
"prettier": "^1.7.4",
"react": "^16.0.0",
"react-dom": "^16.0.0",
"semantic-release": "^8.0.3"
"semantic-release": "^8.2.0"
},
"jest": {
"testRegex": "/__tests__/.*\\.(test|spec)\\.js$",
Expand Down
13 changes: 10 additions & 3 deletions src/babelrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,18 @@

const babelrc = {
presets: [
[require.resolve('babel-preset-es2015'), { modules: false }],
[
require.resolve('babel-preset-env'),
{
modules: false,
targets: {
browsers: ['last 2 versions', 'safari >= 7'],
},
},
],
require.resolve('babel-preset-react'),
require.resolve('babel-preset-stage-3'),
require.resolve('babel-preset-stage-2'),
],
plugins: [require.resolve('babel-plugin-transform-runtime')],
env: {
production: {
plugins: [
Expand Down
3 changes: 1 addition & 2 deletions src/configure-webpack.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ const URL_LOADER = {
};
const RESOLVE_URL = 'resolve-url-loader';
const STYLE_LOADER = 'style-loader';
const CSS_LITERAL_LOADER = 'css-literal-loader';
const CSS_LOADER = {
loader: 'css-loader',
options: {
Expand Down Expand Up @@ -86,7 +85,7 @@ export default (options: Options) => ({
{
test: /\.js$/,
exclude: /node_modules/,
use: [BABEL_LOADER, CSS_LITERAL_LOADER],
use: BABEL_LOADER,
},
{
test: /\.(gif|jpg|png|webp|svg)$/,
Expand Down
Loading

0 comments on commit 9837e86

Please sign in to comment.