An open API service indexing awesome lists of open source software.

https://github.com/morulus/webpack-import-sub-plugin

Use import substitution with webpack
https://github.com/morulus/webpack-import-sub-plugin

Last synced: about 1 month ago
JSON representation

Use import substitution with webpack

Awesome Lists containing this project

README

          

webpack-import-sub-plugin
--

Use [Import sub](https://github.com/morulus/import-sub) with [https://webpack.js.org/](Webpack).

Usage
----

```shell
npm i webpack-import-sub-plugin --D
```

In the configuration file:

```js
const WebpackImportSubPlugin = 'webpack-import-sub-plugin';

const config = {
...,
plugins: [
new WebpackImportSubPlugin([
{
match: {
request: /some\.js/,
base: /app/,
},
use: {
request: "./to.js"
}
}
])
]
}
```

Author
----

Vladimir Kalmykov

License
----
MIT