Statamic is not defined in cp.js (When trying to use Vue component in antlers) #7607
-
When importing cp.js in layout.antlers.html and I am getting this error in cp.js file
ExampleFieldtype.vue:
imports in layout.antlers.html:
cp.js:
webpack.mix.js:
Can you guys help me find out what the problem is there? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
You're trying to use the control panel javascript on the frontend of your site? |
Beta Was this translation helpful? Give feedback.
-
FixedWell I don't know why the code above is not working (I still appreciate the answer though) but I think it is for other purposes rather than mine. So my solution is that I just used traditional way of using vue.js and it works just fine site.js
|
Beta Was this translation helpful? Give feedback.
Fixed
Well I don't know why the code above is not working (I still appreciate the answer though) but I think it is for other purposes rather than mine.
So my solution is that I just used traditional way of using vue.js and it works just fine
site.js