Giter VIP home page Giter VIP logo

Comments (3)

megasent1 avatar megasent1 commented on May 29, 2024 2

Most of the time I use vue-browser-sfc when I include Vue in very basic/simple websites. Some of those websites need to be compatible with IE 11. Since IE 11 is not supporting arrow functions etc. it would be neat if vue-browser-sfc would make the compiled JS files IE11 ready out of the box. At the moment I always have to manually correct the not supported syntax after I compiled the file.

Hi!
I found a way-out.

Add following to your package.json devDependencies section:

 "babel-preset-env": "^1.7.0",
"babel-preset-es2015": "^6.24.1"

Also create file .babelrc with contents:

{
  "presets": [
    ["env", {
      "targets": {
        "browsers": ["last 2 versions", "ie >= 11"]
      },
      "useBuiltIns": true
    }]
  ]
}

Then you should be done. But IE sometimes needs polyfills, this is on you.

from vue-browser-sfc.

RonnieSan avatar RonnieSan commented on May 29, 2024 1

@megasent1 Thanks for your help with this. I updated some of the dependencies and the package.json file to include the "browserlists" property matching the settings you're using. I can't test at the moment, but hopefully this fixes the issues you're seeing.

from vue-browser-sfc.

travisbotello avatar travisbotello commented on May 29, 2024

That is great @megasent1 . Thank you very much!

from vue-browser-sfc.

Related Issues (17)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.