Existing VueJS 3 project
See original GitHub issueLooks like there is some issue with using Trois in projects that already exist. I tried both the import and declare in main process as well as the direct import in the component and I get the same error both ways. I did download the starter app and that worked but I’m more interested in including Trois in my own bundle. I looked up the error in the source and it apparently has something to do with the intersect function. I did try adding Vite and ViteJS plugin-vue to no effect. The error says something about not having a proper loader but I’m not sure that is what the issue is since I tried Vite and it seems the start app is a pretty barebones implementation.
error in ./node_modules/troisjs/build/trois.module.js
Module parse failed: Unexpected token (128:34)
You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. See https://webpack.js.org/concepts#loaders
| onIntersectOver(overEvent);
| onIntersectEnter(enterEvent);
> component.onPointerOver?.(overEvent);
| component.onPointerEnter?.(enterEvent);
| }
@ ./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader-v16/dist??ref--0-1!./src/router/views/Home.vue?vue&type=script&lang=js 3:0-84 9:9-12 10:12-18 11:21-36 12:16-26 13:14-22 14:11-16
@ ./src/router/views/Home.vue?vue&type=script&lang=js
@ ./src/router/views/Home.vue
@ ./src/router/index.js
@ ./src/main.js
@ multi (webpack)-dev-server/client?http://192.168.1.113:8080&sockPath=/sockjs-node (webpack)/hot/dev-server.js ./src/main.js
Issue Analytics
- State:
- Created 2 years ago
- Comments:6 (3 by maintainers)
Top Results From Across the Web
How-to Guide: Adding VueJS to Your Existing Project
Step 1: Evaluate and start the implementation · Step 2: Vue Components to the rescue! · Step 3: Template System · Step 4:...
Read more >Adding Vue.js to an Existing Project | by Blunt Jackson | Medium
When creating our application, we instantiate a new Vue object, and, in this case we provide it with two keys: el tells vue...
Read more >Quick Start | Vue.js
This command will install and execute create-vue, the official Vue project scaffolding tool. You will be presented with prompts for several optional ...
Read more >Install And Run The Vue JS 3 Project Using Vue CLI [2022]
Install Node.js & NPM package · Install Vue CLI 4.5 or higher · Create A Vue 3 Project · Run Vue 3 Web...
Read more >Creating Your First Vue 3 Project - A Vue Tutorial
There are a few different options for adding Vue 3 to your existing projects or creating your very own Vue 3 project.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

Can you try with 0.3.0-beta.0 ? It should be ok now : https://bundlephobia.com/result?p=troisjs@0.3.0-beta.0
This will be fixed soon, I will use rollup-plugin-esbuild (and a lower target) for the next release
https://github.com/troisjs/trois/commit/3131469fc2522d1bd03e019018ef727230c511d4