babelify

How to get babelify 10 to target a browser

大憨熊 提交于 2020-07-09 11:55:06
问题 What I want is To be using the latest versions of the libraries. For it to run in IE 11. I'm building a react app and in order to run the tests I need @testing-library/react. In order to run the tests in a browser I need browserify. In order to run the tests in every browser I support I need babelify. However no matter what I try the babelify does nothing (and IE 11 doesn't support ... or => syntax it generates). Here's the relevant part of package.json (some dependencies are likely not

Yarn Workspaces and Browserify - package.json in subfolder breaks the build

僤鯓⒐⒋嵵緔 提交于 2019-12-08 16:37:31
问题 My ultimate goal is to use Yarn Workspaces in a project using Browserify and Babel 7. This is a minimal reproduction of a problem I'm having. Basically it seems that the presence of a package.json file in a subfolder (which is one of the things that you have when using Yarn Workspaces) breaks my Browserify build, and I can't figure out why. Here's a GitHub repo with a minimal reproduction of the problem. First, install the dependencies (you can use yarn or npm, doesn't matter): $ npm install

Couldn't find preset “env” relative to directory

夙愿已清 提交于 2019-12-06 17:04:17
问题 So far I have been unsuccessful in an attempt to use the env preset. I browsed the git issues that others have raised such as this, and implemented some of the suggestions that appeared to work for others, but no luck so far. Here's what I'm working with: package.json "bundle": "browserify ./client/app.js -d -o ./public/o.js -t [ babelify --presets [ env ] ]", "devDependencies": { "@babel/cli": "^7.0.0-beta.40", "@babel/preset-env": "^7.0.0-beta.40", "babel-core": "^6.26.0", "babelify": "^8.0