Skip to content

jacobp100/webpack-superalias

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

webpack-superalias

Like webpack's default alias, but more powerful.

npm install --save-dev webpack-superalias

It's a plugin that will transform any request using a user-specified function.

new SuperAlias(path => path)

Note that paths are either an absolute path, or an absolute path with a load of ?loaders on the end.

To replace all files that have an extension .m.css with .css, you can use the setup below.

// webpack.config.js
const SuperAlias = require('webpack-superalias');

module.exports = {
  ...
  plugins: [
    new SuperAlias(path => path.replace(/\.m\.css($|\?)/, '.css'));
  ]
};

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published