open-index/open-npm huggingface dataset:
npm package: @ice/webpack-config
Description: This package providers basic webpack configuration.
Latest version: 1.2.2

# @ice/webpack-config

This package providers basic webpack configuration.

## Usage

```js
import { getWebpackConfig } from '@ice/webpack-config';
import webpack from 'webpack';

const config = { alias: {} };
const rootDir = process.cwd();
const runtimeTmpDir = '.ice';   // the path of the asset-manifest.json

const webpackConfig = getWebpackConfig({ 
  rootDir, 
  config,
  webpack, 
  runtimeTmpDir,
  target: 'web',
});
```
npm package: @ice/webpack-modify
Description: This package providers several APIs to simplify the modification of webpack configurations.
Latest version: 1.0.1

# @ice/webpack-modify

This package providers several APIs to simplify the modification of webpack configurations.

## Usage

```js
import { removeLoader, modifyLoader, addLoader, removePlugin } from '@ice/webpack-modify';

let modifiedConfig = {};

const webpackConfig = {
  module: {
    rules: [
      {
        test: /\.css$/,
        use: [{ loader: "style-loader" }, { loader: "sass-loader" }],
      },
    ],
  },
};

// remove loader
modifiedConfig = removeLoader(webpackConfig, {
  rule: 'css',
  loader: 'style-loader',
});
// modify loader
modifiedConfig = modifyLoader(webpackConfig, {
  rule: 'css',
  loader: 'style-loader',
  options: () => ({}),
});
// add loader
modifiedConfig = addLoader(webpackConfig, {
  rule: 'css',
  before: 'style-loader'
});
modifiedConfig = addLoader(webpackConfig, {
  rule: 'css',
  after: 'style-loader'
});
// modify webpack rule options
modifiedConfig = modifyRule(webpackConfig, {
  rule: 'css',
  options: () => {
    return [
      {
        loader: 'css-loader',
        options: () => ([]),
      },
    ]
  },
})
// remove plugin
modifiedConfig = removePlugin(webpackConfig, {
  pluginName: 'AssetsManifestPlugin',
});
```