123456789101112131415161718192021222324252627282930313233343536373839404142434445 |
- const path = require('path');
- function resolve(dir) {
- return path.join(__dirname, dir)
- }
- module.exports = {
- publicPath: "./", // 默认'/',部署应用包时的基本 URL
- indexPath: 'index.html', // 相对于打包路径index.html的路径
- outputDir: 'dist', // 'dist', 生产环境构建文件的目录
- assetsDir: 'static', // 相对于outputDir的静态资源(js、css、img、fonts)目录
- lintOnSave: true, // 是否在开发环境下通过 eslint-loader 在每次保存时 lint 代码
- runtimeCompiler: true, // 是否使用包含运行时编译器的 Vue 构建版本
- chainWebpack: (config) => {
- config.resolve.alias
- .set('@$', resolve('src'))
- .set('assets', resolve('src/assets'))
- .set('components', resolve('src/components'))
- .set('layout', resolve('src/layout'))
- .set('base', resolve('src/base'))
- .set('static', resolve('src/static'))
- .set("api", resolve("src/api"))
- .set("utils", resolve("src/utils"))
- .set("views", resolve("src/views"))
- .set("styles", resolve("src/assets/styles"))
- .set("img", resolve("src/assets/img"))
- .set("icons", resolve("src/assets/icons"))
- .set("router", resolve("src/router"))
- },
- configureWebpack: {
- devtool: 'source-map'
- },
- pluginOptions: {
- electronBuilder: {
- nodeIntegration: true,
- builderOptions: {
- appId: 'com.neic.gyee',
- win: {
- icon: 'src/assets/img/logo.ico'
- },
- linux: {
- }
- }
- }
- }
- }
|