I am using Vuetify 1.5.18
and have the following code...
import Vuetify from 'vuetify'
...
// rollup config
import VuePlugin from 'rollup-plugin-vue';
import css from 'rollup-plugin-css-only';
import resolve from 'rollup-plugin-node-resolve';
import commonjs from 'rollup-plugin-commonjs';
import pkg from './package.json';
// const external = Object.keys(pkg.dependencies);
const plugins = [
resolve({
module: true,
main: true
}),
commonjs(),
VuePlugin(),
css()
];
module.exports = {
plugins,
input: 'src/index.js',
output: {
file: 'dist/index.js',
format: 'esm'
}
};
But when I run rollup I get the following in my output...
import vue from 'vue';
And when I try to run I get the following error...
Failed to resolve module specifier "vue". Relative references must start with either "/", "./", or "../".`
I load Vue not in the UI project but in my server like this...
// Footer.pug
script(type="module")
| import Vue from '/vue/vue.esm.browser.js'
| const global = window || global;
| global.Vue = Vue;
So that line shouldn't be there. If I remove Vuetify it goes away. Also if I point to the version I have hosted through the Koa app like this...
import * as Vuetify from '/vuetify/vuetify.js';
Everything seems to work as well. I can also go in and manually remove the import Vuetify from 'vuetify'
and add this line to the template on the server...
| const global = window || global;
| global.vue = global.Vue;
Is there a way I can tell rollup to ignore any "vue" imports?