ejs-wp-loader
TypeScript icon, indicating that this package has built-in type declarations

1.1.1 • Public • Published

ejs-wp-loader

EJS loader for webpack.

Install

npm install ejs html-loader ejs-wp-loader --save-dev
# or
yarn add ejs html-loader ejs-wp-loader -D

Usage

// webpack.config.js
const path = require('path')

module.exports = {
  // ...
  module: {
    rules: [
      // ...
      {
        test: /\.ejs$/,
        exclude: /node_modules/,
        use: [
          {
            loader: 'html-loader'
          },
          {
            loader: 'ejs-wp-loader',
            options: {
              alias: { // Configure how modules are resolved. 
                '@': path.resolve(__dirname, 'src')
              }
            }
          }
        ]
      }
    ]
  }
}

License

MIT

Package Sidebar

Install

npm i ejs-wp-loader

Weekly Downloads

0

Version

1.1.1

License

MIT

Unpacked Size

8.01 kB

Total Files

14

Last publish

Collaborators

  • xiaolinzhu