Skip to content

Webpack 5.97.1 started to load carousel.js since 0.9.0 instead of carousel.es.js #457

@BR0kEN-

Description

@BR0kEN-

Since the update to 0.9.0 the Webpack bundler started to load a browser version of the lib instead of the ES one. Notable TypeScript configs:

    "target": "es6",
    "module": "ES2022",
    "moduleResolution": "node",

Simply changing the ordering back to what was in 0.8.1 (see https://github.com/ismail9k/vue3-carousel/compare/v0.8.1..v0.9.0#diff-7ae45ad102eab3b6d7e7896acd08c427a9b25b346470d7bc6507b6481575d519) does the trick.

The right varinat:

  "exports": {
    ".": {
      "types": "./dist/carousel.d.ts",
      "import": "./dist/carousel.es.js",
      "require": "./dist/carousel.js",
      "browser": "./dist/carousel.min.js"
    },
    "./dist/carousel": {
      "types": "./dist/carousel.d.ts",
      "import": "./dist/carousel.es.js",
      "require": "./dist/carousel.js",
      "browser": "./dist/carousel.min.js"
    },
    "./dist/carousel.min.js": {
      "import": "./dist/carousel.es.min.js",
      "require": "./dist/carousel.min.js"
    },
    "./dist/*.css": {
      "import": "./dist/*.css",
      "require": "./dist/*.css"
    },
    "./carousel.css": "./dist/carousel.css"
  },

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions