Skip to content
This repository has been archived by the owner on Mar 19, 2022. It is now read-only.

fabian-michael/svelte-draft-loader

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

32 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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'
                ]
            }
        ]
    }
    
    // ...
}