zoukankan      html  css  js  c++  java
  • 学习react基本语法初始化webpack.config.js

    const path = require('path')
    const htmlWebpackPlugin = require('html-webpack-plugin')

    module.exports = {
      entry: path.join(__dirname, './src/main.js'),
      output: {
        path: path.join(__dirname, './dist'),
        filename: 'bundle.js'
      },
      plugins: [ // 插件
        new htmlWebpackPlugin({
          template: path.join(__dirname, './src/index.html'),
          filename: 'index.html'
        })
      ],
      module: {
        rules: [
          { test: /.css$/, use: ['style-loader', 'css-loader?modules&localIdentName=[name]_[local]-[hash:5]'] }, // 通过 为 css-loader 添加 modules 参数,启用 CSS 的模块化
          { test: /.scss$/, use: ['style-loader', 'css-loader', 'sass-loader'] },
          { test: /.(png|gif|bmp|jpg)$/, use: 'url-loader?limit=5000' },
          { test: /.jsx?$/, use: 'babel-loader', exclude: /node_modules/ }
        ]
      }
    }
  • 相关阅读:
    Django-分页器
    Django-利用Form组件和ajax实现的注册
    Django之auth用户认证
    django之跨表查询及添加记录
    Django之queryset API
    bootstrip CSS
    bootstrip安装
    Django之环境安装
    前端之jQuery基础篇02-事件
    前端之jQuery基础篇
  • 原文地址:https://www.cnblogs.com/itcast-guoke/p/12920441.html
Copyright © 2011-2022 走看看