file-rawtxt-loader

1.0.2 • Public • Published

file-rawtxt-loader

File content loader, or use raw loader.

description

💿 Installation

npm install --save-dev file-rawtxt-loader

📖 Usage

webpack.config.js

  • 🔧 simple use
// webpack 1
loaders: [
  { test: /\.txt$/, loader: "file-rawtxt-loader" }
]

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

💎 author

ilex.h

License

MIT

changelog

  • file-rawtxt-loader20171010 18:56 创建于私服。
  • 20200721 09:20 发布更新包
  • 20201119 更名为 file-rawtxt-loader, 同时发布与 npm 官方服务。

Package Sidebar

Install

npm i file-rawtxt-loader

Weekly Downloads

9

Version

1.0.2

License

MIT

Unpacked Size

2.83 kB

Total Files

4

Last publish

Collaborators

  • ilex.h