How to use the webpack-nano/argv.ramdisk function in webpack-nano

To help you get started, we’ve selected a few webpack-nano 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 arso-project / sonar / sonar-ui / webpack.config.js View on Github external
const argv = require('webpack-nano/argv')
const p = require('path')
const HtmlWebpackPlugin = require('html-webpack-plugin')
const { WebpackPluginServe } = require('webpack-plugin-serve')

const isDev = argv.watch || argv.serve || process.env.NODE_ENV === 'development'
let output = 'dist'
let ramdisk = false
if (isDev) {
  // Optional ramdisk arg to build in a ramdisk (faster!)
  ramdisk = !!argv.ramdisk || !!process.env.WP_RAM
  output = ramdisk ? 'build-ramdisk' : 'build'
}
output = p.join(__dirname, output)

const config = {
  entry: ['./src/index.js'],
  mode: isDev ? 'development' : 'production',
  watch: argv.watch || argv.serve,
  devtool: isDev ? 'eval-source-map' : 'none',
  // stats: 'minimal',
  stats: 'minimal',
  module: {
    rules: [
      {
        test: /\.(js|jsx)$/,
        exclude: /node_modules/,

webpack-nano

A teensy, squeaky 🐤 clean Webpack CLI

MPL-2.0
Latest version published 4 years ago

Package Health Score

53 / 100
Full package analysis