@k88/module-scope-plugin
v1.1.0
Published
An Webpack resolve plugin that prevents users from importing files from outside of src/ and node_modules/ directory
Downloads
26,139
Maintainers
Readme
Installation
Install using
npm install @k88/module-scope-plugin
Usage
Add this plugin to the resolve
key of Webpack:
const ModuleScopePlugin = require('@k88/ModuleScopePlugin');
module.exports = {
...webpackConfig,
resolve: {
/* other resolve configs */
plugins: [
new ModuleScopePlugin(APP_SOURCE_PATH, [ OTHER_PATHS, PACKAGE_JSON_PATH ]),
],
},
}