bedrock-webpack
Bedrock webpack module
Last updated 8 months ago by mattcollier .
SEE LICENSE IN LICENSE.md · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install bedrock-webpack 
SYNC missed versions from official npm registry.

bedrock-webpack

A bedrock module that provides capability to combine and minify web client resources using webpack.

bedrock-webpack autogenerates and runs a webpack configuration that will combine and minimize input resources into a single output resource.

bedrock-webpack is often coupled with bedrock-views and bedrock-vue to provide frontend UIs. It adds webpack specific commands for development and to the bedrock-views optimize command.

Requirements

  • npm v3+

Quick Examples

In your main app, install the module and load it.

npm install --save bedrock-webpack
require('bedrock-webpack');

Now the bedrock-views optimize command will run the webpack optimization.

Defines

A bedrock command line option is available to allow defining build time constants with the webpack DefinePlugin.

  • Use --webpack-define NAME=VALUE. This can be used multiple times.
  • Check the name exists for optional constants.
  • The value is always a string.
  • These defines take precedence over other bedrock defines. For instance, you can override process.env.NODE_ENV with this option.
node app.js --webpack-define MY_BOOL=true --wepack-define MY_JSON=false
if(typeof MY_BOOL !== 'undefined' && MY_BOOL === 'true') {
  const value = MY_BOOL;
  // ...
}
if(typeof MY_JSON !== 'undefined') {
  const value = JSON.parse(MY_JSON);
  // ...
}

Current Tags

  • 3.6.0                                ...           latest (8 months ago)

22 Versions

  • 3.6.0                                ...           8 months ago
  • 3.5.0                                ...           8 months ago
  • 3.4.0                                ...           2 years ago
  • 3.3.0                                ...           2 years ago
  • 3.2.0                                ...           2 years ago
  • 3.1.0                                ...           2 years ago
  • 3.0.2                                ...           2 years ago
  • 3.0.1                                ...           2 years ago
  • 3.0.0                                ...           2 years ago
  • 2.1.1                                ...           3 years ago
  • 2.1.0                                ...           3 years ago
  • 2.0.0                                ...           3 years ago
  • 1.2.2                                ...           4 years ago
  • 1.2.1                                ...           4 years ago
  • 1.2.0                                ...           4 years ago
  • 1.1.3                                ...           4 years ago
  • 1.1.2                                ...           4 years ago
  • 1.1.1                                ...           4 years ago
  • 1.1.0                                ...           4 years ago
  • 1.0.2                                ...           4 years ago
  • 1.0.1                                ...           4 years ago
  • 1.0.0                                ...           4 years ago
Downloads
Today 0
This Week 0
This Month 12
Last Day 0
Last Week 4
Last Month 13
Dev Dependencies (2)

Copyright 2014 - 2021 © npmmirror.com |