How to use the webpackbar function in webpackbar

To help you get started, we’ve selected a few webpackbar examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github senntyou / lila / packages / lila-webpack-lib-config / src / build.js View on Github external
const buildPath = join(root, buildDir);

  const { BannerPlugin } = webpack;

  const {
    minCss = !0,
    filename = '',
    library = 'Index',
    banner = '',
    externals,
  } = config;

  const baseConfig = base(lila, webpack, { entry, cmd, config });

  baseConfig.plugins.push(
    new WebpackBar(),
    new SpeedMeasurePlugin(),
    // css standalone
    new MiniCssExtractPlugin({
      filename: `${filename || 'style'}.css`,
    })
  );

  if (minCss)
    baseConfig.plugins.push(
      new OptimizeCssAssetsPlugin({
        cssProcessorPluginOptions: {
          preset: ['default', { discardComments: { removeAll: true } }],
        },
      })
    );
github reworkjs / reworkjs / src / internals / webpack / WebpackBase.js View on Github external
getPlugins() {
    // TODO inject DLLs `
    // TODO https://github.com/diurnalist/chunk-manifest-webpack-plugin
    const plugins = [
      new WebpackBar(),
      // remove outdated assets from previous builds.
      new CleanWebpackPlugin(),
      new webpack.DefinePlugin(this.getDefinedVars()),
      new CopyWebpackPlugin([{
        from: frameworkConfig.directories.resources,
        to: './',
        toType: 'dir',
      }]),

      // Inject webpack bundle into HTML.
      new HtmlWebpackPlugin({
        inject: true,
        templateContent: buildIndexPage(),

        // FIXME temporary hack for webpack 4 https://github.com/jantimon/html-webpack-plugin/issues/870
        chunksSortMode: 'none',
github devowlio / wp-react-starter / common / webpack.factory.ts View on Github external
plugins: [
                                    require("autoprefixer")({}),
                                    require(resolve(pwd, "../../common/postcss-plugin-clean"))({})
                                ]
                            }
                        },
                        "sass-loader"
                    ]
                }
            ]
        },
        resolve: {
            extensions: [".js", ".jsx", ".ts", ".tsx"]
        },
        plugins: [
            new WebpackBar(
                webpackBarOptions({
                    name: slug
                })
            ),
            new ForkTsCheckerWebpackPlugin(),
            new DefinePlugin({
                // NODE_ENV is used inside React to enable/disable features that should only be used in development
                "process.env": definePlugin({
                    NODE_ENV: JSON.stringify(NODE_ENV),
                    env: JSON.stringify(NODE_ENV),
                    rootSlug: JSON.stringify(rootPkg.name),
                    slug: JSON.stringify(slug)
                })
            }),
            new MiniCssExtractPlugin({
                filename: "[name].css"
github senntyou / lila / packages / lila-webpack-config / src / build.js View on Github external
export default (lila, webpack, { entry, cmd, config }) => {
  const { getSettings } = lila;
  const [root, srcDir, buildDir] = getSettings(['root', 'src', 'build']);
  const srcPath = join(root, srcDir);
  const buildPath = join(root, buildDir);

  const {
    staticServer = '',
    minCss = !0,
    splitChunks = defaultSplitChunks,
  } = config;

  const baseConfig = base(lila, webpack, { entry, cmd, config });

  baseConfig.plugins.push(
    new WebpackBar(),
    new SpeedMeasurePlugin(),
    // css standalone
    new MiniCssExtractPlugin({
      filename: '[chunkhash].css',
    })
  );

  baseConfig.optimization.splitChunks = splitChunks;

  if (minCss)
    baseConfig.plugins.push(
      new OptimizeCssAssetsPlugin({
        cssProcessorPluginOptions: {
          preset: ['default', { discardComments: { removeAll: true } }],
        },
      })
github nuxt / nuxt.js / packages / webpack / src / config / base.js View on Github external
// CSS extraction)
    if (buildOptions.extractCSS) {
      plugins.push(new ExtractCssChunksPlugin(Object.assign({
        filename: this.getFileName('css'),
        chunkFilename: this.getFileName('css')
      }, buildOptions.extractCSS)))
    }

    plugins.push(new VueLoader.VueLoaderPlugin())

    plugins.push(...(buildOptions.plugins || []))

    plugins.push(new WarningIgnorePlugin(this.warningIgnoreFilter()))

    // Build progress indicator
    plugins.push(new WebpackBar({
      name: this.name,
      color: this.colors[this.name],
      reporters: [
        'basic',
        'fancy',
        'profile',
        'stats'
      ],
      basic: !buildOptions.quiet && env.minimalCLI,
      fancy: !buildOptions.quiet && !env.minimalCLI,
      profile: !buildOptions.quiet && buildOptions.profile,
      stats: !buildOptions.quiet && !this.dev && buildOptions.stats,
      reporter: {
        change: (_, { shortPath }) => {
          if (!this.isServer) {
            nuxt.callHook('bundler:change', shortPath)
github lnlfps / symph-joy / build / webpack.js View on Github external
{
          test: /\.(js|jsx|ts|tsx)$/,
          include: [dir],
          exclude: /node_modules/,
          use: defaultLoaders.babel
        }
      ].filter(Boolean)
    },
    plugins: [
      dev && !isServer && new HardSourceWebpackPlugin({}),
      // This plugin makes sure `output.filename` is used for entry chunks
      new ChunkNamesPlugin({ dev }),
      !isServer && new ReactLoadablePlugin({
        filename: REACT_LOADABLE_MANIFEST
      }),
      new WebpackBar({
        name: isServer ? 'server' : 'client'
      }),
      dev && !isServer && new FriendlyErrorsWebpackPlugin(),
      new webpack.IgnorePlugin(/(precomputed)/, /node_modules.+(elliptic)/),
      // Even though require.cache is server only we have to clear assets from both compilations
      // This is because the client compilation generates the build manifest that's used on the server side
      dev && new JoyRequireCacheHotReloader(),
      dev && !isServer && new webpack.HotModuleReplacementPlugin({ multiStep: true }),
      dev && new webpack.NoEmitOnErrorsPlugin(),
      dev && new UnlinkFilePlugin(),
      dev && new CaseSensitivePathPlugin(), // Since on macOS the filesystem is case-insensitive this will make sure your path are case-sensitive
      dev && new WriteFilePlugin({
        exitOnErrors: false,
        log: false,
        // required not to cache removed files
        useHashIndex: false
github forsigner / dahlia / packages / dahlia-scripts / src / utils / customizeWebpack.ts View on Github external
require.cache[require.resolve(webpackConfigPath)].exports = (env: string) => {
    const config: Configuration = webpackConfig(env)

    if (config.plugins) {
      config.plugins.push(new WebpackBar())
    }

    let newConfig = override(config, env).pipe(
      overrideWebpackExclude(),
      alias({
        '@utils': resolve('utils/'),
        '@common': resolve('common/'),
        '@config': resolve('config/'),
        '@services': resolve('services/'),
        '@stores': resolve('stores/'),
        '@components': resolve('components/'),
        '@layouts': resolve('layouts/'),
        '@pages': resolve('pages/'),
        '@modals': resolve('modals/'),
        '@drawers': resolve('drawers/'),
        '@hooks': resolve('hooks/'),
github senntyou / lila / packages / lila-webpack-config / src / analyze.js View on Github external
export default (lila, webpack, { entry, cmd, config }) => {
  const { getSettings } = lila;
  const [root, srcDir, tmpDir, analyzeDir = 'analyze'] = getSettings([
    'root',
    'src',
    'tmp',
    'analyze',
  ]);
  const srcPath = join(root, srcDir);
  const analyzePath = join(root, tmpDir, analyzeDir);

  const baseConfig = base(lila, webpack, { entry, cmd, config });

  baseConfig.plugins.push(new WebpackBar(), new SpeedMeasurePlugin());

  return {
    entry: `${srcPath}/${entry === defaultEntry ? '' : `${entry}/`}index.js`,
    output: {
      path: analyzePath,
      filename: 'index.js',
    },
    ...baseConfig,
  };
};
github vanilla / vanilla / build / scripts / configs / makeBaseConfig.ts View on Github external
},
    };

    if (options.mode === BuildMode.PRODUCTION) {
        config.plugins.push(
            new MiniCssExtractPlugin({
                filename: "[name].min.css?[chunkhash]",
            }),
        );
    }

    if (options.fix) {
        config.plugins.unshift(getPrettierPlugin());
    }
    config.plugins.push(
        new WebpackBar({
            name: section,
        }),
    );

    return config;
}

webpackbar

Elegant ProgressBar and Profiler for Webpack

MIT
Latest version published 8 months ago

Package Health Score

82 / 100
Full package analysis

Popular webpackbar functions