1

I'm using the vue.esm.browser.js module for Vue, which works without problems:

import Vue from 'vue.esm.browser.js';

I can't however find a way to import the reactive and isReactive functions. I've tried

import { reactive, isReactive } from 'vue.esm.browser.js';

but it doesn't work. I'd appreciate any help to get this working!

1 Answer 1

1

You haven't mentioned Vue version or where this file is coming from, but note the syntax:

Vue 2 (esm.browser), has a dot:

vue.esm.browser.js

Vue 3 (esm-browser), has a dash:

vue.esm-browser.js

I am guessing you are using Vue 2, which also does not support those exports, reactive and isReactive. Use Vue 3 instead.

Here is a Vue 3 esm-browser CDN url:

https://cdn.jsdelivr.net/npm/vue@next/dist/vue.esm-browser.js
Sign up to request clarification or add additional context in comments.

1 Comment

Big facepalm here, yeah I'm using Vue 2. Thank you so much you probably saved me hours of time :D

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.