svelte-draft-loader

A webpack loader for svelte-draft.

Install

npm install --save-dev svelte-draft-loader

OR

yarn add --dev svelte-draft-loader

Example Usage

webpack.config.js

module.exports = {
    // ...
    
    module: {
        rules: [
            {
                test: /\.tsx$/,
                use: [
                    {
                        loader: 'svelte-loader',
                        options: {
                            emitCss: true,
                            hotReload: true
                        }
                    },
                    'svelte-draft-loader'
                ]
            },
            {
                test: /\.css$/,
                use: [
                    prod ? MiniCssExtractPlugin.loader : 'style-loader',
                    'css-loader'
                ]
            }
        ]
    }
    
    // ...
}

Top categories

Loading Svelte Themes