UNPKG

raml2html-werk-theme

Version:

a bulma and open-color based single-page theme that is easily searchable and offline-ready

61 lines (59 loc) 1.25 kB
const path = require('path') const MiniCssExtractPlugin = require('mini-css-extract-plugin') module.exports = { mode: process.env.NODE_ENV === 'production' ? 'production' : 'development', entry: [ './assets/docs.js' ], output: { path: path.join(__dirname, 'dist', 'assets'), publicPath: './assets/', filename: 'docs.js' }, module: { rules: [ { test: /\.(woff|woff2|eot|ttf|otf|svg)$/, use: { loader: 'file-loader', options: { publicPath: './' } } }, { test: /\.js$/, exclude: /(node_modules|bower_components)/, use: { loader: 'babel-loader' } }, { test: /\.less$/, use: [ MiniCssExtractPlugin.loader, { loader: 'css-loader' }, { loader: 'postcss-loader' }, { loader: 'less-loader', options: { strictMath: true, strictUnits: true, noIeCompat: true } } ] } ] }, plugins: [ new MiniCssExtractPlugin({ filename: 'docs.css' }) ], devServer: { contentBase: './dist' } }