2.0.0 • Published 5 years ago

roe-plugin-resolve-alias v2.0.0

Weekly downloads
2
License
MIT
Repository
github
Last release
5 years ago

Build Status Coverage

roe-plugin-resolve-alias

Roe plugin to define module resolving aliases for both server side and client side

Install

$ npm i roe-plugin-resolve-alias

Usage

roe.config.js

const AliasPlugin = require('roe-plugin-resolve-alias')

module.exports = {
  plugins: [
    new AliasPlugin({
      fetch: {
        server: 'node-fetch',
        client: 'fetch-ponyfill'
      }
    })
  ],
  ...
}

The code above will set webpack.output.resolve.alias.fetch as

  • 'node-fetch' in server side
  • and 'fetch-ponyfill' in client side

License

MIT