Skip to content

Latest commit

 

History

History
59 lines (43 loc) · 1.04 KB

README.md

File metadata and controls

59 lines (43 loc) · 1.04 KB

@fbi-js/webpack-config-react

Webpack config for React.js project. Extends @fbi-js/webpack-config-base

Usage

npm i -D @fbi-js/webpack-config-react webpack@5 webpack-dev-server@next
  • ./webpack.config.js

    const config = require('@fbi-js/webpack-config-react').default
    
    // default
    module.exports = config()
    
    // extends
    module.exports = {
      ...config(),
      entry: './index.js'
    }
    
    // with options
    module.exports = config({
      options: {
        isTs: true
      }
    })
  • or ./webpack.config.ts

    import config from '@fbi-js/webpack-config-react'
    
    // default
    export default config()
    
    // extends
    export default {
      ...config(),
      entry: './index.js'
    }
    
    // with options
    export default config({
      options: {
        isTs: true
      }
    })

License

Licensed under MIT.