本文介绍: webpack 找不到art-template的解决办法

art-templatelibruntime.js doesn’t exist

Parsed request is a module
using description file: d:playerpackage.json (relative path: ./src/template)
  Field 'browser' doesn't contain a valid alias configuration
  resolve as module
    d:playersrctemplatenode_modules doesn't exist or is not a directory
    d:playersrcnode_modules doesn't exist or is not a directory
    looking for modules in d:playernode_modules
      single file module
        No description file found in d:\node_modulesart-templatelib or above
        no extension
          Field 'browser' doesn't contain a valid alias configuration
          d:\node_modulesart-templatelibruntime.js doesn't exist
        .js
          Field 'browser' doesn't contain a valid alias configuration
          d:\node_modulesart-templatelibruntime.js.js doesn't exist
        .less
          Field 'browser' doesn't contain a valid alias configuration
          d:\node_modulesart-templatelibruntime.js.less doesn't exist
      d:\node_modulesart-templatelibruntime.js doesn't exist
    d:node_modules doesn't exist or is not a directory
    d:node_modules doesn't exist or is not a directory
    d:node_modules doesn't exist or is not a directory
    d:node_modules doesn't exist or is not a directory

解决办法:

修改webpack配置文 webpackprod.config.js 

resolve: {
        modules: ['node_modules'],
        extensions: ['.js', '.less'],
        fallback: {
            dgram: false,
            fs: false,
            net: false,
            tls: false,
        },
		preferRelative: true,
    },

添加了一行 :preferRelative: true,

原文地址:https://blog.csdn.net/ababab12345/article/details/135818942

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。

如若转载,请注明出处:http://www.7code.cn/show_63365.html

如若内容造成侵权/违法违规/事实不符,请联系代码007邮箱:suwngjj01@126.com进行投诉反馈,一经查实,立即删除!

发表回复

您的邮箱地址不会被公开。 必填项已用 * 标注