[Bug Report] Not work in Edge, error:'SCRIPT1028: SCRIPT1028: Expected identifier, string or number'
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
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 thanks, it worked.
thanks. worked for me as well. why is this not in the 2.0.5 Quick Start documentation?
@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.
Worked for me too @jacekkarczmarczyk
Does not work for me:
Uncaught TypeError: Cannot assign to read only property 'exports' of object '#<Object>' in app.js
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?
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
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 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
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']
For Symfony Webpack encore: webpack.config.js
.configureBabel(function(babelConfig) {
}, {
useBuiltIns: 'entry',
corejs: 3,
includeNodeModules: ['vuetify']
})
Still have exact issue with Vuetify added later, not from cli
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.