1 Star 0 Fork 0

Repetition/cxmooc-tools

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
webpack.config.js 1.21 KB
一键复制 编辑 原始数据 按行查看 历史
幻令 提交于 2020-10-26 18:34 . 优化配置页面
const path = require('path');
const htmlWebpackPlugin = require('html-webpack-plugin');
const home = __dirname + '/src';
module.exports = {
entry: {
mooc: home + '/mooc.ts',
start: home + '/start.ts',
background: home + '/background.ts',
popup: home + '/views/popup.ts'
},
output: {
path: __dirname + '/build/cxmooc-tools/src',
filename: '[name].js'
},
plugins: [
new htmlWebpackPlugin({
filename: __dirname + '/build/cxmooc-tools/src/popup.html',
template: home + '/views/popup.html',
inject: 'head',
title: '弹出页面',
minify: {
removeComments: true
},
chunks: ['popup']
})
],
module: {
rules: [
{
test: /\.css$/,
use: ['style-loader', 'css-loader'],
}, {
test: /\.ts$/,
use: 'ts-loader',
exclude: /node_modules/,
}
]
},
resolve: {
extensions: ['.ts', '.js'],
alias: {
"@App": path.resolve(__dirname, 'src/'),
'vue': 'vue/dist/vue.esm.js'
}
}
};
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/repe/cxmooc-tools.git
git@gitee.com:repe/cxmooc-tools.git
repe
cxmooc-tools
cxmooc-tools
master

搜索帮助