1 Star 0 Fork 0

moxun/electron-react-mobx-boilerplate

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
webpack.config.base.js 1.50 KB
一键复制 编辑 原始数据 按行查看 历史
/**
* Base webpack config used across other specific configs
*/
import path from 'path';
import webpack from 'webpack';
import { dependencies as externals } from './app/package.json';
export default {
externals: Object.keys(externals || {}),
module: {
rules: [{
test: /\.jsx?$/,
exclude: /node_modules/,
use: {
loader: 'babel-loader',
options: {
cacheDirectory: true
}
}
}]
},
output: {
path: path.join(__dirname, 'app'),
// https://github.com/webpack/webpack/issues/1114
libraryTarget: 'commonjs2'
},
/**
* Determine the array of extensions that should be used to resolve modules.
*/
resolve: {
alias: {
pages: path.join(__dirname, 'app/src/pages'),
components: path.join(__dirname, 'app/src/components'),
router: path.join(__dirname, 'app/src/router'),
stores: path.join(__dirname, 'app/src/stores'),
constants: path.join(__dirname, 'app/src/constants'),
services: path.join(__dirname, 'app/src/services'),
utils: path.join(__dirname, 'app/src/utils'),
assets: path.join(__dirname, 'app/src/assets'),
theme: path.join(__dirname, 'app/src/theme'),
static: path.join(__dirname, 'app/src/static'),
},
extensions: ['.js', '.jsx', '.json'],
modules: [
path.join(__dirname, 'app'),
'node_modules',
],
},
plugins: [
new webpack.EnvironmentPlugin({
NODE_ENV: 'production'
}),
new webpack.NamedModulesPlugin(),
],
};
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
JavaScript
1
https://gitee.com/moxun.net/electron-react-mobx-boilerplate.git
git@gitee.com:moxun.net/electron-react-mobx-boilerplate.git
moxun.net
electron-react-mobx-boilerplate
electron-react-mobx-boilerplate
master

搜索帮助