npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@tarantool.io/webpack-config

v2.1.0

Published

Sharable webpack configuration for Tarantool projects.

Downloads

4,880

Readme

@tarantool.io/webpack-config

Sharable webpack configuration for Tarantool projects.

Usage

// webpack.config.js
const namespace = 'cluster';
const root = __dirname;

module.exports = require("@tarantool.io/webpack-config")({
  namespace,
  root,
});

Full example

// webpack.config.js
const path = require('path');

const namespace = 'cluster';

const root = __dirname;
const src = path.join(root, 'src');
const build = path.join(root, 'build');
const entry = path.join(src, 'index.ts');
const htmlTemplate = path.join(root, 'public', 'index.html');

module.exports = require("@tarantool.io/webpack-config")({
  // [default: depends on env.NODE_ENV] 'prod' or 'dev' build type configuration
  type: 'prod',
  // [default: ''] static files namespace path used in webpack 'output.*filename' and the @tarantool.io/lua-bundler-webpack-plugin plugin
  namespace,
  // [default: process.cwd()] path to the root (project) folder
  root,
  // [default: root + '/src'] path to the src folder
  entry,
  // [default: root + '/build'] path to the build folder
  build,
  // [default: ''] path to the html template used in the HtmlWebpackPlugin
  htmlTemplate,
  // [default: depends on env.PUBLIC_PATH or '/'] Webpack 'output.publicPath' configuration
  publicPath: '/',
  // [default: depends on env.WEBPACK_USE_LUA] enables the @tarantool.io/lua-bundler-webpack-plugin plugin
  lua: true,
  // [default: depends on env.WEBPACK_USE_EMOTION] enables the @emotion/babel-plugin plugin
  emotion: true,
  // [default: depends on env.WEBPACK_USE_SASS] enables the sass-loader
  sass: true,
  // [default: depends on env.WEBPACK_USE_LINT] enables the eslint-webpack-plugin plugin
  lint: true,
  // [default: depends on env.WEBPACK_SOURCE_MAP] enables sourceMap in result build
  sourceMap: false,
  // [default: depends on env.WEBPACK_USE_BUNDLE_ANALYZER_PLUGIN] enables the webpack-bundle-analyzer plugin
  analyze: false,
  // [default: depends on env.WEBPACK_MANIFEST_FILE_NAME] configuration in the webpack-manifest-plugin webpack plugin
  webpackManifestFileName: 'asset-manifest.json',
  // [default: depends on env.WEBPACK_BABEL_PRESENT_ENV_DEBUG] enables the debug configuration in the @babel/preset-env preset
  debugBabelPresetEnv: false,
  // [default: undefined] webpack 'resolve.alias' configuration
  alias: {
    '~': src
  },
  // [default: undefined] environment variables used in the DefinePlugin plugin
  env: {
    REACT_SOME_VAR: 'true',
  },
  // [default: undefined] configuration used in the copy-webpack-plugin plugin
  copy: [],
  // [default: undefined] webpack 'externals' configuration
  externals: {            
    react: 'react',
    'react-dom': 'reactDom',
  },
  // [default: depends on env.HOST or '127.0.0.1'] host configuration used in the webpack dev server configuration
  host: '127.0.0.0'
  // [default: depends on env.PORT or 3000] port configuration used in the webpack dev server configuration
  port: 3000,
  // [default: undefined] proxy configuration used in the webpack dev server configuration
  proxy: {
    '/api': 'http://localhost:8081',
  };
  // [default: undefined] function to change the configuration before creation
  middleware: (cfg) => {
    cfg.cache = false;
    return cfg;
  }
});