@rabbitcc/pods-webpack-plugin

0.0.3 • Public • Published
Logo

pods-webpack-plugin

convert pods file struct, e.g.

import style from '@/style/foo'

will convert to

import style from './foo/style.css'

usage

const PodsWebpackPlugin = require('@rabbitcc/pods-webpack-plugin')

module.exports = {
  //...
  plugins: [
    new PodsWebpackPlugin({ /* options */ })
  ]
}

interface

type Options = {
  prefix: string = '@',                    // prefix flag, e.g. `import foo from '@/bar'`
  context: string = '',                    // default to use compiler.context
  warning: boolean = true,                 // print warning
  dir: Array<string | [string, string]>    // define alias, e.g. dir: ['foo', ['bar', 'css']]
}

The dir item shoule be a string or a tuple, if dir item was a tuple, the second element was extname.

Readme

Keywords

none

Package Sidebar

Install

npm i @rabbitcc/pods-webpack-plugin

Weekly Downloads

0

Version

0.0.3

License

GPL-3.0

Unpacked Size

40.4 kB

Total Files

6

Last publish

Collaborators

  • rabbitcc