|
|
@@ -1,53 +1,53 @@
|
|
|
-const { defineConfig } = require('@vue/cli-service')
|
|
|
-const proxy = require('./config/proxy.ts')
|
|
|
-const path = require('path')
|
|
|
-const { resolve } = require('path')
|
|
|
-const { BundleAnalyzerPlugin } = require('webpack-bundle-analyzer')
|
|
|
-const packageName = require('./package.json').name
|
|
|
-
|
|
|
-module.exports = defineConfig({
|
|
|
- // publicPath: '',
|
|
|
- transpileDependencies: true,
|
|
|
- devServer: {
|
|
|
- proxy: proxy.dev,
|
|
|
- headers: {
|
|
|
- 'Access-Control-Allow-Origin': '*'
|
|
|
- },
|
|
|
- port: 10800
|
|
|
- },
|
|
|
- pluginOptions: {
|
|
|
- 'style-resources-loader': {
|
|
|
- preProcessor: 'less',
|
|
|
- patterns: [
|
|
|
- path.resolve(__dirname, '@/src/styes/*.less')
|
|
|
- ]
|
|
|
- }
|
|
|
- },
|
|
|
- chainWebpack: config => {
|
|
|
- config.resolve.alias
|
|
|
- .set('ThingsUi', resolve(__dirname, '/'))
|
|
|
- .set('AppConfig', resolve(__dirname, './config/defaultSetting'))
|
|
|
- config.stats('none')
|
|
|
- config.mode('development')
|
|
|
- },
|
|
|
- configureWebpack: {
|
|
|
- plugins: [
|
|
|
- // new BundleAnalyzerPlugin()
|
|
|
- ],
|
|
|
- output: {
|
|
|
- library: `${packageName}`,
|
|
|
- libraryTarget: 'umd',
|
|
|
- // libraryTarget: 'window',
|
|
|
- chunkLoadingGlobal: `webpackJsonp_${packageName}`
|
|
|
- }
|
|
|
- },
|
|
|
- css: {
|
|
|
- loaderOptions: {
|
|
|
- less: {
|
|
|
- lessOptions: {
|
|
|
- javascriptEnabled: true
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
-})
|
|
|
+const { defineConfig } = require('@vue/cli-service')
|
|
|
+const proxy = require('./config/proxy.ts')
|
|
|
+const path = require('path')
|
|
|
+const { resolve } = require('path')
|
|
|
+const { BundleAnalyzerPlugin } = require('webpack-bundle-analyzer')
|
|
|
+const packageName = require('./package.json').name
|
|
|
+
|
|
|
+module.exports = defineConfig({
|
|
|
+ // publicPath: process.env.NODE_ENV === 'development' ? '' : '',
|
|
|
+ publicPath: process.env.NODE_ENV === 'development' ? './' : '/child/cloudlink/',
|
|
|
+ transpileDependencies: true,
|
|
|
+ devServer: {
|
|
|
+ proxy: proxy.dev,
|
|
|
+ headers: {
|
|
|
+ 'Access-Control-Allow-Origin': '*'
|
|
|
+ },
|
|
|
+ port: 10800
|
|
|
+ },
|
|
|
+ pluginOptions: {
|
|
|
+ 'style-resources-loader': {
|
|
|
+ preProcessor: 'less',
|
|
|
+ patterns: [
|
|
|
+ path.resolve(__dirname, '@/src/styes/*.less')
|
|
|
+ ]
|
|
|
+ }
|
|
|
+ },
|
|
|
+ chainWebpack: config => {
|
|
|
+ config.resolve.alias
|
|
|
+ .set('ThingsUi', resolve(__dirname, '/'))
|
|
|
+ .set('AppConfig', resolve(__dirname, './config/defaultSetting'))
|
|
|
+ config.stats('none')
|
|
|
+ config.mode('development')
|
|
|
+ },
|
|
|
+ configureWebpack: {
|
|
|
+ plugins: [
|
|
|
+ // new BundleAnalyzerPlugin()
|
|
|
+ ],
|
|
|
+ output: {
|
|
|
+ library: `${packageName}`,
|
|
|
+ libraryTarget: 'umd',
|
|
|
+ chunkLoadingGlobal: `webpackJsonp_${packageName}`
|
|
|
+ }
|
|
|
+ },
|
|
|
+ css: {
|
|
|
+ loaderOptions: {
|
|
|
+ less: {
|
|
|
+ lessOptions: {
|
|
|
+ javascriptEnabled: true
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+})
|