Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

vue.config.js add transpileDependencies "normalize-url", "url-regex" after is not work #58

Closed
d1y opened this issue Jul 1, 2020 · 2 comments

Comments

@d1y
Copy link

d1y commented Jul 1, 2020

Since these two libraries use the newer syntax, I must add these two dependencies to transpileDependencies before the project can run.

transpileDependencies: [
    // "get-urls",
    // "url-parse",
    "normalize-url",
    "url-regex",
  ]

the exmaple code

const getURL = require("get-urls")
let strArr = "☆禁漫天堂公告版☆\n\n【主網域】https://18comic.vip\n>>分流 https://18comic.org\n【大陸用戶】主站 https://18comic.fun \n>>分流 https://18comic1.biz\n\n\n*卡頓請多使用分流\n\n【APP下載-v3(僅安卓)】\nhttps://69.run/9WLFIp\n\n【廣告洽詢】www18comic@gmail.com\n【贊助我們】https://69.run/FznYFa"

let arr = strArr.split("\n")

arr.forEach(item=> {
  if (item){
    const urls = getURL(item)
    const _urls = Array.from(urls)
    // TODO _urls.length = 0, is not work
  }
})

Can you help me see why it is going wrong?

Thank you

@d1y
Copy link
Author

d1y commented Jul 1, 2020

If I remove transpileDependencies, it will work

@sindresorhus
Copy link
Owner

This is not the place to ask for Vue support.

https://forum.vuejs.org

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants