Babel transpile systemjs module skip specific modules?

237
March 29, 2018, at 2:37 PM

I have a vanilla Cordova app. But the fact that it is a Cordova app should not matter, just think of it as a vanilla web site. Most scripts right now are loaded in through the <script> tags. Recently added gulp and Babel transpilation with env preset. I want to begin to migrate to ES2015 module supported by Systemjs. However, because there are lots of legacy codes (and some part I have no idea what it is doing, lots of globals, etc), I want to migrate to ES2015 module on a file-by-file basis. Is there a way to ask Babel not to do module transpilation for some files (but best if transpile for other ES2015 features)? It would be useful if it doesn't mess with files which do not have any export statement.

Answer 1

Look at the ignore or only babel.rc options found here: https://babeljs.io/docs/usage/api/#options

Rent Charter Buses Company
READ ALSO
Django - Access django context array with variable from JavaScript

Django - Access django context array with variable from JavaScript

Let's say I have a dynamic JavaScript variable

273
Convert html list to xml through jQuery

Convert html list to xml through jQuery

I am trying to convert the HTML input data added in list items into XML fileOn button click opens a modal popup which will contain the xml data

196
Electronjs : Saving a db file after compilation

Electronjs : Saving a db file after compilation

So I created a small electronJs desktop application, and for the data storage I used nedbIn dev mode, it works perfectly fine, but when I compile in production (I'm on mac), I can't write the database file anymore

181
How to parse a boolean from a JSON response in React

How to parse a boolean from a JSON response in React

How to parse a boolean from a JSON response in React?

292