So I am quite simply looking at how I can do a regular import e.g.
import { something } from 'myfantastic/package';
or even in a case:
import 'myfantastic/package/js/something.js';
I know I can do this within my <script>
tag as a normal import but what I am trying to do is load a free package or pro package based on an env
variable.
So I would like to be able do something like the following:
export default {
created() {
const something = ({something}) => import('myfantastic/package');
something.add( data )
}
}
If possible I would like to be able to do this for standard scripts e.g. 'myfantastic/package/js/something.js';
and CSS files e.g. 'myfantastic/package/css/style.css'
.
How can I achieve this?