Is it possible to incorporate Vue and Vuetify into an existing project that requires IE compatibility?

Currently in the process of enhancing a legacy project with new functionality. The front end is currently relying solely on jQuery for all the webpages. I have been tasked with adding another webpage and would like to incorporate Vuetify + Vue due to the intricate features required. Unfortunately, there is no webpack or modern conveniences available, but I will make use of a CDN.

The challenge I am facing involves the necessity to support IE (as per user request). These script tags are enabling everything to function smoothly in Chrome:

<script src="https://cdnjs.cloudflare.com/ajax/libs/babel-standalone/6.24.0/babel.js"></script>
<script src="https://cdn.jsdelivr.net/npm/vue/dist/vue.js"></script>
<script src="https://cdn.jsdelivr.net/npm/<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="4e383b2b633c2b3d213b3c2d2b0e7f607b607f">[email protected]</a>"></script>
<link href='https://fonts.googleapis.com/css?family=Roboto:100,300,400,500,700,900|Material+Icons' rel="stylesheet">
<script  src="https://cdn.jsdelivr.net/npm/vuetify/dist/vuetify.js"></script>
<link href="https://cdn.jsdelivr.net/npm/vuetify/dist/vuetify.min.css" rel="stylesheet">
<jsp:include page="components/location_component.jsp"></jsp:include>

How can I ensure this works in IE using just a CDN? I'm encountering issues related to ES6 syntax, which prompted me to introduce babel. However, I'm still faced with the same errors as before.

    <div id="app">
        <v-app> 
            <v-container> 
                <location @workstationchange="handleWorkstationChange($event)"></location> 

            </v-container> 
        </v-app>
    </div>
</div>

<script>
    var app = new Vue({
        el : '#app',
        data : {
            workstationSelected : null,
        },
        methods : {
            handleWorkstationChange : function(id) {
                this.workstationSelected = id
            }
        },
        mounted: function(){

        }
    })
</script>

The 'location' component I've developed is quite extensive, primarily consisting of dropdown menus populated from a database. It incorporates ES6 arrow functions, sorting, Set(), spread operator [...] and more. Keeping this post concise, does anyone have insights on making ES6 compatible with IE in a Legacy environment using only a CDN? What am I missing?

Answer №1

If you need to use Vuetify with support for IE11, there is a workaround available.

For integration into a legacy project that cannot utilize build tools like Webpack, you can build your Vue project separately and then incorporate it using Webpack. Simply import the Javascript file output by Webpack (usually /dist/build.js) into your legacy project:

<script src="build.js" />

You will also have to transfer any assets used in the Vue project over to the legacy project.

This method may be unconventional, but it effectively integrates Vuetify while leveraging existing Javascript and web services within your project as if they were originally there.

Similar questions

If you have not found the answer to your question or you are interested in this topic, then look at other similar questions below or use the search

Troubleshooting Vue Component Visibility Issue in Laravel 5.4 with Passport Integration

Implementing passport using Laravel 5.4 has been a smooth process following the official documentation step by step. All was going well until I reached the "Frontend Quickstart" section. After executing the command to publish the vendor: php artisan vend ...

Trouble uploading an audio blob as a base64 string using Google Drive API with the drive.files.create method - File ID could not be located

My current challenge involves sending an audio blob to a specific Google Drive folder. To accomplish this, I convert the blob into a file before initiating the transfer process. However, I have encountered an error from the beginning: Error: File not fo ...

Guide on retrieving data parameter on the receiving page from Ajax response call

I am working on dynamically opening a page using Ajax to avoid refreshing the browser. The page opens and runs scripts on the destination page, but before running the script, I need to retrieve parameters similar to request.querystring in JavaScript. Belo ...

What is the best way to generate an empty object that mimics the structure of an object within an array of objects in AngularJS

