Skip to content

Include documentation for use in es5 / legacy browsers #3

@LambyPants

Description

@LambyPants

Hi,

Really like this package - it made our lives much easier when looking support scss in lit. Thanks for your contribution!

Just a suggestion, as I recently spent a few hours trying to add ie11 support to a lit-based project; ended up discovering it was the extract-loader in this package which was converting scss -> js and was being ignored by our babel-loader. It was particularly confusing because older browsers give no context to the error and just shows a lit-element css.ts file (which I assume is being imported in templateGenerator.js via generateCSSImport) as being the cause of the issue.

Normally your babel-loader config looks something like this:

    module: {
      rules: [
        {
          test: /\.js$|\.ts$/,
          use: {
            loader: 'babel-loader',
....

Was able to resolve the issue by simply doing the following

    module: {
      rules: [
        {
          test: /\.js$|\.ts$|\.s(c|a)ss$/,
          use: {
            loader: 'babel-loader',

There might be other ways to do this, but it def could save future users some time if they are using with tools like babel. Thanks!

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