1 Star 5 Fork 2

bingo_ying/website-navigation

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
webpack.common.js 911 Bytes
一键复制 编辑 原始数据 按行查看 历史
bingo_ying 提交于 2021-01-05 15:56 . fix:修复若干bug
const path = require('path')
// const webpack = require('webpack'); //访问内置的插件
const CopyWebpackPlugin = require('copy-webpack-plugin')
module.exports = {
entry: {
index: './src/main.jsx'
},
mode: 'development',
output: {
chunkFilename: "js/[name].js",
path: path.resolve(__dirname, './docs'),
filename: '[name].js'
},
module: {
rules: [
{
test: /\.m?jsx$/,
exclude: /(node_modules|bower_components)/,
use: {
loader: 'babel-loader',
options: {
presets: ['@babel/preset-env']
}
}
}
]
},
plugins: [
// new webpack.optimize.UglifyJsPlugin(),
new CopyWebpackPlugin(
{
patterns: [
{
from: path.resolve(__dirname, './public'),
to: path.resolve(__dirname, './docs'),
globOptions:{
ignore: ['**.html']
}
}
]
}
)
],
resolve: {
extensions: ['.jsx', '.mjs', '.js', '.json']
}
}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
JavaScript
1
https://gitee.com/bingoYYY/website-navigation.git
[email protected]:bingoYYY/website-navigation.git
bingoYYY
website-navigation
website-navigation
master

搜索帮助