-
Notifications
You must be signed in to change notification settings - Fork 29
TS2339: Property does not exist on type 'typeof import ...' #8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
@CoericK have you tried importing it as a default import? eg. import styles from '../../less/component/logo.less' Please let me know if it helps to fix the type checking error, I had to change the generated typings a bit to allow using it with If using default import works if this case, we might somehow consider getting it working for both default imports and Edit: {
test: /\.(less)$/,
use: [
{ loader: 'style-loader' },
{
loader: '@teamsupercell/typings-for-css-modules-loader',
},
{
loader: 'css-loader',
options: { modules: true },
},
{ loader: 'less-loader', options: { sourceMap: true } },
],
} |
Hey @DanNSam thanks for your quick answer, I double checked the order and placed
But styles its undefined:
|
@CoericK out of interest, which loader are you using for TypeScript: |
As I listed on my dependencies I am using
|
Hey guys, @DanNSam any updates regarding my issue? |
@CoericK it looks like it's a runtime issue after you changed to the default import. I am wondering if your |
Hello, I have same problem, but with awesome-typescript-loader. If i use
default import
file styles.css.d.ts is generated and looks like this:
in my webpack.config.js i have:
tsconfig.json:
I didn't even configured sass styles yet. |
@ErikParso @CoericK started #14 which should resolve this issue. ETA is about 1 or 2 days. Thanks for all the information you provided and for your patience ❤️ |
Thanks! esModuleInterop flag with combination of |
Uh oh!
There was an error while loading. Please reload this page.
Thanks for supporting this library, I am facing issues integrating it with less and the latest version for loaders, I tried different setups but only this managed to "work" (kinda)
I got the following setup:
package.json
tsconfig.json
webpack.config.js
less/components/logo.less
After running webpack in dev it generates the logo.d.ts file that contents:
I tried importing the styles in several ways but this is the only one that "seems to work":
This works on the DOM, but I get the error:
I dont know how to fix this, I tried several times now
Originally posted by @CoericK in #7 (comment)
The text was updated successfully, but these errors were encountered: