1 Star 0 Fork 0

Ethan/Electron-React-Antd-Webpack-boilerplate

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
webpack.config.js 1.66 KB
一键复制 编辑 原始数据 按行查看 历史
Ethan 提交于 2017-07-18 16:51 . 0.1.0
var path = require('path');
module.exports = {
target: 'electron',
devtool: 'eval', //source-map
watch:'true',
context: __dirname,
entry: {
app: './src/entry'
},
output: {
path: path.resolve(__dirname, "src-app"),
filename: './view/bundle.js',
},
module: {
rules: [
{
test: /\.js|\.jsx?$/,
loader: 'babel-loader',
include: [
path.resolve(__dirname, "src")
],
exclude: [
path.resolve(__dirname, "node_modules")
],
options: {
presets: ["es2015", 'stage-0', "react"],
plugins: [
/* ['react-transform', {
transforms: [{
transform: 'react-transform-hmr',
imports: ['react'],
locals: ['module']
}, {
transform: 'react-transform-catch-errors',
imports: ['react', 'redbox-react']
}]
}], */
//["transform-decorators-legacy"],
//["transform-flow-strip-types"], //强类型
["import", { "libraryName": "antd", "style": true }]
],
},
},
{ test: /\.css$/, loader: 'style-loader!css-loader' },
{ test: /\.less$/, loader: 'style-loader!css-loader!less-loader' }
]
},
plugins: []
};
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
JavaScript
1
https://gitee.com/ethan1788/Electron-React-Antd-Webpack-boilerplate.git
[email protected]:ethan1788/Electron-React-Antd-Webpack-boilerplate.git
ethan1788
Electron-React-Antd-Webpack-boilerplate
Electron-React-Antd-Webpack-boilerplate
master

搜索帮助