@winman-f2e/nos-loader

2.0.1 • Public • Published

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: ''
}

Readme

Keywords

none

Package Sidebar

Install

npm i @winman-f2e/nos-loader

Weekly Downloads

0

Version

2.0.1

License

MIT

Unpacked Size

1.45 kB

Total Files

3

Last publish

Collaborators

  • luofeiyue
  • whiskeyi
  • yousy
  • guoyeeg
  • azgaga
  • liushichuan
  • yaochen
  • shenyuan
  • aflyermin
  • ignous
  • jeekdong