Coder Social home page Coder Social logo

Comments (4)

helloskynet avatar helloskynet commented on May 23, 2024 6

为了不移动或者修改其它的东西,可以先弄个简单的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.

thinkles avatar thinkles commented on May 23, 2024 1

使用中,解析路径确实出现问题,
本地解决 : 把放模板的文件夹放在项目的根目录下
希望解决

from art-template.

zhanxiaoge avatar zhanxiaoge commented on May 23, 2024

我这边升级到webpack 5也无法使用了,我也是Windows,只能先本地解决一下,希望作者尽快更新吧~

from art-template.

kamilic avatar kamilic commented on May 23, 2024

@aui 大佬在吗。。

from art-template.

Related Issues (20)

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.