Version 2
What is new? Migration Guide From V1
Getting Started
Understanding WinnetouJs Setting Up
Constructos
Creating Constructos Advanced Options Lazy Loading
Mutables
Constructos State Management Case: Custom State Management System Winnetou FX
Addons
Winnetou Selectors Winnetou Router App Translations CSS Sass Built-in Transpiler SVG Icons Color Themes
Extras
Useful JsDoc Syntax
Plugins
Creating Plugins SlideScreen Official Plugin Animate Official Plugin
Compiling to Production
WBR
API Change Log Git Hub Pull Requests Guidelines Get in touch
Compiling to Production

Winnetou Bundle Releaser - WBR

The creation of the bundle is very easy and is done through the babel and webpack. You just need to determine the entry and the out in win.config.json.

You can set more than one app to be compiled at same time.

win.config.json

...
apps:[{
  entry: "./js/themesApp.js",
  out: "./releaseThemesApp"
}],
...

and run node wbr --bundleRelease and the bundle release will be in "./releaseThemesApp/winnetouBundle.min.js" with the source map and lazy modules too.

Production Mode

WBR will compile in dev mode allowing you debug your code in devtools with mapping. To reduce bundle size and obfuscate the output, run with --production flag: node wbr --bundleRelease --production.

In Deep Projects

If you are working with deep project folders and calls js files in up folders, add this dev dependencies to you main package.json on the project root, otherwise you may get some webpack errors:

package.json

        
"devDependencies": {
    "@babel/core": "^7.24.5",
    "@babel/eslint-parser": "^7.24.5",
    "@babel/plugin-transform-nullish-coalescing-operator": "^7.24.1",
    "@babel/plugin-transform-optional-chaining": "^7.24.5",
    "@babel/plugin-transform-runtime": "^7.24.3",
    "@babel/preset-env": "^7.24.5",
    "@babel/runtime": "^7.24.5",
    "babel-loader": "^9.1.3",
    "webpack": "^5.2.0"
}