1.0.4 • Published 6 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 --devUsage 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