1.0.1 • Published 4 years ago

alias-path-loader v1.0.1

Weekly downloads
12
License
MIT
Repository
github
Last release
4 years ago

alias-path-loader

A very simple alias replacement plugin to add alias support to pug-plain-loader and similar loaders that don't resolve.

Hint

This loader does a simple string replace, so be very careful with your alias names

Usage

{
    module: {
        rules: [
            {
                test: /\.pug$/,
                loader: [
                    {
                        loader: 'pug-plain-loader'
                    },
                    {
                        loader: 'alias-replacer',
                        options: {
                            alias: {
                                '@img': '/absolute/path/tp/project/src/assets/img',
                            }
                        }
                    }
                ]
            }
        ]
    }
}
1.0.1

4 years ago

1.0.0

4 years ago