Module Options - Webpack.js
Effortlessly customize Inkline's Configuration using the Webpack.js Plugin options.
Here are the default configuration options:
webpack.config.js
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. webpack.config.jsconst { 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 .scssextension, but you can generate.cssfiles for your own needs.webpack.config.jsconst { 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. webpack.config.jsconst { resolve } = require('path'); const inkline = require('@inkline/plugin/webpack'); module.exports = { plugins: [ inkline({ outputDir: resolve(__dirname, '.inkline/css') }) ] };