@rabbitcc/pods-webpack-plugin
v0.0.3
Published
convert pods file struct, e.g.
Downloads
4
Readme
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.