小编Mat*_*zik的帖子

Nuxt和Vue对IE11的支持

我在Vue和Nuxt中实现的应用程序中支持IE11时遇到问题。该应用程序使用Tailwind CSS库。

我用polyfill.io创建了polyfill,但是并不能解决问题。我进行了更多调查,发现node_modules源代码未转换为ES5标准(尤其是与Tailwind库相关的代码)。我尝试了几种解决方案,但没有一个解决了我的问题。我在nuxt.config.js中添加了transpile属性,但添加后发生了错误:Cannot assign to read only property 'exports' of object '#<Object>'。我也尝试添加@ nuxt / babel-preset-app,但这也没有帮助。

我当前问题的图像:https : //ibb.co/4FCcKMy

这是我的nuxt.config.js:

const path = require('path')
const root = path.resolve(__dirname)
const features = [
    'fetch',
    'Object.entries',
    'IntersectionObserver',
].join('%2C')

module.exports = {
    mode: 'universal',
    router: {
        middleware: 'authMiddleware',
    },

    serverMiddleware: [
        { path: '/health', handler: '~/middleware/healthMiddleware.js' },
    ],

    /*
    ** Headers of the page
    */
    head: {
        title: 'Helloprint',
        htmlAttrs: {
            lang: 'en-IE',
        },
        meta: [
            { 'http-equiv': 'X-UA-Compatible', …
Run Code Online (Sandbox Code Playgroud)

javascript vue.js nuxt.js

6
推荐指数
1
解决办法
782
查看次数

标签 统计

javascript ×1

nuxt.js ×1

vue.js ×1