12345678910111213141516171819202122232425262728293031323334353637383940414243 |
- /*
- * @Author: lf
- * @Date: 2022-09-28 18:56:09
- * @LastEditors: lf
- * @LastEditTime: 2022-09-29 09:55:03
- * @FilePath: \abc\vue.config.js
- * @Description:
- * @custom_string_lf: 你可以期待太阳从东方升起,而风却随心所欲地从四面八方吹来。 --萨特
- */
- const path = require('path')
- function resolve (dir) {
- return path.join(__dirname, dir)
- }
- module.exports = {
- transpileDependencies: [/node_modules[/\\\\](.*)[/\\\\]/,"sock-js","sockjs-client"],
- // 配置css
- css: {
- // 是否使用css分离插件 ExtractTextPlugin
- // extract: process.env.NODE_ENV === 'production',
- sourceMap: true,
- },
- pluginOptions: {
- 'style-resources-loader': {
- preProcessor: 'scss',
- patterns: [
- resolve('src/style/mixins/mixins.scss'),
- resolve('src/style/mixins.scss'),
- resolve('src/style/variables.scss'),
- ],
- },
- },
- chainWebpack: (config) => {
- // 配置别名
- config.resolve.alias
- .set('@', resolve('src'))
- .set('assets', resolve('src/assets'))
- .set('style', resolve('src/style'))
- .set('plugin', resolve('src/plugin'))
- .set('components', resolve('src/components'))
- config.entry('main').add('babel-polyfill')
- },
- }
|