3 Star 11 Fork 1

yiyiooo/genshin-impact-wish-simulator

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
webpack.config.js 1.38 KB
一键复制 编辑 原始数据 按行查看 历史
const path = require('path');
const HTMLWebpackPlugin = require('html-webpack-plugin');
const srcPath = path.resolve(__dirname, 'src');
// We are using 'contentHash' to prevent the same cache being carried over for the next build script.
module.exports = {
resolve: {
extensions: ['.js', '.jsx']
},
"entry": "./src",
"output": {
"path": __dirname + '/dist',
"filename": 'main.[contenthash].js'
},
plugins: [
new HTMLWebpackPlugin({
hash: true,
title: 'Genshin Impact Wish Sim',
template: `${__dirname}/src/index.html`,
filename: `${__dirname}/dist/index.html`,
})
],
devServer: {
contentBase: path.join(__dirname, 'dist'),
watchContentBase: true,
host: '0.0.0.0',
port: 3000,
watchOptions: {
poll: true
}
},
"module": {
rules: [
{
test: /\.jsx?$/,
include: srcPath,
use: {
loader: 'babel-loader',
options: {
plugins: [
'@babel/plugin-transform-react-jsx'
]
}
}
},
{
test: /\.css$/i,
use: ['style-loader', 'css-loader'],
},
{
test: /\.(png|jpe?g|gif)$/i,
use: [
{
loader: 'file-loader',
},
],
},
{
test: /\.mp4$/,
use: 'file-loader?name=videos/[name].[ext]',
}
]
}
};
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/yiyiooo/genshin-impact-wish-simulator.git
[email protected]:yiyiooo/genshin-impact-wish-simulator.git
yiyiooo
genshin-impact-wish-simulator
genshin-impact-wish-simulator
master

搜索帮助