3.2.0 • Published 4 years ago

@retailmenot/roux-resolver-webpack-plugin v3.2.0

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

@retailmenot/roux-resolver-webpack-plugin

Webpack resolver plugin for resolving entrypoints within a roux pantry.

Build Status

Installation

npm install @retailmenot/roux-resolver-webpack-plugin

Usage

Add the following to your webpack config.

var RouxResolverWebpackPlugin = require( '@retailmenot/roux-resolver-webpack-plugin' );
{
    // rest of webpack config
    plugins: [
        new webpack.ResolverPlugin( [
            new RouxResolverWebpackPlugin()
        ] )
    ]
}

This should enable you to require files within roux pantries using their ingredient name. e.g. require('@namespace/pantry/path/to/ingredient') will get you the JS entrypoint for the ingredient named by @namespace/pantry/path/to/ingredient.

You can add a query string to your require statements to resolve filetypes other than the js entrypoint. e.g. require('@namespace/pantry/path/to/ingredient?entry=sass') will get you the scss entrypoint for the ingredient named by @namespace/pantry/path/to/ingredient.

Tests

Run unit tests with npm run test

3.2.0

4 years ago

3.1.0

4 years ago

3.0.1

5 years ago

3.0.0

5 years ago

2.0.0

6 years ago

1.4.0

6 years ago

1.3.0

7 years ago

1.2.0

7 years ago

1.1.0

8 years ago

1.0.0

8 years ago