1.2.0 • Published 3 years ago

@jkyu/emp-preact v1.2.0

Weekly downloads
-
License
-
Repository
-
Last release
3 years ago

EMP Preact Config Plugin

Install

  • yarn add @jkyu/emp-preact -D
  • emp-config.js conf:
const withFrameWorkPlugin = require('@jkyu/emp-preact')
module.exports = withFrameWorkPlugin(({config, env, empEnv}) => {
  const projectName = 'preactComponents'
  config.plugin('mf').tap(args => {
    args[0] = {
      ...args[0],
      ...{
        name: projectName,
        library: {type: 'var', name: projectName},
        filename: 'emp.js',
        exposes: {
          './header': 'src/components/header/index.jsx',
        },
      },
    }
    return args 
  })
})
1.2.0

3 years ago

1.1.3

3 years ago