@nitrooo/webpack
nitro webpack
Last updated 2 years ago by ernscht .
MIT · Original npm · Tarball · package.json
$ cnpm install @nitrooo/webpack 
SYNC missed versions from official npm registry.

nitro-webpack

Configurable and easy to use webpack config for nitro projects.

Usage

const options = {
	rules: {
		ts: false,
		scss: true,
		hbs: true,
		woff: true,
		image: true,
	},
	features: {
	    gitInfo: false,
	},
};
const webpackConfig = require('@nitrooo/webpack/webpack-config/webpack.config.dev')(options);

module.exports = webpackConfig;

Configuration

Rules

Only js loader rule is enabled by default. Activate following prepared rules you need in options.rules

options.rules.ts

  • Type: boolean
  • default: false

true will activate TypeScript support

options.rules.scss

  • Type: boolean
  • default: false

true will activate scss support

options.rules.hbs

  • Type: boolean
  • default: false

true will activate handlebars handlebars precompiled templates support

options.rules.woff

  • Type: boolean
  • default: false

true will activate woff font support (in CSS files)

options.rules.image

  • Type: boolean
  • default: false

true will activate image support ()

options.features

Enable some additional features

options.features.gitInfo

  • Type: boolean
  • default: false

(only relevant for production build)

true will add infos from git (branchname/last commit) in assets banner text

Current Tags

  • 0.0.1                                ...           latest (2 years ago)

1 Versions

  • 0.0.1                                ...           2 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 2
Dev Dependencies (1)
Dependents (0)
None

Copyright 2014 - 2016 © taobao.org |