webpack-suffix-resolver

1.0.4 • Public • Published

Webpack suffix resolver

Setup

$ npm install webpack-suffix-resolver --save-dev
OR 
$ yarn add webpack-suffix-resolver --dev

Usage sample

const SuffixResolver = require('webpack-suffix-resolver');
const webpackConfig = {
  ...
  resolve: {
    plugins: [new SuffixResolver('ios', ['.js', '.ts'])],
  },
  ...
};

The config above will resolve files with .ios.js, .ios.ts first if there is no file matched then the original module will be resolved

Readme

Keywords

Package Sidebar

Install

npm i webpack-suffix-resolver

Weekly Downloads

0

Version

1.0.4

License

MIT

Unpacked Size

5.56 kB

Total Files

11

Last publish

Collaborators

  • vahidd