Question: Hi, I am beginning to contribute to babel. I took up the issue https://github.com/babel/babel/issues/6210 , not I have made the change in babel-preset-es2015 , but now I need to make change in env preset too , but I don't see babel-preset-env in packages. Please correct me if I am wrong. :slightly_smiling_face: sorry, my bad I got it. It is a different repo where I should make change Where should I look for preset-env, or there are docs that I didn't read ? :slightly_smiling_face:

Asked By
ajaynarainmathur
Asked At
2017-09-16 02:13:35

Found 15 possible answers.

User Answered At Possible Answer
loganfsmyth 2017-09-16 02:18:18 yup!
ajaynarainmathur 2017-09-16 02:22:16 Thanks My commit - https://github.com/ajaymathur/babel-preset-env/commit/348a7890b7e91113e462701f0836c5916e178bde
What am I missing?
and when I run build script it shows following in plugins.js . 
"transform-es2015-instanceof": {},
  },
    ]
      "instanceof on Symbol"
    features: [
If I have got it correct, I added dependency then added plugin-features.js
"transform-es2015-instanceof": { Hi I am trying to implement https://github.com/babel/babel/issues/6210 , in babel-preset-env. :slightly_smiling_face: I have created PR https://github.com/babel/babel/pull/6257 for reference. Please guide me. or should I just make a PR and take a feed back there? Now the issue is when I see the _instanceof added, it is different from what is defined in helper this one calls it self in else, may result in infinite loop. at Context. (packages/babel-helper-transform-fixture-test-runner/lib/index.js:59:15)
      at runTask (packages/babel-helper-transform-fixture-test-runner/lib/index.js:30:13)
      at run (packages/babel-helper-transform-fixture-test-runner/lib/index.js:310:47)
      
       function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
       
       function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
       
      +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
      -function _classCallCheck(instance, Constructor) { if (!_instanceof(instance, Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
       
       function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
      -
      -function _instanceof(left, right) { if (right != null && typeof Symbol !== "undefined" && right[Symbol.hasInstance]) { return right[Symbol.hasInstance](left); } else { return _instanceof(left, right); } }
       
       function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
       
       var _args = _interopRequireDefault(require("utils/url/args"));
      + expected - actual
      /Users/ajaymathur/workspace/open-source/babel/packages/babel-plugin-transform-es2015-parameters/test/fixtures/regression/6057-expanded/actual.js !== /Users/ajaymathur/workspace/open-source/babel/packages/babel-plugin-transform-es2015-parameters/test/fixtures/regression/6057-expanded/expected.js
after I added instanceof plugin to es2015 preset, test cases in other transform fail that are":
1) babel-plugin-transform-es2015-parameters/regression 6057 expanded:
jimmybob-leon 2017-09-17 15:41:33 Hi was wondering if I could get some help with some code ?
nicolo-ribaudo 2017-09-17 16:05:05 I can try to help you
jimmybob-leon 2017-09-17 16:14:34 I think I found a solution thanks!
sygmajji 2017-09-17 18:07:04 Hi guys, I am using webpack hot module replacement in my project and when I installed the babel-loader the HMR stopped working (it's still serving the old file when modified). Is it an expected behavior? Am I missing some config/plugins? Thanks!
meglance78 2017-09-17 18:27:27 :heart:
badola21295 2017-09-18 01:58:04 You should probably share your webpack config and the build process you use? People will get a better idea about what might have gone wrong.
ajaynarainmathur 2017-09-18 04:19:49 This is not expected behaviour, you can check create-react-app it used webpack HRM and babel-loader and HRM works fine on it
kovensky 2017-09-18 07:51:59 the only thing I can think of that can be directly related to babel-loader is if you _over-configure_ babel and tell it to convert modules to commonjs modules (which preset env / preset es2015 still do by default) the only thing I can think of that can be directly related to babel-loader is if you _over-configure_ babel and tell it to convert modules to commonjs modules (which preset env / preset es2015 still do by default) [September 17th, 2017 11:07 AM] sygmajji: Hi guys, I am using webpack hot module replacement in my project and when I installed the babel-loader the HMR stopped working (it's still serving the old file when modified). Is it an expected behavior? Am I missing some config/plugins? Thanks!
nicolo-ribaudo 2017-09-18 13:13:21 Ugh I can't type "s" on github (not ever when writing new issues) :sob:
bhanu.vaddavalli 2017-09-18 14:39:54 Babel CLI fails to find presets when compiling files outside the project directory "Babel CLI fails to find presets when compiling files outside the project directory" could anyone help me to achieve this problem?
bmarkovic.79 2017-09-18 14:44:52 Hi everyone. Does anyone know if Babel Minify will parametrically prune code paths? E.g.: I'd like to have some code paths for development and/or testing (based on process.env.NODE_ENV that I can inject into code from Webpack) but as they'd be dead if an injected value is false, I'd like Minify to prune them completely. Is this possible and how would one go about it?
zoe 2017-09-18 15:30:06 Hi guys, I had a question about accessing the "root" path of an expression. I opened a question [here]( https://github.com/babel/babylon/issues/728 ) but was redirected to the slack community. I am really new to babel, but I am trying to learn more about how it works. Could any of you help me?
bhanu.vaddavalli 2017-09-18 15:33:53 could anyone help me to achieve this problem "Babel CLI fails to find presets when compiling files outside the project directory"

Related Questions