I seem to not be able to load JS modules like I used to with Laravel , Vite, Vue using Jetstream I get
[vite]: Rollup failed to resolve import "tinymce/plugins/paste" from "/Users/me/code/site.com/resources/js/app.js".
added imports to resources/js/app.js using
import './bootstrap';
import '../css/app.css';
import { createApp, h } from 'vue';
import { createInertiaApp } from '@inertiajs/vue3';
import { resolvePageComponent } from 'laravel-vite-plugin/inertia-helpers';
import { ZiggyVue } from '../../vendor/tightenco/ziggy/dist/vue.m';
// Import TinyMCE
import tinymce from 'tinymce/tinymce';
// Default icons are required for TinyMCE 5.3 or above
import 'tinymce/icons/default';
// A theme is also required
import 'tinymce/themes/silver';
// Any plugins you want to use has to be imported
import 'tinymce/plugins/paste';
import 'tinymce/plugins/link';
...
// Initialize the app
tinymce.init({
selector: '#tiny',
plugins: ['paste', 'link','searchreplace', 'visualblocks', 'insertdatetime', 'advlist', 'autolink', 'lists','image', 'charmap', 'print', 'preview', 'anchor', 'table', 'help', 'wordcount', 'media', 'code', 'fullsceen']
});
...
current Vite config
import { defineConfig } from 'vite';
import laravel from 'laravel-vite-plugin';
import vue from '@vitejs/plugin-vue';
export default defineConfig({
plugins: [
laravel({
input: 'resources/js/app.js',
refresh: true,
}),
vue({
template: {
transformAssetUrls: {
base: null,
includeAbsolute: false,
},
},
}),
],
});
But it uses the default alias and it should be loaded from node modules like a normal module that is located there. How do I do that?