Skip to content

hongyuanlei/webpack-path-override-plugin

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

webpack-path-override-plugin

How to use it?

Suppose you want override import/require path, such as:

  1. import config from '../../config.market.json'
  2. const config = require('../../config.market.json')

to:

  1. import config from '../../config.other_market.json'
  2. const config = require('../../config.other_market.json')

You can add plugin in to webpack config:

 plugins: [
    new WebpackPathOverridePlugin(/config\.market\.json$/, 'config\.other_market\.json'),
 ],

The first param is the path(it can be a regex) that you want to be override.

The second param is the path that be used to override the first param.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published