-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Uglifier breaks code for IE11 #1354
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Having the same issue. |
It comes down to this line: https://github.com/rails/webpacker/blob/master/package/environments/production.js#L20 Our fix was just to override it to a lower ES level. I'd like to submit a PR if changing this will be acceptable? We settled on ES 7. |
This issue is already logged here, along with a solution: #1235 That being said, I have no idea why webpacker is trying to set an uglifier config that is not just the uglifier defaults. |
Please try the latest RC, otherwise feel free to open a new issue with more details. |
Hello,
I cannot get my Vuejs packs to run in IE in production, as I get an error when the js in the pack is run.
The error is SCRIPT1003: Expected ':'
It is this piece of the code which breaks:
var r=t[i]={i,1:!1,exports:{}}
This translates to the following part of the below code (marked with PROBLEM CODE BELOW), which is at the very top of the pack js file:
// (function(modules) { // webpackBootstrap
// // The module cache
// var installedModules = {};
//
// // The require function
// function webpack_require(moduleId) {
//
// // Check if module is in cache
// if(installedModules[moduleId]) {
// return installedModules[moduleId].exports;
// }
// // Create a new module (and put it into the cache)
// PROBLEM CODE HERE
// var module = installedModules[moduleId] = {
// i: moduleId,
// l: false,
// exports: {}
// };
//
// // Execute the module function
// modules[moduleId].call(module.exports, module, module.exports, webpack_require);
//
// // Flag the module as loaded
// module.l = true;
//
// // Return the exports of the module
// return module.exports;
// }
//
//
// // expose the modules object (webpack_modules)
// webpack_require.m = modules;
//
// // expose the module cache
// webpack_require.c = installedModules;
//
// // define getter function for harmony exports
// webpack_require.d = function(exports, name, getter) {
// if(!webpack_require.o(exports, name)) {
// Object.defineProperty(exports, name, {
// configurable: false,
// enumerable: true,
// get: getter
// });
// }
// };
//
// // getDefaultExport function for compatibility with non-harmony modules
// webpack_require.n = function(module) {
// var getter = module && module.__esModule ?
// function getDefault() { return module['default']; } :
// function getModuleExports() { return module; };
// webpack_require.d(getter, 'a', getter);
// return getter;
// };
//
// // Object.prototype.hasOwnProperty.call
// webpack_require.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
//
// // webpack_public_path
// webpack_require.p = "/packs/";
//
// // Load entry module and return exports
// return webpack_require(webpack_require.s = 896);
// })
/***********************************************************/
// ([
/ 0 */
I am using all the defaults that come with webpacker and webpacker-vue
It works in the non-uglified code, and in other browsers.
Thank You
Eamon
The text was updated successfully, but these errors were encountered: