Module Options - Vite.js

Effortlessly customize Inkline's Configuration using the Vite.js Plugin options.

Here are the default configuration options:

import { defineConfig } from 'vite';
import { resolve } from 'path';
import { inkline } from '@inkline/plugin/vite';

export default defineConfig({
    plugins: [
        inkline({
            configFile: resolve(process.cwd(), 'inkline.config.ts'),
            extName: '.scss',
            outputDir: resolve(__dirname, '.inkline/css')
        })
    ]
});

configFile

  • Type:

    string

  • Default:

    path.resolve(process.cwd(), 'inkline.config.ts')

  • Description:

    Sets the path to the Inkline configuration file, relative to the project root. The default value automatically determines the file extension.

    import { defineConfig } from 'vite';
    import { resolve } from 'path';
    import { inkline } from '@inkline/plugin/vite';
    
    export default defineConfig({
        plugins: [
            inkline({
                configFile: resolve(process.cwd(), 'inkline.config.ts'),
            })
        ]
    });

extName

  • Type:

    '.scss' | '.css'

  • Default:

    .scss

  • Description:

    Sets the extension of the generated CSS Variables files. By default, Inkline requires the .scss extension, but you can generate .css files for your own needs.

    import { defineConfig } from 'vite';
    import { resolve } from 'path';
    import { inkline } from '@inkline/plugin/vite';
    
    export default defineConfig({
        plugins: [
            inkline({
                outputDir: resolve(__dirname, 'src/css/variables'),
            })
        ]
    });

outputDir

  • Type:

    string

  • Default:

    path.resolve(process.cwd(), 'inkline.config.ts')

  • Description:

    Sets the output directory for the generated CSS Variables files, relative to the config file. The files are generated using the @inkline/config package.

    import { defineConfig } from 'vite';
    import { resolve } from 'path';
    import { inkline } from '@inkline/plugin/vite';
    
    export default defineConfig({
        plugins: [
            inkline({
                outputDir: resolve(__dirname, 'src/css/variables'),
            })
        ]
    });