beginner, excuse me.
1. Question
tried to wrap my js file with UMD writing, but failed in the vue + webpack project after using normal writing. After
npm run dev, the console reported an error
2.
(1) File directory:
2:
example1.js
example2.js
main.js
3.
4.
1AMDOK
2 typeof module === "object" OK,typeof module === "object"typeof define === "function"
:
:typeof define === "function" true
typeof module === "object"
typeof define === "function" false:
the same problem will occur without console.log, judging in else if (). For the results viewed in the npm run dev environment, thank you
.