Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

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

open-wc49kMIT0.4.7TypeScript support: definitely-typed

Webpack configuration following open-wc recommendations

webpack, meta-loader, import-meta

readme

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'),
    },
  ],
},

changelog

Change Log

All notable changes to this project will be documented in this file. See Conventional Commits for commit guidelines.

0.4.7 (2020-05-25)

Bug Fixes

  • webpack-import-meta-loader: fix a bug in the publicPath logic (#1677) (f8ff5e8)

0.4.6 (2020-04-20)

Note: Version bump only for package @open-wc/webpack-import-meta-loader

0.4.5 (2020-04-12)

Note: Version bump only for package @open-wc/webpack-import-meta-loader

0.4.4 (2020-03-24)

Note: Version bump only for package @open-wc/webpack-import-meta-loader

0.4.3 (2020-02-09)

Note: Version bump only for package @open-wc/webpack-import-meta-loader

0.4.2 (2020-02-02)

Note: Version bump only for package @open-wc/webpack-import-meta-loader

0.4.1 (2019-11-24)

Note: Version bump only for package @open-wc/webpack-import-meta-loader

0.4.0 (2019-11-19)

Features

  • update to use auto compatibility of es-dev-server (f6d085e)

0.3.4 (2019-10-25)

Bug Fixes

0.3.3 (2019-10-23)

Bug Fixes

0.3.2 (2019-10-16)

Bug Fixes

  • webpack-import-meta-loader: transform template literals to js (#872) (2efd727)

0.3.1 (2019-08-05)

Bug Fixes

  • cleanup package.json scripts (be6bdb5)

0.3.0 (2019-07-14)

Features

  • webpack-import-meta-loader: support for webpack_public_path (#570) (f072185)

0.2.5 (2019-07-08)

Bug Fixes

  • use file extensions for imports to support import maps (c711b13)

0.2.4 (2019-06-05)

Note: Version bump only for package @open-wc/webpack-import-meta-loader

0.2.3 (2019-06-04)

Note: Version bump only for package @open-wc/webpack-import-meta-loader

0.2.2 (2019-06-03)

Bug Fixes

  • webpack-import-meta-loader: rewrite all backslashes (#477) (ade8a65)

0.2.1 (2019-05-03)

Bug Fixes

  • webpack-import-meta-loader: fix filepaths (4480d2d)

0.2.0 (2019-03-23)

Features

  • add types + linting & improve intellisense (b6d260c)

0.1.3 (2019-03-08)

Note: Version bump only for package @open-wc/webpack-import-meta-loader

0.1.2 (2019-02-16)

Bug Fixes

  • update package repository fields with monorepo details (cb1acb7)

0.1.1 (2019-02-02)

Bug Fixes

  • unify npm readme header for all open-wc packages (1bac939)

0.1.0 (2019-01-26)

Features

  • add webpack-import-meta-loader (38dad6a)