Transform Sitevision Server Side Javascript.
Only for application build in the old / legacy way If you are building applications in the "bundled" mode, this plugin is not needed.
Read more about bundled apps here: https://developer.sitevision.se/archives/developer-news/developer-news/2021-06-10-bundled-apps
Sitevision Webapps file tree: https://developer.sitevision.se/docs/webapps/getting-started
- index.js
- main.js
- modules
- Pre render hooks (introduced in SV: 6.2)
See files in test/
for ES6-ified files.
npm install --save-dev babel-plugin-transform-sitevision-apps
require("@babel/core").transform("your_code", {
plugins: [["@babel/plugin-transform-sitevision-apps", options]]
});
Sitevision File | Type |
---|---|
index.js | indexjs |
config/*/index.js | indexjs |
hooks.js | indexjs |
main.js | mainjs |
server/module/*.js | modules |
string
, defaults to modules
.
See Type Schema for valid values.
$ npm install
$ npm run build
$ npm test