ejs-transform-loader
v1.0.1
Published
Webpack loader for transforming ejs files at build time.
Downloads
5
Readme
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 %> ];