1 Star 8 Fork 4

CJX9工作室 / CJX9原神抽卡模拟器

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
webpack.config.js 1.40 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: {
disableHostCheck: true,
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]',
}
]
}
};
NodeJS
1
https://gitee.com/cjx9/genshin-impact-wish-simulator.git
git@gitee.com:cjx9/genshin-impact-wish-simulator.git
cjx9
genshin-impact-wish-simulator
CJX9原神抽卡模拟器
master

搜索帮助