symfony / stimulus-bridge

Stimulus integration bridge for Symfony projects
https://symfony.com/ux
75 stars 15 forks source link

Adding `core-js` #50

Closed ThomasLandauer closed 2 years ago

ThomasLandauer commented 2 years ago

Is this the right fix for https://github.com/symfony/stimulus-bridge/issues/49 and https://github.com/symfony/stimulus-bridge/issues/47 ? Thanks to @graceman9 and @Kocal, I solved it by doing npm install --save core-js@3.19.0. So I'm guessing it might be better to add it here right away.

Closes https://github.com/symfony/stimulus-bridge/issues/49

Kocal commented 2 years ago

Hi, and thanks for the PR!

I don't think this is the right fix for the core-js issue. core-js is usually a dependency that should be installed by yourself if you need to us it (ie: need polyfills).

Also, note that dependency core-js should normally be in your package.json if you installed the Webpack Encore bundle (see recipe).

ThomasLandauer commented 2 years ago

Don't know why it didn't work last week, but now (after starting from scratch) this is my package.json:

{
    "devDependencies": {
        "@symfony/stimulus-bridge": "^2.0.0",
        "@symfony/webpack-encore": "^1.0.0",
        "core-js": "^3.0.0",
        "regenerator-runtime": "^0.13.2",
        "stimulus": "^2.0.0",
        "webpack-notifier": "^1.6.0"
    },
    "license": "UNLICENSED",
    "private": true,
    "scripts": {
        "dev-server": "encore dev-server",
        "dev": "encore dev",
        "watch": "encore dev --watch",
        "build": "encore production --progress"
    }
}

Everything fine so far, so I'm closing this :-)