geta-webpack-config-wrapper
v1.0.9
Published
Webpack and tool configurations used to standardize the setup in projects.
Downloads
5
Readme
Configs
Package containing a base webpack config wrapper, and configurations for various tools we use.
Installation
NPM
npm install --save geta-webpack-config-wrapper
Yarn
yarn add geta-webpack-config-wrapper
Includes
Webpack
For webpack I've created a function, used to wrap the webpack config into a more readable / noob friendly format. It contains a ton of pipeline functions that serve various purposes. Overview of those and what they do can be found here: webpack.core.js docs
Babel
This one is automatically used by the webpack.core.js
file.
Basic setup that includes the following presets:
PostCSS
Basic setup that adds some postcss transformations to the .scss files used. They're parsed using postcss-scss
. The webpack.core.js
implements this by default.
For plugins I use these:
postcss-sassy-import
(adds support for imports)autoprefixer
(uses browserconfig from your package.json)postcss-pxtorem
(root value 16, affects font, font-size, line-height, letter-spacing props)
Prettier
Also automatically implemented in webpack.core.js. Adds a basic prettier config to the solution. Currently only parses .ts and .tsx files, will add support for more languages soon-ish.
Stylelint
Basic implementation of stylelint, extending the stylelint-config-standard
with some extra rules / overrides I found useful. Support for scss added. Implemented by default in webpack.core.js
.
TypeScript
For all my projects I use TypeScript, thus I've included a basic config file for it. This one already covers enough to be used on most projects, but can also be extended if you want to override or add additional options. To enable typescript in webpack.core.js
, see the webpack.core.js docs.
TSLint
Since most of my projects use TypeScript, I also added my generic tslint config. It support extending in your own tslint config if you so wish. This one is also configured to work well with the Prettier config, so no weird conflicts occur between the auto formatting and the linter. Auto implemented in webpack.core.js
when TypeScript is added, for dev mode only.