customization-resolver-webpack-plugin
Makes file imported by relative path overridable from within customization folder
Install
This is for webpack 2.x, for webpack 1.x see this version.
npm install --save-dev customization-resolver-webpack-plugin
Usage with webpack
;; let dir_base = path;let dir_customize = path;let dir_src = path; let webpackConfig = entry:'...' target:'web' // other webpack config stuff resolve: modules: dir_customize dir_src plugins: customizationDir: dir_customize sourceDir: dir_src
Configuration
sourceDir
required String: absolute path to source directory, containing files which can be overridencustomizationDir
required String: absolute path to customization directory, containing files which can override source filesexcludePath
String/RegEx: RegEx which matchespath
property of request object which should not be resolved, defaults to 'node_modules'excludeRequest
String/RegEx: RegEx which matchesrequest
property of request object which should not be resolved, defaults to 'node_modules'jsFileExtension
String: JS file extension (with dot) which gets added to file names without file extension, defaults to '.js'isCompleteFileName
String/RegEx: RegEx which matchesrequest
property of request object to identify filenames with a valid extension. E.g./\.scss$/
to match SCSS files.
Run with debug output
Say you start your bundling process with webpack ./app.js
. Use
NODE_DEBUG=customization-resolver-webpack-plugin webpack ./app.js
to see
debug output of this plugin.
License
MIT ©