Flexmonster Software License Agreement (“Agreement”) has been revised and is effective as of January 8, 2025.
The following modifications were made:
The modified version of Agreement is available here.
Downloading, installing, and/or continuing to use Flexmonster Software after January 8, 2025, constitutes Licensee’s acceptance of the terms and conditions of the modified version of Agreement. If Licensee does not agree to any of these terms and conditions, they must cease using Flexmonster Software and must not download, install, use, access, or continue to access Flexmonster Software. By continuing to use Flexmonster Software or renewing the license or maintenance after the effective date of these modifications to Agreement, Licensee accepts and agrees to be bound by the terms and conditions of the modified Agreement.
This tutorial will help you integrate Flexmonster Pivot with any module bundler.
When using a bundler, you need to properly bundle Flexmonster's assets (e.g., styles, fonts, and icons). Some bundlers, like Vite, do it automatically, but usually, you need to configure the following:
.woff
, .woff2
, .eot
, .ttf
, .otf
, .svg
files). Ensure that files with the fonts are present in the node_modules/flexmonster/theme/assets
folder.For example, when working with webpack, you need to specify the following rules:
const path = require('path');
module.exports = {
mode: 'development',
// ...
module: {
rules: [
{
test: /\.css$/,
use: [
'style-loader',
'css-loader'
]
},
{
test: /\.(woff|woff2|eot|ttf|otf|svg)$/,
type: "asset/inline"
}
]
}
};
Check out the sample webpack project. Note that the configs will differ depending on the bundler you are using.
If you encounter any errors, see troubleshooting.
Check out our sample webpack project to learn how to configure your module bundler to properly bundle Flexmonster’s assets.
Step 1. To get our sample webpack project, download it as ZIP or clone it with the following commands:
git clone https://github.com/flexmonster/pivot-webpack
cd pivot-webpack
Step 2. Install the npm dependencies described in package.json
:
npm install
Step 3. Run the sample project from the console:
npm start
The application can be shut down manually with Ctrl + C
(Control + C
on macOS).
The bundler rules are specified in the webpack.config.js file. Check them out.
The error message indicates a bug in the Vite transpiler, which fails while attempting to transpile case statements within Flexmonster's code. Read more on Vite GitHub.
To fix the error, use an older version of rollup:
Step 1. Add the following to your project’s package.json
file:
"overrides": {
"rollup": "4.29.2"
}
Step 2. Run npm install
to apply the changes.
You may be interested in the following articles: