@hummer/tenon-loader
TypeScript icon, indicating that this package has built-in type declarations

1.3.1 • Public • Published

Tenon Loader

npm

PS. Fork From Vue Loader

update

基于 vue loader tag: v17.3.1 修改

Tenon Vue 专用 Loader, 增加了样式处理相关逻辑,切换 Compiler 的包为 Tenon Compiler

备注:由于 Tenon 中样式逻辑需要特殊处理,底层 css 的样式解析下沉到 Tenon Loader 中,针对 less 或者 scss 样式处理等,不需要引入 css-loader 和 style-loader,建议直接使用 hummer cli 进行开发。

使用方式

webpack 配置文件如下

const { VueLoaderPlugin } = require('@hummer/tenon-loader')
module.exports = {
  mode: 'development',
  devtool: 'source-map',
  entry: {
    entry: './index.js',
  },
  output: {
    path: path.resolve(__dirname, '../dist'),
    filename: "[name].js"
  },
  resolve: {
    alias: {
    },
    extensions: [".js",'.json',".jsx",".vue", ".css" ]
  },
  module: {
    rules: [{
      test: /\.vue$/,
      loader: '@didi/tenon-loader'
    }, {
      test: /\.less$/,
      use: ['less-loader']
    }, {
      test: /\.js$/,
      exclude: /(node_modules)|(tenon-next)/,
      use: {
        loader: 'babel-loader',
        options: {
          presets: [
            [
              '@babel/preset-env', 
              {
                targets: {
                  "ios": "9",
                  "node": "10"
                }
              }
            ]
          ],
          "plugins": [
            ["@babel/plugin-transform-runtime",
              {
                "regenerator": true
              }
            ]
          ]
        }
      }
    }]
  },
  plugins: [new VueLoaderPlugin()]
}

Versions

Current Tags

VersionDownloads (Last 7 Days)Tag
1.3.12latest

Version History

VersionDownloads (Last 7 Days)Published
1.3.12
1.3.00
1.2.01
1.1.20
1.1.10
1.1.00
1.0.60
1.0.50
1.0.5-00
1.0.40
1.0.4-50
1.0.4-40
1.0.4-30
1.0.4-10
1.0.4-00
1.0.20
1.0.2-beta.00
1.0.10
1.0.00
0.0.10

Package Sidebar

Install

npm i @hummer/tenon-loader

Weekly Downloads

3

Version

1.3.1

License

ISC

Unpacked Size

87.4 kB

Total Files

41

Last publish

Collaborators

  • duanlikang
  • caoenze