{"library":"pug-plain-loader","title":"pug-plain-loader","description":"pug-plain-loader is a Webpack loader that compiles Pug templates into plain HTML. Version 1.1.0 supports Pug 2.x and 3.x, with active maintenance. It is designed for use with vue-loader v15+ to preprocess <template lang=\"pug\"> blocks in Vue single-file components. Unlike pug-html-loader (unmaintained), this loader stays current with Pug releases. It sets doctype to 'html' by default for Vue fragments and can be chained with raw-loader for importing .pug files as HTML strings in JavaScript. Released infrequently.","language":"javascript","status":"active","last_verified":"Sat Apr 25","install":{"commands":["npm install pug-plain-loader"],"cli":null},"imports":["module.exports = { module: { rules: [ { test: /\\.pug$/, loader: 'pug-plain-loader' } ] } }","module.exports = { module: { rules: [ { test: /\\.pug$/, oneOf: [ { exclude: /\\.vue$/, use: ['raw-loader', 'pug-plain-loader'] }, { use: ['pug-plain-loader'] } ] } ] } }","module.exports = { module: { rules: [ { test: /\\.pug$/, loader: 'pug-plain-loader', options: { data: { myVar: 'value' } } } ] } }"],"auth":{"required":false,"env_vars":[]},"quickstart":{"code":"// Install: npm install -D pug-plain-loader pug\n// webpack.config.js\nmodule.exports = {\n  module: {\n    rules: [\n      {\n        test: /\\.pug$/,\n        loader: 'pug-plain-loader'\n      }\n    ]\n  }\n};\n\n// App.vue (Vue single-file component)\n<template lang=\"pug\">\n  div\n    h1 Hello World\n    p This is a Pug template inside a Vue component.\n</template>\n\n<script>\nexport default {\n  name: 'App'\n}\n</script>","lang":"javascript","description":"Shows installation, webpack configuration for Vue single-file components, and a basic Pug template in a .vue file.","tag":null,"tag_description":null,"last_tested":null,"results":[]},"compatibility":null}