Commit ffcf2fbd by zhuxichen

chore: pug

parent d0599ec7
...@@ -51,6 +51,16 @@ const config = { ...@@ -51,6 +51,16 @@ const config = {
}, },
}, },
}); });
chain.merge({
module: {
rule: {
myloader: {
test: /\.pug$/,
loader: 'pug-plain-loader',
},
},
},
});
}, },
postcss: { postcss: {
pxtransform: { pxtransform: {
...@@ -89,6 +99,21 @@ const config = { ...@@ -89,6 +99,21 @@ const config = {
resolvers: [NutUIResolver({ taro: true })], resolvers: [NutUIResolver({ taro: true })],
}) })
); );
chain.merge({
module: {
rule: {
pug: {
test: /\.pug$/,
use: [
{
loader: 'pug-plain-loader',
options: {},
},
],
},
},
},
});
}, },
publicPath: '/', publicPath: '/',
staticDirectory: 'static', staticDirectory: 'static',
......
...@@ -59,6 +59,7 @@ ...@@ -59,6 +59,7 @@
}, },
"devDependencies": { "devDependencies": {
"@babel/core": "^7.8.0", "@babel/core": "^7.8.0",
"@prettier/plugin-pug": "^1.15.2",
"@tarojs/cli": "3.6.23", "@tarojs/cli": "3.6.23",
"@tarojs/taro-loader": "3.6.23", "@tarojs/taro-loader": "3.6.23",
"@tarojs/webpack5-runner": "3.6.23", "@tarojs/webpack5-runner": "3.6.23",
...@@ -76,6 +77,8 @@ ...@@ -76,6 +77,8 @@
"eslint-plugin-vue": "^8.0.0", "eslint-plugin-vue": "^8.0.0",
"postcss": "^8.4.33", "postcss": "^8.4.33",
"postcss-rem-to-responsive-pixel": "^6.0.1", "postcss-rem-to-responsive-pixel": "^6.0.1",
"pug": "^3.0.2",
"pug-plain-loader": "^1.1.0",
"style-loader": "1.3.0", "style-loader": "1.3.0",
"stylelint": "9.3.0", "stylelint": "9.3.0",
"tailwindcss": "^3.4.1", "tailwindcss": "^3.4.1",
......
<template> <template lang="pug">
<view class="index text-gray-400"> view.index.text-gray-400
<view> view
<img src="" alt="" /> img(src='')
</view> view.index.text-gray-400 {{ msg }}
<view class="index text-gray-400"> {{ msg }} <Dongdong /> </view> Dongdong
<view class="btn"> view.btn
<nut-button type="primary" @click="handleClick('text', msg2, true)" nut-button(type='primary', @click='handleClick("text", msg2, true)') 点我
>点我</nut-button nut-toast(:msg='msg2', v-model:visible='show', :type='type', :cover='cover')
>
</view>
<nut-toast :msg="msg2" v-model:visible="show" :type="type" :cover="cover" />
</view>
</template> </template>
<script> <script>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment