2 Star 1 Fork 0

/CSS Autoprefixer

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
webpack.config.js 1.25 KB
一键复制 编辑 原始数据 按行查看 历史
提交于 2020-08-13 10:39 . 优化UI,添加复制功能
const path = require('path');
const HtmlWebpackPlugin = require('html-webpack-plugin');
const { CleanWebpackPlugin } = require('clean-webpack-plugin');
const MiniCssExtractPlugin = require('mini-css-extract-plugin');
module.exports = {
mode: "development",
entry: './app.js',
output: {
filename: "[name].[hash].js",
path: path.resolve(__dirname, "dist")
},
devServer: {
contentBase: path.resolve(__dirname, 'dist'),
port: 8848
},
plugins: [
new CleanWebpackPlugin(),
new HtmlWebpackPlugin({
title: "自动添加css前缀",
template: path.resolve(__dirname, 'index.html')
}),
new MiniCssExtractPlugin({
filename: 'index.css'
})
],
module: {
rules: [
{
test: /\.css$/,
use: [
{
loader: MiniCssExtractPlugin.loader,
options: {
esModule: true
}
},
'css-loader'
]
},
{
test: /\.(woff|woff2|ttf|otf|eot)$/,
use: ['file-loader']
}
]
}
}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
JavaScript
1
https://gitee.com/lixuewen9/CSS-Autoprefixer.git
git@gitee.com:lixuewen9/CSS-Autoprefixer.git
lixuewen9
CSS-Autoprefixer
CSS Autoprefixer
master

搜索帮助

0d507c66 1850385 C8b1a773 1850385