attribute-file-content-loader

Webpack Loader

Usage no npm install needed!

<script type="module">
  import attributeFileContentLoader from 'https://cdn.skypack.dev/attribute-file-content-loader';
</script>

README

attribute-file-content-loader

Webpack Loader. Adds file content instead of attribute with file path

Install

$ npm install --save-dev attribute-file-content-loader

Usage

module: {
    rules: [{
        test: /\.pug$/,
        use:[{
          loader: 'attribute-file-content-loader',
          options: {
            tag: "include", // Tag in compiling file. "include" by default
            baseDir: PATHS.src // Alias for "@"
          },
        }]
    }]
}
    include("@/assets/icons/image.svg")

License

MIT