摘要: const path = require('path') // 1. 导入 html-webpack-plugin 这个插件,得到插件的构造函数 const HtmlPlugin = require('html-webpack-plugin') // 2. new 构造函数,创建插件的实例对象 co 阅读全文
posted @ 2022-07-05 18:42 前端导师歌谣 阅读(64) 评论(0) 推荐(0)
摘要: const path=require('path') // 1. 导入 html-webpack-plugin 这个插件,得到插件的构造函数 const HtmlPlugin = require('html-webpack-plugin') // 2. new 构造函数,创建插件的实例对象 cons 阅读全文
posted @ 2022-07-05 18:42 前端导师歌谣 阅读(47) 评论(0) 推荐(0)
摘要: //导入jquery import $ from 'jquery' //定义jquery的入口 import './index.css' $(function(){ $('li:odd').css('background-color','red') $('li:even').css('backgro 阅读全文
posted @ 2022-07-05 18:42 前端导师歌谣 阅读(30) 评论(0) 推荐(0)
摘要: const path=require('path') // 1. 导入 html-webpack-plugin 这个插件,得到插件的构造函数 const HtmlPlugin = require('html-webpack-plugin') // 2. new 构造函数,创建插件的实例对象 cons 阅读全文
posted @ 2022-07-05 18:42 前端导师歌谣 阅读(263) 评论(0) 推荐(0)
摘要: 内存中的页面不受到影响 会引用内存中的bundle.js 阅读全文
posted @ 2022-07-05 18:42 前端导师歌谣 阅读(26) 评论(0) 推荐(0)
摘要: const path=require('path') // 1. 导入 html-webpack-plugin 这个插件,得到插件的构造函数 const HtmlPlugin = require('html-webpack-plugin') // 2. new 构造函数,创建插件的实例对象 cons 阅读全文
posted @ 2022-07-05 18:42 前端导师歌谣 阅读(120) 评论(0) 推荐(0)
摘要: <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="wi 阅读全文
posted @ 2022-07-05 18:42 前端导师歌谣 阅读(75) 评论(0) 推荐(0)
摘要: webpack.config.js { "name": "change-rows-color", "version": "1.0.0", "description": "", "main": "index.js", "scripts": { "dev": "webpack serve" }, "ke 阅读全文
posted @ 2022-07-05 18:42 前端导师歌谣 阅读(58) 评论(0) 推荐(0)
摘要: const path=require('path') module.exports={ mode:"development", //指定要处理的路径 entry:path.join(__dirname,"./src/index.js"), //输出的文件路径 output:{ //存放的目录 pat 阅读全文
posted @ 2022-07-05 18:42 前端导师歌谣 阅读(40) 评论(0) 推荐(0)
摘要: 压缩development模式比较大 压缩production模式比较大 阅读全文
posted @ 2022-07-05 18:42 前端导师歌谣 阅读(45) 评论(0) 推荐(0)