Skip to content
This repository has been archived by the owner on Jul 29, 2021. It is now read-only.

Latest commit

 

History

History
46 lines (40 loc) · 703 Bytes

README.md

File metadata and controls

46 lines (40 loc) · 703 Bytes

sham-ui-templates loader for webpack

npm install sham-ui-templates-loader --save

Usage

module.exports = {
  ...
  module: {
    rules: [
      {
        test: /\.sht$/,
        loader: 'sham-ui-templates-loader'
      },
      {
        test: /\.sfc$/,
        use: [
           { loader: 'babel-loader' },
           { 
             loader: 'sham-ui-templates-loader', 
             options: {
               asModule: false,
               asSingleFileComponent: true
             } 
           }
        ]
      }
    ]
  },
  ...
};

Configuration

Add sham-ui section to your webpack.config.js:

'sham-ui': {
  globals: ['window'],
  transforms: [...]
}