@winman-f2e/nos-loader
v2.0.1
Published
加载模块的方式是将文件上传并返回URL
Downloads
5
Keywords
Readme
nos-loader
加载模块的方式是将文件上传并返回URL
使用
$ npm install @winman-f2e/nos-loader
// webpack.config.js
const nosUpload = {} // http://doc.hz.netease.com/pages/viewpage.action?pageId=105043442
module.exports = {
rules: [
{
test: /\.(png|jpe?g|gif|svg|woff2?|eot|ttf|otf)(\?.*)?$/,
loader: '@winman-f2e/nos-loader',
query: {
nosUpload
}
}
]
}
nosUpload
格式:
{
accessKey: '',
accessSecret: '',
host: '',
protocol: '',
endpoint: '',
defaultBucket: '',
objectOrigin: ''
}