Comments (4)
为了不移动或者修改其它的东西,可以先弄个简单的loader,解决window下路径分割符的问题,只不过只处理了这个一个文件,
w(゚Д゚)w
// fix-template-loader.js
module.exports = function (source) {
return source.replace(/(require.*node_modules[/\\]+art-template[/\\]+lib[/\\]+runtime.js)/g,(word)=>{
return word.replace(/[/\\]+/g,'/');
});
};
// webpack.config.js
......
{
test: /\.tpl$/,
use: [
{
loader: path.resolve('./loader/fix-template-loader.js'),
},
{
loader: 'art-template-loader',
},
],
},
.......
from art-template.
使用中,解析路径确实出现问题,
本地解决 : 把放模板的文件夹放在项目的根目录下
希望解决
from art-template.
我这边升级到webpack 5也无法使用了,我也是Windows,只能先本地解决一下,希望作者尽快更新吧~
from art-template.
@aui 大佬在吗。。
from art-template.
Related Issues (20)
- 请问遍历对象的原始语法是怎么写?
- 标准语法 if 多条件编译报错 HOT 1
- Help. 请教 vue2 项目中 如何 使用 cdn 引入 art-template 并使用?
- 对deno的支持
- react项目通过 import artTemplate from "art-template" 引入异常 HOT 4
- 渲染的数据是多行,会导致错误 HOT 1
- 在 js 中配置模板,能使用 include 吗?
- 如何使用Arttemplate在页面上遍历一个数字?
- {{@@item.value}} 在{{each }}中无效
- art-template native v3.0.0 360 IE6内核版本显示模板源码
- 异步自定义filter?
- 模板解析后占位符不准确 HOT 2
- Webpack loader, syntax include with parameter looks doesn't work. HOT 2
- 请问可以在nestJS中配置art-template吗? HOT 1
- 该如何将类中的 this 传入 $data 里呢 HOT 2
- Doesn't work with bun.js because require.extensions[template.defaults.extname] = extension; looks like it's not supported HOT 2
- 用express art-template渲染出来的页面源码有空格 HOT 3
- 能出个serviceWorker版本吗? HOT 1
- 如何插值为html标签的属性,而不仅是插值为内容? HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from art-template.