GET http:// localhost:8080 / index.js net :: ERR_ABORTED 404(未找到)

时间:2019-09-30 19:16:17

标签: javascript jquery webpack

这种情况发生时我只是不知道,我一直在使用sass(响应式),然后出现GET http://localhost:8080/index.js net :: ERR_ABORTED 404(未找到)。最令人兴奋的部分是分页脚本可以工作,但是由scipt实现的样式(我没碰过的样式就不会)。我也有Facebook广告,其中scipt在顶部是

已删除iframe

import './sass/style.scss';
import Slider from './js/sliderHero';
import Paginator from './js/pagination';

document.addEventListener('DOMContentLoaded', () => {
  return {
    Slider,
    Paginator
  };
});
const path = require('path');
const HtmlWebpackPlugin = require('html-webpack-plugin');
const MiniCssPlugin = require('mini-css-extract-plugin');
const { CleanWebpackPlugin } = require('clean-webpack-plugin');

module.exports = {
  entry: './src/index.js',
  output: {
    path: path.join(__dirname, './dist'),
    filename: 'bundle.js'
  },
  module: {
    rules: [
      {
        test: /\.js$/,
        exclude: /node_modules/,
        use: {
          loader: 'babel-loader',
          options: {
            presets: ['@babel/preset-env']
          }
        }
      },
      {
        test: /\.(png|svg|jpe?g|gif)$/,
        use: {
          loader: 'file-loader',
          options: {
            name: '[name].[hash].[ext]',
            outputPath: 'imgs'
          }
        }
      },
      {
        test: /\.scss$/,
        use: ['style-loader', 'css-loader', 'sass-loader']
      },
      {
        test: /\.html$/,
        use: ['html-loader']
      }
    ]
  },
  plugins: [
    new HtmlWebpackPlugin({
      template: './src/index.html'
    }),
    new MiniCssPlugin({
      filename: '[name].css',
      chunkFilename: '[id].css'
    }),
    new CleanWebpackPlugin()
  ]
};
        <div
          class="fb-page"
          data-href="https://www.facebook.com/facebook"
          data-height="261px"
          data-width="358"
          data-hide-cover="false"
          data-show-facepile="false"
        ></div>

检查了每个链接,认为该问题属于分页脚本加载

0 个答案:

没有答案