Skip to content

Commit

Permalink
fix: remove babel: {} from package.json
Browse files Browse the repository at this point in the history
  • Loading branch information
imevro committed May 17, 2017
1 parent 4347bd3 commit db841f3
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 16 deletions.
3 changes: 3 additions & 0 deletions .babelrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"presets": ["es2015"]
}
8 changes: 1 addition & 7 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "redux-logger",
"version": "3.0.3",
"version": "3.0.4",
"description": "Logger for Redux",
"main": "dist/redux-logger.js",

This comment has been minimized.

Copy link
@thiamsantos

thiamsantos May 17, 2017

Contributor

I was testing here using webpack to bundle and I found a huge problem. If you uses a modern bundler it will lookup for the property module in the package.json and import it, but that imported code will not be transpiled by because we all use a configuration similar to the one below, where we ignore the files from node_modules:

      {
        test: /\.js$/,
        exclude: /node_modules/, // we are excluding the node_modules from babel
        use: {
          loader: 'babel-loader',
          options: {
            presets: ['env']
          }
        }
      },

So, I think we should remove this two properties that I added in #227.

This comment has been minimized.

Copy link
@imevro

imevro May 17, 2017

Author Collaborator

So do it

This comment has been minimized.

Copy link
@imevro

imevro May 17, 2017

Author Collaborator

4 broken versions, pretty good day

This comment has been minimized.

Copy link
@thiamsantos

thiamsantos May 17, 2017

Contributor

Sorry about that @evgenyrodionov. The point is that all the errors were completed unexpected to me. I hope you don't be upset.

"module": "src/index.js",
Expand All @@ -18,12 +18,6 @@
"precommit": "npm test",
"prepublish": "npm run clean && npm test && npm run build"
},
"babel": {
"presets": [
"es2015",
"stage-0"
]
},
"eslintConfig": {
"extends": "airbnb",
"rules": {
Expand Down
18 changes: 9 additions & 9 deletions rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,14 @@ export default {
babel({
babelrc: false,
presets: [
['es2015', {
modules: false,
}],
'stage-0'
],
plugins: [
'external-helpers'
[
'es2015',
{
modules: false,
},
],
],
plugins: ['external-helpers'],
}),
commonjs({
include: 'node_modules/**',
Expand All @@ -30,6 +30,6 @@ export default {
main: true,
browser: true,
}),
uglify()
]
uglify(),
],
};

4 comments on commit db841f3

@thiamsantos
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It fixed #229 @evgenyrodionov?

@imevro
Copy link
Collaborator Author

@imevro imevro commented on db841f3 May 17, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@thiamsantos
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Now I'm sure that the universe is very strange lol

@imevro
Copy link
Collaborator Author

@imevro imevro commented on db841f3 May 17, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Strange only babel's lookup in node_modules/redux-logger/package.json while guys have .babelrc at project's root.

https://babeljs.io/docs/usage/babelrc/#lookup-behavior

Please sign in to comment.