How to use the @webpack-blocks/webpack.match function in @webpack-blocks/webpack

To help you get started, we’ve selected a few @webpack-blocks/webpack examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github andywer / webpack-blocks / packages / webpack / __e2e-fixtures__ / postcss-sass-sourcemaps / webpack.config.js View on Github external
const { createConfig, entryPoint, setMode, setOutput } = require('../../index')

const path = require('path')
const { match } = require('@webpack-blocks/webpack')
const { css } = require('@webpack-blocks/assets')
const postcss = require('@webpack-blocks/postcss')
const precss = require('precss')
const sass = require('@webpack-blocks/sass')

module.exports = createConfig([
  setMode('development'),
  entryPoint(path.join(__dirname, 'styles.sass')),
  setOutput(path.join(__dirname, 'build/bundle.js')),
  match('*.sass', [
    css({ sourceMap: true }),
    postcss({
      plugins: [precss]
    }),
    sass({ indentSyntax: true, sourceMap: true })
  ])
])