@webpackon/core
    TypeScript icon, indicating that this package has built-in type declarations

    1.1.5 • Public • Published

    Webpackon

    @webpackon/core

    Utils collection for webpackon.

    Install

    npm i @webpackon/core --save
    yarn add @webpackon/core

    Utils

    compose

    Used for composition webpackon decorators. Decorators applied from right to left or upwards.

    Example

    const path = require('path');
    
    const { compose } = require('@webpackon/core');
    const { useCss } = require('@webpackon/use-css');
    const { useBabel } = require('@webpackon/use-babel');
    
    module.exports = (_, { mode }) =>
      compose(
        useCss({ mode }),
        useBabel()
      )({
        target: 'web',
        entry: path.resolve(__dirname, 'src', 'index.jsx'),
      });

    isProduction

    Example

    const path = require('path');
    
    const { compose, isProduction } = require('@webpackon/core');
    const { useCss } = require('@webpackon/use-css');
    const { useBabel } = require('@webpackon/use-babel');
    
    module.exports = (_, { mode }) =>
      compose(
        useCss({ mode }),
        useBabel()
      )({
        target: 'web',
        entry: path.resolve(__dirname, 'src', 'index.jsx'),
        output: {
    			clean: isProduction(mode)
        }
      });

    isDevelopment

    Example

    const path = require('path');
    
    const { compose, isDevelopment } = require('@webpackon/core');
    const { useCss } = require('@webpackon/use-css');
    const { useBabel } = require('@webpackon/use-babel');
    
    module.exports = (_, { mode }) =>
      compose(
        useCss({ mode }),
        useBabel()
      )({
        target: 'web',
        entry: path.resolve(__dirname, 'src', 'index.jsx'),
        output: {
    			clean: !isProduction(mode)
        }
      });

    Install

    npm i @webpackon/core

    DownloadsWeekly Downloads

    7

    Version

    1.1.5

    License

    MIT

    Unpacked Size

    29.1 kB

    Total Files

    67

    Last publish

    Collaborators

    • and_tem