
Product
Introducing Socket Firewall Enterprise: Flexible, Configurable Protection for Modern Package Ecosystems
Socket Firewall Enterprise is now available with flexible deployment, configurable policies, and expanded language support.
babel-plugin-vtex-render-route
Advanced tools
A babel plugin for extracting VTEX Render route information from a component
A babel plugin for extracting VTEX Render route information from a component
If you write the following:
import route from 'vtex.renderjs/route.js'
// Your React component code here
// Let's call this component 'Home'
export default route('home', '/')(Home)
It will extract the information on the parameters provided for the route function and append it to the babel's file metadata property.
With the example above it would create something like this:
file {
metadata {
// Various babel's properties
vtexRender {
route {
name: 'home',
path: '/'
}
}
}
}
For the extraction to be succesful it depends on some rules:
import from vtex.renderjs/route.jsThat's it!
The name of the function isn't fixed, sou you're not required to use the name route (as written on our example).
This plugin is intended to be used in conjunction with gulp-vtex-render on the VTEX Toolbelt. Together they're able to extract route information on build time for the VTEX Render framework.
FAQs
A babel plugin for extracting VTEX Render route information from a component
The npm package babel-plugin-vtex-render-route receives a total of 6 weekly downloads. As such, babel-plugin-vtex-render-route popularity was classified as not popular.
We found that babel-plugin-vtex-render-route demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Product
Socket Firewall Enterprise is now available with flexible deployment, configurable policies, and expanded language support.

Security News
Open source dashboard CNAPulse tracks CVE Numbering Authorities’ publishing activity, highlighting trends and transparency across the CVE ecosystem.

Product
Detect malware, unsafe data flows, and license issues in GitHub Actions with Socket’s new workflow scanning support.