How to use the @webpack-blocks/webpack.setMode 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 cyclejs-community / one-fits-all / configs / webpack.config.js View on Github external
const HtmlWebpackHarddiskPlugin = require('html-webpack-harddisk-plugin');
const CopyWebpackPlugin = require('copy-webpack-plugin');
const CleanWebpackPlugin = require('clean-webpack-plugin');
const nodeExternals = require('webpack-node-externals');

const path = require('path');

const appPath = (...names) => path.join(process.cwd(), ...names);
const userConfig = require(appPath('webpack.config.js'));
const packageJson = require(appPath('package.json'));

const PORT = process.env.PORT || 8080;

module.exports = webpackMerge(
    createConfig([
        setMode(
            process.env.NODE_ENV === 'production' ? 'production' : 'development'
        ),
        typescript({
            useCache: true,
            cacheDirectory: 'node_modules/.cache/at-loader'
        }),
        tslint(),
        resolve({ extensions: ['.js', '.jsx'] }),
        match(
            ['*.scss', '*.sass'],
            [
                css(),
                sass({
                    includePaths: [appPath('node_modules')],
                    sourceMap: true
                }),