代码拉取完成,页面将自动刷新
同步操作将从 WeBank/Scriptis 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
// vue.config.js
let CopyWebpackPlugin = require('copy-webpack-plugin')
let FileManagerPlugin = require('filemanager-webpack-plugin');
let path = require('path')
let fs = require('fs');
const getVersion = () => {
const pkgPath = path.join(__dirname, './package.json');
let pkg = fs.readFileSync(pkgPath);
pkg = JSON.parse(pkg);
return pkg.version;
}
module.exports = {
outputDir: 'dist/dist',
chainWebpack: (config) => {
if (process.env.NODE_ENV === 'production') {
config.plugin('compress').use(FileManagerPlugin, [{
onEnd: {
copy: [
{ source: 'node_modules/monaco-editor/dev/vs', destination: `./dist/dist/static/vs` },
{ source: './config.sh', destination: `./dist` },
{ source: './install.sh', destination: `./dist` }
],
// 先删除根目录下的zip包
delete: [`./wedatasphere-scriptis-${getVersion()}-dist.zip`],
// 将dist文件夹下的文件进行打包
archive: [
{ source: './dist', destination: `./wedatasphere-scriptis-${getVersion()}-dist.zip` },
]
},
}])
}
},
configureWebpack: {
resolve: {
alias: {
'vue$': 'vue/dist/vue.esm.js',
'@': path.resolve(__dirname, './src'),
'@js': path.resolve(__dirname, './src/js'),
'@assets': path.resolve(__dirname, './src/assets')
}
},
plugins: [
new CopyWebpackPlugin([{
from: 'node_modules/monaco-editor/dev/vs',
to: 'static/vs',
}]),
]
},
// 选项...
pluginOptions: {
mock: {
entry: 'mock.js',
power: false
}
}
}
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。