1 Star 0 Fork 25

刘坤/kscreenshot

forked from kejiacheng/kscreenshot 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
webpack.config.js 1.17 KB
一键复制 编辑 原始数据 按行查看 历史
kejiacheng 提交于 2018-07-04 11:59 . 通过webpack引入样式
const webpack = require('webpack')
const HtmlWebpackPlugin = require('html-webpack-plugin')
const CopyWebpackPlugin = require('copy-webpack-plugin')
const path = require('path')
const srcPath = path.join(__dirname, './src')
const distPath = path.join(__dirname, './dist')
const webpackConfig = {
entry: {
kss: [path.join(srcPath, './kss.js')]
},
output: {
path: distPath,
publicPath: './',
library: 'kscreenshot',
libraryTarget: 'umd',
libraryExport: 'default'
},
devtool: 'inline-source-map',
module: {
rules: [
{
test: /\.js$/,
include: [
path.resolve(__dirname, 'src')
],
loader: 'babel-loader'
},
{
test: /\.(png|jpg|gif|ico|svg|woff)$/,
loader: 'url-loader'
},
{
test: /\.css$/,
loader: 'style-loader!css-loader'
},
{
test: /\.scss$/,
loader: 'style-loader!css-loader!sass-loader'
}
]
}
}
module.exports = webpackConfig
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
JavaScript
1
https://gitee.com/kunger309/kscreenshot.git
git@gitee.com:kunger309/kscreenshot.git
kunger309
kscreenshot
kscreenshot
master

搜索帮助

23e8dbc6 1850385 7e0993f3 1850385