Skip to content
This repository was archived by the owner on Nov 22, 2022. It is now read-only.

ifedu/modify-file-loader

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Webpack loader for modify file

const _ = require('lodash')

return {
    loader: 'modify-file-loader',

    options: {
        convert(content: any) {
            return _.template(content, {
                evaluate:    /\{\{(.+?)\}\}/g,
                interpolate: /\{\{=(.+?)\}\}/g,
                escape:      /\{\{-(.+?)\}\}/g
            })({})
        }
    }
}

About

Webpack loader for modify file

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published