Hailwood
Hailwood3y ago

Hailwood – 07-24 Jun 2

Anyone know why using webpack with style-loader, Trying to do
import styles from './stylesheet.css';
import styles from './stylesheet.css';
I get
export 'default' (imported as 'styles') was not found in './stylesheet.css' (module has no exports)
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);
},
injectType: 'lazyStyleTag',
insert: function insertIntoTarget(element, options) {
const parent = options.target || document.head;
parent.appendChild(element);
},
2 Replies
ScriptyChris
ScriptyChris3y ago
import - JavaScript | MDN
The static import statement is used to import read-only live bindings which are exported by another module.
reactibot
reactibot3y ago
This thread hasn’t had any activity in 12 hours, so it’s now locked. Threads are closed automatically after 12 hours. If you have a followup question, you may want to reply to this thread so other members know they're related. https://discord.com/channels/102860784329052160/565213527673929729/981820494498123786