7.0.0 • Published 8 years ago
@ctrine/webpack-settings-node-app v7.0.0
Common Webpack settings for node apps.
Installation
npm install @ctrine/webpack-settings-node-app
Usage
Webpack settings
The settings can be used directly in your webpack.config.js
like so:
module.exports = require('@ctrine/webpack-settings-node-app').default
Babel preset (Optional)
A babel preset is also included and it
contains a lot of useful plugins to support all the bleeding edge features
available for babel. Add it to the .babelrc
like so:
{
"presets": [ "@ctrine/node-app" ]
}
ESLint settings (Optional)
ESLint settings containing the recommended
code style is also included. Add it to the .eslintrc.json
like so:
{
"extends": "@ctrine/node-app",
"parser": "Babel-ESLint"
}
Expected directory structure
build
src
main.js
.babelrc
.eslintrc.json
webpack.config.js
- build: Directory where the compiled files will reside.
- src: Project’s source.
- main.js: Entry point.
- .babelrc: Preset with the necessary dependencies to compile the app.
- .eslintrc: ESLint settings.
- webpack.config.js: Actual Webpack config, the location of this file is
used do determine the location of the
build
andsrc
directories.
Features
- SASS, LESS and Stylus.
- All CSS files are processed with PostCSS.
- CSS modules with the extensions:
.module.css
,.module.less
,.module.sass
,.module.scss
and.module.styl
.