UNPKG

@procore/core-css

Version:

The building blocks of the Procore universe.

45 lines (39 loc) 985 B
const path = require('path') const webpack = require('webpack') const { addPlugins, createConfig, css, devServer, env, entryPoint, extractText, match, sass, setOutput } = require('webpack-blocks') const package = require('./package.json') module.exports = createConfig([ entryPoint('./src/index.scss'), setOutput({ path: path.resolve(__dirname, 'build'), filename: 'index.js' }), match('*.scss', { exclude: path.resolve('node_modules') }, [ css({ modules: true, localIdentName: 'core-[local]' }), env('production', [sass({ minimize: true })]), env('development', [ sass({ localIdentName: 'core-[local]', minimize: false }) ]), extractText('core.css') ]), env('production', [ addPlugins([ new webpack.BannerPlugin({ banner: `${package.name} v${ package.version } (https://procore.github.io/core/latest/css)\nCopyright (c) 2016 Procore Technologies, Inc.` }) ]) ]) ])