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
andcss
files are builtvite build --mode development
- development build, all files are builtvite build --mode emails
- emails build, only email templates 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'
emails.outputDir
- Type:
string
- Default:
'public/email'
Determines location where email files are located after build.
emails.appDir
- Type:
string
- Default:
app/Templates/Emails
Determines where emails are copied after vite build --mode emails
command execution.
vituum
- Type:
Object
- Default:
{ pages: { dir: './src/views' } }
See Vituum for more info about options.
posthtml
- Type:
Object
- Default:
{ root: resolve(process.cwd(), 'src') }
See Vituum for more info about options.
juice
- Type:
string[]
- Default:
['src/views/email']
See Vituum for more info about options.
tailwindcss
- Type:
Object
- Default:
['src/views/email']
See Vituum for more info about options.
send
- Type:
Object
- Default: GitHub
See Vituum for more info about options.
latte
- Type:
Object
- Default: GitHub
See Vituum for more info about options.
twig
- Type:
Object
- Default: GitHub
See Vituum for more info about options.