Vue-cli3 import external JS file error

vue-cli creates a project and reports an error via import external js

import test from ". / test.js";

clipboard.png
test.js


clipboard.png


clipboard.png

before upgrading, webpack3, is used and everything is fine and js can be imported normally. After upgrading to vue-cli3, the relevant error is prompted, indicating that the import is not successful.
searching a lot doesn"t solve the problem. Is
a problem with babel configuration or package dependency? Please answer

.
Nov.11,2021
Menu