sebastian-software / babel-preset-edge Goto Github PK
View Code? Open in Web Editor NEWA centralized Babel Configuration for modern React development. (+TypeScript, FastAsync, Macros, ...)
License: Apache License 2.0
A centralized Babel Configuration for modern React development. (+TypeScript, FastAsync, Macros, ...)
License: Apache License 2.0
I have a specific node module that I need babel loader to transpile and that is the object rest operator because the edge browser only supports rest operator for arrays but not for objects.
This is how my .babelrc looks like and is on the same level as my webpack.config.js
{
"presets": [
[
"edge",
{
"transpile": "modern",
"modules": "false"
}
]
]
}
This is how what my webpack.config.js looks like(simplified to only show the loaders)
{
{
test: /\.js$/,
use: [{ loader: 'source-map-loader' }],
enforce: 'pre',
exclude: /node_modules/
},
{
test: /\.tsx?$/,
use: [
{
options: {
useTranspileModule: true,
forceIsolatedModules: true,
useCache: true,
useBabel: true,
reportFiles: ['src/**/*.{ts,tsx}'],
babelCore: '@babel/core'
},
loader: 'awesome-typescript-loader'
}
]
}
}
The module furystack is the one that I need babel loader to transpile and with my current setup, the bundle that uses the furystack module still has the object rest operator in its output(this.options = {...this.options, ...options}
). Are there certain options in babel preset edge that I can use to resolve this situation?
The user might want to have pre-evaluated JavaScript. We might want to use:
https://github.com/kentcdodds/babel-plugin-preval
inside "babel-preset-edge" to allow for this.
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.