Module Options - Webpack.js

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

Here are the default configuration options:

const { resolve } = require('path');
const inkline = require('@inkline/plugin/webpack');

module.exports = {
    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.

    const { resolve } = require('path');
    const inkline = require('@inkline/plugin/webpack');
    
    module.exports = {
        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.

    const { resolve } = require('path');
    const inkline = require('@inkline/plugin/webpack');
    
    module.exports = {
        plugins: [
            inkline({
                extName: '.scss'
            })
        ]
    };

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.

    const { resolve } = require('path');
    const inkline = require('@inkline/plugin/webpack');
    
    module.exports = {
        plugins: [
            inkline({
                outputDir: resolve(__dirname, '.inkline/css')
            })
        ]
    };