Was able to resolve modules with Polymer 3, but not with Lit Element

Viewed 10

I have always been able to use https://github.com/nodecg/express-transform-bare-module-specifiers with Polymer 3 and browser sync. But now I am getting errors with the set up and lit element

Uncaught TypeError: Failed to resolve module specifier "lit". Relative references must start with either "/", "./", or "../".

It is for the following files being requested:

/node_modules/@webcomponents/webcomponentsjs/webcomponents-loader.js
/node_modules/lit/polyfill-support.js
/app/main-app.js
/node_modules/lit/polyfill-support.js.map

What has changed? A module is a module....this should work with lit element as it did with P3

Please do not recommend wds, while it is a great tool it does not fit my use case

My browser-sync config that works with Polymer 3 modules but not Lit:

const app = express();
const bs = require('browser-sync').create();
app.use('*', transformMiddleware());

bs.init({
  server: true,
  notify: false,
  "files": [

  ],
  middleware: [
    proxyMiddleware,
    historyApiFallback(),
  ],
  port: 4000,
  ui: false,
});

0 Answers
Related