1 Star 0 Fork 248

lopezycj/xuanxuan

forked from easysoft/xuanxuan 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
webpack.config.debug.js 1.97 KB
一键复制 编辑 原始数据 按行查看 历史
Catouse 提交于 2017-02-23 13:53 . * change debug build config.
/**
* Build config for electron 'Renderer Process' file
*/
import path from 'path';
import webpack from 'webpack';
import validate from 'webpack-validator';
import ExtractTextPlugin from 'extract-text-webpack-plugin';
import merge from 'webpack-merge';
import HtmlWebpackPlugin from 'html-webpack-plugin';
import baseConfig from './webpack.config.base';
export default validate(merge(baseConfig, {
debug: true,
devtool: 'inline-source-map',
entry: {
bundle: [
'babel-polyfill',
'./app/index'
],
"capture-screen": [
'babel-polyfill',
'./app/views/windows/capture-screen'
]
},
output: {
path: path.join(__dirname, 'app/dist'),
publicPath: '../dist/',
filename: '[name].js',
},
module: {
loaders: [
// Extract all .global.css to style.css as is
{
test: /\.global\.css$/,
loader: ExtractTextPlugin.extract(
'style-loader',
'css-loader',
'postcss-loader'
)
},
// Pipe other styles through css modules and append to style.css
{
test: /^((?!\.global).)*\.css$/,
loader: ExtractTextPlugin.extract(
'style-loader',
'css-loader'
)
},
{
test: /\.less$/,
loader: ExtractTextPlugin.extract("style-loader", "css-loader!less-loader")
},
// Images
{
test: /\.(?:ico|gif|png|jpg|jpeg|webp)$/,
loader: 'url-loader'
}
]
},
plugins: [
// NODE_ENV should be production so that modules do not perform certain development checks
new webpack.DefinePlugin({
DEBUG: true,
'process.env.NODE_ENV': JSON.stringify('debug')
}),
new ExtractTextPlugin('style.css', { allChunks: true }),
new HtmlWebpackPlugin({
filename: '../app.html',
template: 'app/app.html',
inject: false
})
],
// https://github.com/chentsulin/webpack-target-electron-renderer#how-this-module-works
target: 'electron-renderer'
}));
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
NodeJS
1
https://gitee.com/lopezycj/xuanxuan.git
git@gitee.com:lopezycj/xuanxuan.git
lopezycj
xuanxuan
xuanxuan
master

搜索帮助