Hey there! I recently created a basic Vue 3 library with the following code:
export class RefTest() {
private ref = ref(null)
constructor(value: any) { this.ref.value = value }
update(value) {
this.ref.value = value;
}
}
I used npm link to create an instance of a class from the library, but unfortunately, nothing seems to be working. Reactivity has stopped functioning for some reason. Additionally, the file containing all the library code is quite large at 160 kilobytes. It appears that Vue 3 was compiled and included in this file, which is causing issues and bloating the size. Here is the dependency file:
{
"name": "ref-tets",
"version": "1.0.0",
"description": "",
"main": "./dist/index.js",
"scripts": {
"build": "webpack"
},
"keywords": [],
"license": "ISC",
"devDependencies": {
"ts-loader": "^9.3.1",
"typescript": "^4.7.4",
"webpack": "^5.73.0",
"webpack-cli": "^4.10.0"
},
"peerDependencies": {
"vue": "^3.0.0"
},
"files": [
"dist"
]
}
I specified Vue 3 as a peer dependency, but it doesn't seem to have resolved the issue.