Skip to content
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

Problem with loading CSS #38

Open
kanakl opened this issue Oct 7, 2018 · 0 comments
Open

Problem with loading CSS #38

kanakl opened this issue Oct 7, 2018 · 0 comments
Assignees

Comments

@kanakl
Copy link

kanakl commented Oct 7, 2018

I tried adding an css file, but I have a problem loading it.
The CSS file file is not automatic added to the dist folder after the build so I cant use

I also use typings-for-css-modules-loader.
I add import: import css = require('./main.css') to index.ts;
And to wepack.config.js I added this:

      {
        test: /\.css$/,
        include: path.join(__dirname, 'src'),
        use: [
          'style-loader',
          {
            loader: 'typings-for-css-modules-loader',
            options: {
              modules: true,
              namedExport: true 
            }
          }
        ]
      }, 

But it still not working. If I look at to browser to html elements I can see css style, but class names are different, for example:

._2IUk4Et8o97FuHtbddR-Zp {
      list-style: none;
      padding: 10px 0;
      z-index: 10000;
      margin: 0px;  
} 

Do you know, how can I import css?

@emyann emyann self-assigned this Oct 29, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants