HailwoodH
Reactiflux4y ago
1 reply
Hailwood

Hailwood – 07-24 Jun 2

Anyone know why using webpack with style-loader,
Trying to do
import styles from './stylesheet.css';

I get
export 'default' (imported as 'styles') was not found in './stylesheet.css' (module has no exports)


Yet

import './stylesheet.css';
is fine?

I have style-loader setup with

  injectType: 'lazyStyleTag',
  insert: function insertIntoTarget(element, options) {
    const parent = options.target || document.head;
    parent.appendChild(element);
  },
Was this page helpful?