Search code examples
vue.jsinternet-explorervue-cli

vue.config.js [transpileDependencies] is not work


I created a vue(2.x) project with vue-cli.

And I use the @splidejs/vue-splide npm module in this project.

This project must support up to IE10...

The @splidejs/vue-splide module did not work in IE, so I created a vue.config.js file and wrote it as below.

module.exports = {
  transpileDependencies: [
    "@splidejs/vue-splide"
  ]
}

Afterwards I ran the npm run serve command again. But the i.e. error was still not resolved.

Please help me what to do.

There are so many things to do. Get me out of hell's Internet Explorer support.


Solution

  • I wasted a day with this problem. I write the answer to make sure no developer experiences the same pain as mine.

    After creating the vue.config.js file, write it as follows.

    module.exports = {
      transpileDependencies: [
        "@splidejs"
      ]
    }
    

    Even entering both @splidejs/splide and @splidejs/splide-extension-video does not work in IE.

    However, if only @splidejs is entered, it works normally in IE.

    I don't know the exact reason. If you know why, please leave a comment.