raw-loader:Webpack的加载程序,允许将文件导入为字符串

时间:2021-05-06 20:28:47
【文件属性】:
文件名称:raw-loader:Webpack的加载程序,允许将文件导入为字符串
文件大小:144KB
文件格式:ZIP
更新时间:2021-05-06 20:28:47
files webpack-loader raw JavaScript 原料装载机 v5已弃用:请考虑迁移到 。 Webpack的加载程序,允许将文件作为字符串导入。 入门 首先,您需要安装raw-loader : $ npm install raw-loader --save-dev 然后将加载程序添加到您的webpack配置中。 例如: file.js import txt from './file.txt' ; webpack.config.js // webpack.config.js module . exports = { module : { rules : [ { test : / \. txt $ / i , use : 'raw-loader' , } , ] , } , } ; 并通过您的首选方法运行webpack 。 选项 名称 类型 默认
【文件预览】:
raw-loader-master
----husky.config.js(123B)
----.gitignore(163B)
----package.json(2KB)
----commitlint.config.js(70B)
----package-lock.json(526KB)
----src()
--------options.json(127B)
--------index.js(570B)
--------cjs.js(69B)
----LICENSE(1KB)
----CHANGELOG.md(2KB)
----.github()
--------PULL_REQUEST_TEMPLATE.md(883B)
--------ISSUE_TEMPLATE.md(717B)
--------CODEOWNERS(200B)
--------ISSUE_TEMPLATE()
--------CONTRIBUTING.md(7KB)
--------FUNDING.yml(25B)
--------workflows()
----.prettierignore(57B)
----.eslintrc.js(103B)
----lint-staged.config.js(120B)
----.prettierrc.js(40B)
----README.md(3KB)
----.eslintignore(44B)
----babel.config.js(289B)
----.gitattributes(65B)
----test()
--------esModule-option.test.js(1KB)
--------validate-options.test.js(1KB)
--------helpers()
--------loader.test.js(2KB)
--------cjs.test.js(242B)
--------__snapshots__()
--------fixtures()
----.editorconfig(195B)

网友评论