I am facing a scenario where I have an array of objects structured like this: $scope.users = [ { ID: "1", Name: "Hege", Username: "Pege", Password: "hp", }, { ID: "2", Name: "Peter", User ...

Navigating JSON data with unexpected fields in Typescript and React.js

Looking to parse a JSON string with random fields in Typescript, without prior knowledge of the field types. I want to convert the JSON string into an object with default field types, such as strings. The current parsing method is: let values = JSON.parse ...

Do I have to cram all the content onto a single page just to use a scroll effect?

I'm currently facing a dilemma as I work on building my portfolio. My goal is to primarily use html5 and css3, along with a bit of js, jquery, and other tools if necessary. Although I am not an expert in web development, I wanted to push myself to cre ...

The functionality of making Slim POST requests is currently not functioning as expected within the Ionic

An issue is arising with my app that makes calls to a REST API using POST and GET methods. The app I'm developing with Ionic works perfectly when emulated using the command: ionic serve --lab However, when running the app on an actual device, calls ...

Creating a dynamic nested list in HTML using JavaScript with data retrieved from a JSON source

I'm trying to generate a dynamic nested ul\li list from a JSON array. IMPORTANT! While I can use jQuery for this transformation, it's in a node.js environment where DOM access is restricted and I must work with a string. The depth of the a ...

Reverse the action and postpone the Ajax call for a specified time or until the next action occurs

How can I implement a setup and undo feature for my ajax calls that allows users to delay the call for a set amount of time and abort it if needed? I also want to be able to stop the delay and proceed with the most recent ajax call if another action is tri ...

Issue with jQuery's JSON data not being properly transmitted to CodeIgniter (`

Based on my observation, the script provided below seems to be functioning properly: <script type="text/javascript" language="javascript"> $(document).ready(function() { $('#add').bind('keypress', function(e) { if(e.k ...

VueX State Not Displaying Upon Initial Load

When I try to save the first item in my store, it doesn't appear on the frontend - only my buttons do. However, after adding the first row and refreshing the page, I am able to add more rows that do show up. I attempted to create a clientIndex because ...

Unable to view images on Wordpress theme

I am currently facing an issue where some images in my asset folder are not displaying properly when I convert my HTML/CSS/JS template to Wordpress. The main problem is with the image that should show up when you first visit the website. Below is the CSS c ...

Display a div based on user selection using Ajax and Laravel

There are two div elements on the index page containing a datatable. By default, these two divs should be hidden. When an option is selected from the dropdown menu, the corresponding div should be displayed. The webpage is designed for searching within a ...

Tips for maintaining i18n locale slugs and ensuring i18n consistency when reloading in Next.js

I'm currently utilizing next-translate. The default recognition of my routes is as follows: /about <--- /de/about /es/about However, I would like to set a specific locale for all paths: /en/about <--- /de/about /es/about Below is ...

Price Adjuster Tracker

Recently, I coded a small JavaScript program with the purpose of: incrementing or decrementing the quantity of an item by 1 adjusting the price of an item based on the initial price However, my excitement turned to disappointment when I encountered these ...

Using `this` within an object declaration

I am encountering an issue with the following code snippet: const myObj = { reply(text: string, options?: Bot.SendMessageOptions) { return bot.sendMessage(msg.chat.id, text, { reply_to_message_id: msg.message_id, ...options }) ...

"Access denied" error when using Internet Explorer and jQuery

Attempting to make an AJAX call using jQuery's $.post in Internet Explorer is resulting in an error message stating "Permission denied." This peculiar issue only seems to occur when accessing a page after having visited another page. For example, if ...

Transmitting data from the front end to the server in React/Shopify for updating API information using a PUT request

After successfully retrieving my API data, I am now tasked with updating it. Within my component, I have the ability to log the data using the following code snippet. In my application, there is an input field where I can enter a new name for my product an ...

The function 'replace' is not supported by Object in Internet Explorer 11

I'm currently facing an issue while trying to get my Vuejs application to function properly on IE11. One of the node modules (vue-directive-tooltip) is causing an error specifically on IE11: "Object doesn't support property or method 'repla ...

What mistakes am I making in my usage of React hooks in this situation?

As part of my journey through the FullstackOpen course at the University of Helsinki, I am working on creating a simple Phonebook application. In troubleshooting my code, I've noticed that my 'filterBy' state is consistently one step behind, ...