This package has been deprecated

Author message:

Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.

@temporg/config-webpack

99.10.0 • Public • Published

category: packages

config-webpack

npm  build-status  MIT License  Code of Conduct

A shared webpack config made by Rock Content

Installation

yarn add @temporg/config-webpack

Usage

In your Webpack config file:

/* webpack.config.js */
const baseConfig = require('@temporg/config-webpack')
module.exports = {
  ...baseConfig,
  plugins: [ ...baseConfig.plugins, ...myPlugins ],
  module: {
    // note: put your rules first
    rules: [ ...myModuleRules, ...baseConfig.module.rules ]
  },
  resolveLoader: {
    alias: { ...baseConfig.resolveLoader.alias, ...myLoaderAliases }
  }
}

Themeable Components

If your application already has a babel config and webpack config, and it is costly to convert fully to the shared webpack config, you can introduce themeable components incrementally by adding the appropriate loader and resolve loader to your existing webpack config.

/* webpack.config.js */
module.exports = {
  module: {
    rules: [
      {
        test: /\.css$/,
        exclude: [/node_modules/],
        use: [
          'babel-loader',
          'themeable-css-loader',
          'postcss-loader'
        ]
      }
    ]
  },
  resolveLoader: {
    alias: require('@temporg/config-webpack').resolveLoader.alias
  }
}

Dependencies (17)

Dev Dependencies (0)

    Package Sidebar

    Install

    npm i @temporg/config-webpack

    Weekly Downloads

    1

    Version

    99.10.0

    License

    MIT

    Unpacked Size

    7.48 kB

    Total Files

    7

    Last publish

    Collaborators

    • npm