This is an internal Lucify tool that provides a webpack configuration template for Lucify projects.
npm install lucify-webpack-config webpack webpack-dev-server
webpack.config.js in your project root:
var lucifyWebpackConfig = ;var opts =entry: pathpageDefs:title: 'My example page title'description: 'Description'const config = lucifyWebpackConfig;// at this point, you can naturally edit any options// options in the returned webpack configurationconfigoutputdist = 'build' // default would be 'dist'moduleexports = config;
Add the following to your package.json:
You can then build a distribution in the
build folder with:
npm run-script build
Or run a development server:
Note that there is no need to install any other dependencies, such as webpack loaders.
optimize: Set to
trueto enable optimization of assets. Defaults to false.
externalStyles: Set to
ExtractTextPluginto bundle styles in their own file. Defauls to
pageDefs: Array of objects defining html pages to create. Each object corresponds to a single page, with all its fields being passed to the page template. For each object, the following special fields are available:
path: Path of the page, relative to
output.publicPath, defaults to
pageTemplate: Handlebars page template for the page. Defaults to
filenameFilename for the page, without path. Defaults to
Make sure you have the correct node version
Then run tests with
This project is released under the MIT license.