nuxt关于兼容

使用nuxt( 2.4.5 )+vue(2.4.4)+element(2.6.1)。


可以较好兼容ie10和ie11
ie9兼容不是太好,大量控件会有一些小问题不过大多数都可以解决:需要注意css样式问题和不支持跨域的问题。
ie8及其以下版本就不要想了,做版本检测然后提示安装最新浏览器

开始找了很多babel-preset-env做兼容的方案,结果发现因为nuxt内部有很多自带的配置导致的冲突。


最后发现nuxt原生就自带兼容。 官方api地址


在package.json中添加,只有打包才能使用,在dev模式下没用

{
  "scripts": {
    "build": "nuxt build -modern=true",
    "start": "nuxt start -modern=true --inline --progress --config nuxt.config.js",
  }
}

其中有两种模式 client 和 server 。

前者直接打两个包,然后使用兼容写法。
后者添加可以让低版本浏览器依赖 。


暂时还没有看出这两个方案有什么太大区别。



个 人使用的是 server 模式,这样的话核心的js起码是一份打包速度稍微快些。

类别:

7回应

  1. watch说道:

    Your style is so unique in comparison to other folks I have read stuff from. I appreciate you for posting when you have the opportunity, Guess I will just bookmark this blog. Ambur Courtney Scibert

  2. donmadan说道:

    Hi there. I found your blog by the use of Google even as looking for a related matter, your site came up. It appears great. I have bookmarked it in my google bookmarks to come back then. Pearla Antonius Birkner

  3. hindi movie说道:

    Attractive component of content material. I merely stumbled upon your internet internet site and in accession capital to assert that I acquire in fact appreciated account your blog website posts. Any way I will end up being subscribing in your feeds or even I achievement you get right of entry to continuously quickly. Marin Luis Waldemar

  4. hindi movie说道:

    I wish to get across my respect for your kind-heartedness for those who must have assistance with the issue. Your real commitment to getting the solution across has been pretty effective and has surely encouraged ladies much like me to reach their desired goals. Your personal informative tips and hints signifies a lot to me and even more to my peers. Many thanks; from everyone of us. Aleta Mateo Bubalo

  5. mp3说道:

    I would like to voice my respect for your kindness for those individuals that need assistance with that subject. Your personal dedication to getting the solution all over appeared to be really functional and has always made many people just like me to reach their objectives. This warm and friendly useful information means so much to me and even more to my office workers. Thanks a lot; from all of us. Korella Tanny Kunkle

  6. diziler说道:

    I think it is a fluent sharing, I will recommend your site to my friends Ellene Marten Lewin

  7. diziler说道:

    Good blog post. I absolutely love this website. Keep it up! Tina Jeffy Deeanne

diziler进行回复 取消回复

您的电子邮箱地址不会被公开。 必填项已用*标注

Copyright @ 2019 ARVIN 版权所有 沪ICP备19014233号-1