{"library":"string-loader","title":"string-loader","type":"library","description":"A webpack loader that transforms resource file contents into a JavaScript string. Version 0.0.1 is a very early release with minimal documentation and no explicit stability guarantees. It exports a single function that returns the file content with escaped characters wrapped in quotes. Not actively maintained; latest commit from 2015. Alternative: raw-loader provides similar functionality with broader adoption and updates.","language":"javascript","status":"abandoned","last_verified":"Sat Apr 25","install":{"commands":["npm install string-loader"],"cli":null},"imports":["module.exports = { module: { rules: [ { test: /\\.html$/, use: 'string-loader' } ] } }"],"auth":{"required":false,"env_vars":[]},"links":{"homepage":null,"github":"https://github.com/enmoon/string-loader","docs":null,"changelog":null,"pypi":null,"npm":"https://www.npmjs.com/package/string-loader","openapi_spec":null,"status_page":null,"smithery":null},"quickstart":{"code":"// webpack.config.js\nmodule.exports = {\n  entry: './src/index.js',\n  output: { filename: 'bundle.js' },\n  module: {\n    rules: [\n      {\n        test: /\\.html$/,\n        use: 'string-loader'\n      }\n    ]\n  }\n};\n\n// src/index.js\nconst template = require('./template.html');\nconsole.log(template); // prints the HTML file content as a JavaScript string","lang":"javascript","description":"Shows how to configure webpack to load .html files as strings using string-loader.","tag":null,"tag_description":null,"last_tested":null,"results":[]},"compatibility":null}