Building your code
Frontwerk will help you compile and build your app using one of the following:
You are free to choose your build tool depending on what your project is. A good rule of thumb is to use:
- Babel if you are trying to compile separate Javascript files written with next generation Javascript features, to run in older browsers.
- Webpack if you are working on a Single Page Application.
- Rollup if you want to ship a flat library, such as an utility.
Choose your builder
Babel (default)
{
"scripts": {
"build": "frontwerk build"
}
}
Continue reading about using babel.
Rollup
{
"scripts": {
"build": "frontwerk build --bundle"
}
}
Continue reading about using rollup.
Webpack
{
"scripts": {
"build": "frontwerk build --pack"
}
}
Continue reading about using webpack.