Skip to content
This repository has been archived by the owner on May 28, 2021. It is now read-only.

The snippet example (taken from rollup doc I guess) uses an unsupported feature #1

Closed
AlexandreBonaventure opened this issue May 12, 2021 · 0 comments

Comments

@AlexandreBonaventure
Copy link

// vite.config.js
import { defineConfig } from 'vite'

export default defineConfig({
  plugins: [
    {
      name: 'dynamic-import-polyfill',
      renderDynamicImport() {
        return {
          left: '__import__(',
          right: ', import.meta.url)'
        }
      }
    }
  ]
})

Here import.meta.url is given as a second argument to dynamic-import-polyfill fn but this is not supported. As is, this won't work with relative dynamic imports.
see GoogleChromeLabs/dynamic-import-polyfill#5

Maybe we should warn the user to use the fork here https://github.com/GoogleChromeLabs/dynamic-import-polyfill/pull/7/files

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants