Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

123
Visualizações
404 (Not Found) SCSS with Webpack

Webpack throws an error

GET http://localhost:8080/sass/main.scss net::ERR_ABORTED 404 (Not Found)

but at start server it loaded page with css. scss imported to js with

import '../sass/main.scss';

webpack config:

const HtmlWebpackPlugin = require('html-webpack-plugin');
module.exports = {
 entry: './src/js/controller.js',

 plugins: [
  new HtmlWebpackPlugin({
  template: './index.html',
 }),
],
module: {
 rules: [
  {
    test: /\.html$/i,
    use: ['html-loader'],
  },
  {
    test: /\.s[ac]ss$/i,
    use: ['style-loader', 'css-loader', 'sass-loader'],
  },
  ],
 },
}

Head part of index.html template: link to css here doesn't influence at all, only import inside js

<!DOCTYPE html>
 <html lang="en">
 <head>
 <meta charset="UTF-8" />
 <meta name="viewport" content="width=device-width, initial- 
  scale=1.0" />
 <meta http-equiv="X-UA-Compatible" content="ie=edge" />
 <link
  href="https://fonts.googleapis.com/css? 
  family=Nunito+Sans:400,600,700"
  rel="stylesheet"
 />
 <link rel="shortcut icon" href="/src/img/favicon.png" 
  type="image/x-icon" />
 <link rel="stylesheet" href="/src/saas/main.css" />
 <title></title>
 <script type="module" src="/src/js/controller.js"></script>
</head>

What could be going wrong?

about 4 years ago · Juan Pablo Isaza
1 Respostas
Responde à pergunta

0

Resolved. I removed link to script inside index.html

<script type="module" src="src/js/controller.js"></script>

and error is gone. (entry point and html template are already specified in config)

about 4 years ago · Juan Pablo Isaza Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda