trysound / babel-plugin-iife-wrap Goto Github PK
View Code? Open in Web Editor NEWBabel plugin to wrap file with iife
License: MIT License
Babel plugin to wrap file with iife
License: MIT License
I noticed that in your tests you expect use strict
to have been added to the result, but this isn't mentioned in the readme.
I made a gist to demonstrate:
https://gist.github.com/AlexanderOtavka/698b83a1ffab9b2141d01b6cd25753c7
Babel will transpile the js file just fine if either the iife-wrap plugin or the
transform-es2015-typeof-symbol plugin are commented out, but will not work
if they are both presentiife-wrap seems to make transform-es2015-typeof-symbol run twice on the same
code but I am not sure exactly what is going onSee for yourself. Download and unzip the gist, then run
npm install && npm start
. It will error. Then comment out one of the two
plugins identified by my comments in the gulpfile. Trynpm start
again and
watch it compile successfullly, and print "symbol" as it should.
Now use strict
pushed outside of iife.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.