0
     {
        test: /\.pug$/,
        oneOf: [
          // this applies to <template lang="pug"> in Vue components
          {
            resourceQuery: /^\?vue/,
            use: ['pug-plain-loader']
          },
          // this applies to pug imports inside JavaScript
          {
            use: ['raw-loader', 'pug-plain-loader']
          }
        ]
     },

这来自https://www.npmjs.com/package/pug-plain-loader文档

我不清楚为什么pug-plain-loader<template lang="pug">

我认为,当前加载程序仅适用于 .pug 文件。

4

0 回答 0