vuetify icon indicating copy to clipboard operation
vuetify copied to clipboard

[Bug Report] Not work in Edge, error:'SCRIPT1028: SCRIPT1028: Expected identifier, string or number'

Open shadowdreamer opened this issue 7 years ago • 14 comments

Environment

Vuetify Version: 2.0.4 Last working version: 1.5.16 Vue Version: 2.6.10 Browsers: Microsoft Edge OS: Windows 10

Steps to reproduce

just use defult settings

vue create test
vue add vuetify
cd test
yarn serve

Expected Behavior

work in Edge

Actual Behavior

SCRIPT1028: SCRIPT1028: Expected identifier, string or number

Reproduction Link

https://github.com/shadowdreamer/test

shadowdreamer avatar Aug 03 '19 06:08 shadowdreamer

You need to transpileDependencies in vue.config.js

edit: updated link https://vuetifyjs.com/en/getting-started/browser-support#ie-11-amp-safari-9-support

Leaving this open as it's not clear enough there that it applies to Edge as well

// vue.config.js

module.exports = {
  ...,
  transpileDependencies: ['vuetify'],
}; 

jacekkarczmarczyk avatar Aug 03 '19 06:08 jacekkarczmarczyk

@jacekkarczmarczyk thanks, it worked.

shadowdreamer avatar Aug 03 '19 07:08 shadowdreamer

thanks. worked for me as well. why is this not in the 2.0.5 Quick Start documentation?

wrdickson avatar Aug 07 '19 18:08 wrdickson

@wrdickson because it isn't, thus this issue and the documentation flag. Still determining best place in there to put it for clarity and coupled with #8025.

MajesticPotatoe avatar Aug 07 '19 18:08 MajesticPotatoe

Worked for me too @jacekkarczmarczyk

cfguimaraes avatar Oct 29 '19 13:10 cfguimaraes

Does not work for me: Uncaught TypeError: Cannot assign to read only property 'exports' of object '#<Object>' in app.js

leolux avatar Nov 21 '19 09:11 leolux

For me it doesn't work in Edge 44. I use ti with Symfony Webpack encore:

vue.config.js

module.exports = {
  transpileDependencies: ['vuetify']
}

babel.config.js

module.exports = {
  presets: ['@babel/preset-env']
}

webpack.config.js

....

Encore
  .enableSingleRuntimeChunk()
  .setOutputPath([__dirname, 'public'].join('/'))
  .setPublicPath('/bundles/arodaxadmin/')
  .setManifestKeyPrefix('')
  .enableSourceMaps(!Encore.isProduction())
  .enableVueLoader()
  .addPlugin(new CopyWebpackPlugin([
    { from: [__dirname, 'assets/images'].join('/'), to: 'images' }
  ]))
  .enableSassLoader(options => {
    options.implementation = require('sass')
  })
  .addPlugin(new VuetifyLoaderPlugin())
  .enableBuildNotifications(true, (options) => { options.alwaysNotify = true })
  .splitEntryChunks()
  .configureTerserPlugin((options) => {
    options.cache = true
    options.parallel = true
    options.terserOptions = {
      output: {
        comments: false
      }
    }
  })
  .configureUrlLoader({
    fonts: { limit: 4096 },
    images: { limit: 4096 }
  })
  .configureFilenames({
    js: '[name].min.js',
    css: '[name].min.css',
    images: 'images/[name].[ext]',
    fonts: 'fonts/[name].[ext]'
  })

module.exports = webpackConfig

Has anyone achieved to get this working with Encore?

cur53se avatar Dec 09 '19 08:12 cur53se

Could somebody provide a solution for those who do not use Vue CLI? I've tried to follow the instructions from https://vuetifyjs.com/en/getting-started/browser-support#ie-11-amp-safari-9-support with no luck. Note: I'm trying to run it on Edge, not IE. It says: "SCRIPT1028: SCRIPT1028: Expected identifier, string or number", pointing to my main.js on the line where webpacked version of /node_modules/vuetify/lib/util/helpers.js": is located

archeg avatar Dec 12 '19 15:12 archeg

If you aren't using vue-cli then vue.config.js won't do anything. I can't comment on encore or whatever the hell that is, but with plain webpack you need exclude: /node_modules[\\/](?!(vuetify)).*/ on the babel-loader block, and @babel/preset-env with useBuiltIns: 'usage'

https://discordapp.com/channels/340160225338195969/340215499398840331/654314276286365706

KaelWD avatar Dec 13 '19 12:12 KaelWD

@KaelWD Thanks for your response. Unfortunately, it still does not work for me. I'm a bit unexperienced around webpack/babel, so maybe I'm doing something very stupid.

Could you have a look at my setup? I've stripped my project out of all code except for configuration: https://github.com/archeg/bugshowcase-vuetify-edge

archeg avatar Dec 16 '19 09:12 archeg

I was having some trouble with this but transpileDependencies has fixes my problem. The problem was that another package I was using (My companies internal component library) also needed transpiling. So I ended up with this:

transpileDependencies: ['vuetify', '@mycompany']

mattgreenfield avatar Jan 09 '20 08:01 mattgreenfield

For Symfony Webpack encore: webpack.config.js

    .configureBabel(function(babelConfig) {
    }, {
        useBuiltIns: 'entry',
        corejs: 3,
        includeNodeModules: ['vuetify']
    })

pavel-dev avatar Mar 20 '20 08:03 pavel-dev

Still have exact issue with Vuetify added later, not from cli

andriibur avatar Sep 07 '20 16:09 andriibur

We kindly ask users to not comment on closed/resolved issues. If you believe that this issue has not been correctly resolved, please create a new issue showing the regression or reach out to us in our Discord community.

Thank you for your contribution and interest in improving Vuetify.

jacekkarczmarczyk avatar Sep 07 '20 16:09 jacekkarczmarczyk