1 Star 0 Fork 0

vilson / yike.io

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
vue.config.js 3.26 KB
一键复制 编辑 原始数据 按行查看 历史
overtrue 提交于 2018-10-07 11:26 . Simplify HTTP client. #1
const fs = require('fs')
const path = require('path')
module.exports = {
// Project deployment base
// By default we assume your app will be deployed at the root of a domain,
// e.g. https://www.my-app.com/
// If your app is deployed at a sub-path, you will need to specify that
// sub-path here. For example, if your app is deployed at
// https://www.foobar.com/my-app/
// then change this to '/my-app/'
baseUrl: '/',
// where to output built files
outputDir: 'dist',
// where to put static assets (js/css/img/font/...)
// assetsDir: '',
// whether to use eslint-loader for lint on save.
// valid values: true | false | 'error'
// when set to 'error', lint errors will cause compilation to fail.
lintOnSave: true,
// use the full build with in-browser compiler?
// https://vuejs.org/v2/guide/installation.html#Runtime-Compiler-vs-Runtime-only
runtimeCompiler: false,
// babel-loader skips `node_modules` deps by default.
// explicitly transpile a dependency with this option.
transpileDependencies: [/* string or regex */],
// generate sourceMap for production build?
productionSourceMap: true,
// tweak internal webpack configuration.
// see https://github.com/vuejs/vue-cli/blob/dev/docs/webpack.md
chainWebpack: () => {},
configureWebpack: () => {
return {
resolve: {
alias: {
'@modules': path.resolve(__dirname, 'src/modules'),
'@plugins': path.resolve(__dirname, 'src/plugins'),
'@utils': path.resolve(__dirname, 'src/utils'),
'@components': path.resolve(__dirname, 'src/components'),
'@assets': path.resolve(__dirname, 'src/assets'),
'@sass': path.resolve(__dirname, 'src/assets/sass'),
'@icons': path.resolve(__dirname, 'node_modules/vue-material-design-icons'),
'@config': path.resolve(__dirname, 'src/config'),
'@root': path.resolve(__dirname, 'src/')
},
extensions: [
'.vue'
]
}
}
},
// CSS related options
css: {
// extract CSS in components into a single CSS file (only in production)
// can also be an object of options to pass to extract-text-webpack-plugin
extract: true,
// enable CSS source maps?
sourceMap: false,
// pass custom options to pre-processor loaders. e.g. to pass options to
// sass-loader, use { sass: { ... } }
loaderOptions: {
sass: {
data: fs.readFileSync('src/assets/sass/_variables.scss', 'utf-8')
}
}
// Enable CSS modules for all css / pre-processor files.
// This option does not affect *.vue files.
// modules: false
},
// use thread-loader for babel & TS in production build
// enabled by default if the machine has more than 1 cores
parallel: require('os').cpus().length > 1,
// options for the PWA plugin.
// see https://github.com/vuejs/vue-cli/tree/dev/packages/%40vue/cli-plugin-pwa
pwa: {},
// configure webpack-dev-server behavior
devServer: {
open: process.platform === 'darwin',
host: '0.0.0.0',
port: 8081,
https: false,
hotOnly: false,
// See https://github.com/vuejs/vue-cli/blob/dev/docs/cli-service.md#configuring-proxy
proxy: null, // string | Object
before: app => {}
},
// options for 3rd party plugins
pluginOptions: {
}
}
JavaScript
1
https://gitee.com/vilson/yike.io.git
git@gitee.com:vilson/yike.io.git
vilson
yike.io
yike.io
master

搜索帮助