1.0.4 • Published 5 years ago
webpack-suffix-resolver v1.0.4
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