1.0.2 โ€ข Published 3 years ago

@aptray/file-content-loader v1.0.2

Weekly downloads
-
License
MIT
Repository
-
Last release
3 years ago

@aptray/file-content-loader

The file raw content loader. You can also use raw-loader

Since the module was only published in private service at the earliest, the module with the same name will appear on the official website later, resulting in problems in internal download, so a scope version will be released.

You can also use the file-rawtxt-loader module directly.

description

๐Ÿ’ฟ Installation

npm install --save-dev @aptray/file-content-loader

๐Ÿ“– Usage

webpack.config.js

  • ๐Ÿ”ง simple use
// webpack 1
loaders: [
  { test: /\.txt$/, loader: "@aptray/file-content-loader" }
]

// webpack 2
rules: [
  { test: /\.txt$/, use: '@aptray/file-content-loader'}
]
  • ๐Ÿ”ง inline use
var fileContent = require("@aptray/file-content-loader!./file.txt");
// => returns file.txt content as string
var jsContent = require("@aptray/file-content-loader!./file.js");
// => returns file.js content as string

๐Ÿ’Ž author

ilex.h

Similar projects

file-rawtxt-loader text-loader raw-loader

License

MIT

changelog

  • file-content-loader ไบŽ 20171010 18:56 ๅˆ›ๅปบไบŽ็งๆœใ€‚
  • 20200721 09:20 ๅ‘ๅธƒๆ›ดๆ–ฐๅŒ…
  • 20210606 ๆ›ดๅไธบ @aptray/file-content-loader, ๅŒๆ—ถๅ‘ๅธƒไธŽ npm ๅฎ˜ๆ–นๆœๅŠกใ€‚