Skip to content

Polyfills not added from a dependency in transpileDependencies #2837

Open
@jameswragg

Description

@jameswragg

Version

3.0.4

Reproduction link

https://github.com/jameswragg/vue-ie-transpile-issue

Node and OS info

node v8.11.3 / npm 6.4.1 / macOS 10.14 (18A391)

Steps to reproduce

npm install
npm run build

transpileDependencies doesn't seem to be working as specified in the docs here:

If the dependency is written in an ES version that your target environments do not support: Add that dependency to the transpileDependencies option in vue.config.js. This would enable both syntax transforms and usage-based polyfill detection for that dependency.

npm run server

This serves up the dist dir on http://localhost:8080. Viewing this bundle on IE 11 for instance fails with missing Symbol polyfills, this is seen in the IE 11 console:

SCRIPT5009: 'Symbol' is undefined
chunk-vendors.3e82079c.js (7,82041)

Installing this polyfill manually reveals more transpiling issues.

What is expected?

Adding the dependency to transpileDependencies in vue.config.js should transpile the dependency, adding any required required polyfills for the environment specified in browserslist

What is actually happening?

Required polyfills are missing.


Manually adding the es6.symbol polyfill to babel.config.js (you can see it commented out in my repro) reveals more transpiling issues that I can only hope would be magically resolved after transpileDependencies is doing what it claims.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions