Giter Site home page Giter Site logo

支持pug about san-loader HOT 6 CLOSED

ecomfe avatar ecomfe commented on May 21, 2024
支持pug

from san-loader.

Comments (6)

ksky521 avatar ksky521 commented on May 21, 2024 1
  1. cli还有个configWebpack可以直接写webpack.config,然后用webpack-merge起来;
  2. 你可以建个最小项目,发链接过来,我们看看是什么问题

from san-loader.

ksky521 avatar ksky521 commented on May 21, 2024

我看了一眼:template.js

这个应该是支持的,需要你自己写对应loader的resourcequery的,上面的代码,如果template标签配了lang=pug,那么query里面应该有san=&type=template&lang=pug,你可以按照这个思路试下

from san-loader.

lx11573 avatar lx11573 commented on May 21, 2024

我看了一眼:template.js

这个应该是支持的,需要你自己写对应loader的resourcequery的,上面的代码,如果template标签配了lang=pug,那么query里面应该有san=&type=template&lang=pug,你可以按照这个思路试下

query是san=&type=template&lang=pug,而且 template lang='pug' 里面的内容也被编译成了html格式,然后就编译失败了。

 * ./node_modules/pug-html-loader/lib/index.js
 * ./node_modules/san-loader/index.js
You may need an additional loader to handle the result of these loaders.
> <div>1213</div>

报错是要我添加其他的loader,可是我有些不大明白了,请指教

from san-loader.

ksky521 avatar ksky521 commented on May 21, 2024

看我最新的提交:6cec4e1

from san-loader.

lx11573 avatar lx11573 commented on May 21, 2024

看我最新的提交:6cec4e1

先谢谢您的demo,单独的搭建我这边也是可以的。
我这边使用的是san-cli创建的工程,然后通过chainWebpack添加的loader,然后才报的上述的错误

from san-loader.

lx11573 avatar lx11573 commented on May 21, 2024

好了,可以了,感谢您的细心帮助
通过chainWebpack转换后没有html-loader而导致的
使用configWebpack解决了,再次感谢

from san-loader.

Related Issues (18)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.