Configuring Newlogic Core
Newlogic Core needs to be added as a plugin in vite.config.js inside a project root.
You can also use .mjs, .ts, learn more about Vite config.
The most basic config file looks like this:
import core from '@newlogic-digital/core'
export default {
plugins: [core()]
}Commands
vite build- production build, onlyjs,cssand assets are builtvite build --mode development- development build, pages,js,cssand assets are builtvite build --mode emails- emails build, only email templates and email styles are built
Options
mode
- Type:
string - Default:
null
Determines which build mode is used during build, possible values are 'development', 'production', 'emails'
cert
- Type:
string - Default:
localhost
Certificate name located in .ssh/, eg. localhost-key.pem and localhost.pem. You can also turn off https by setting server.https to false in Vite config.
format
- Type:
string[] - Default:
['latte']
Determines which templates formats are used, possible values are 'latte' and 'twig'
input
- Type:
Object - Default: GitHub
Determines which input paths are used for assets, pages and emails.
codeSplitting
- Type:
Object - Default: GitHub
Determines code splitting groups used for non-email builds.
vituum
- Type:
Object - Default: GitHub
See Vituum for more info about options.
css
- Type:
Object - Default:
{ transformer: 'lightningcss', lightningcss: {} }
Determines CSS processing options.
cssInline
- Type:
Object - Default:
{ paths: ['src/pages/email'], postcss: {} }
Determines CSS inline options for email templates.
tailwindcss
- Type:
Object - Default:
{}
See Tailwind CSS for more info about options.
send
- Type:
Object - Default:
{}
See Vituum for more info about options.
latte
- Type:
Object - Default: GitHub
See Vituum for more info about options.
twig
- Type:
Object - Default:
{}
See Twig plugin for more info about options.
heroicons
- Type:
Object - Default: GitHub
Determines icons generation options.
Default iconSets:
{
'simpleicons-solid': [simpleIcons, 'src/icons/simpleicons'],
'icons-solid': [solidIcons, 'src/icons/solid'],
'icons-outline': 'src/icons/outline',
}Bundled icons are available in the core icons directory.
