ejs-transform-loader

1.0.1 • Public • Published

ejs-transform-loader

A webpack loader for compiling ejs style files at build time.

npm install ejs-transform-loader
// webpack.config.js
module.exports = {
  module: {
    rules: [
      {
        test: /\.ejs$/,
        loader: `ejs-transform-loader`,
        options: {
          data: { testFiles: process.env.TEST_FILES }
        }
      },
    ],
  },
}
// some-file.ejs
const testFiles = [ <%= testFiles %> ];

Readme

Keywords

none

Package Sidebar

Install

npm i ejs-transform-loader

Weekly Downloads

2

Version

1.0.1

License

ISC

Unpacked Size

2.54 kB

Total Files

4

Last publish

Collaborators

  • steelsojka