@open-wc/webpack-import-meta-loader
    DefinitelyTyped icon, indicating that this package has TypeScript declarations provided by the separate @types/open-wc__webpack-import-meta-loader package

    0.4.7 • Public • Published

    Webpack Helpers

    Webpack loader for supporting import.meta in webpack.

    Part of Open Web Components: guides, tools and libraries for modern web development and web components

    CircleCI BrowserStack Status Renovate enabled

    Note

    This is NOT an optimal solution e.g. it may slow down your build a little. However as currently import.meta results in an webpack parse error using a loader is probably the only thing we can do for now. For details see

    If webpack fixed that parse error import.meta will probably work out of the box. If not then a babel plugin (that can work with AST) will be a better solution.

    Manual Setup

    • yarn add @open-wc/webpack-import-meta-loader
    • Add this to your webpack config
    module: {
      rules: [
        {
          test: /\.js$/,
          loader: require.resolve('@open-wc/webpack-import-meta-loader'),
        },
      ],
    },

    Install

    npm i @open-wc/webpack-import-meta-loader

    DownloadsWeekly Downloads

    7,224

    Version

    0.4.7

    License

    MIT

    Unpacked Size

    12.3 kB

    Total Files

    6

    Last publish

    Collaborators

    • modern-web
    • larsdenbakker
    • d4kmor