Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

从1.x升级到2.x 运行时babel报错 #873

Open
Bigpawn opened this issue Jul 2, 2019 · 0 comments
Open

从1.x升级到2.x 运行时babel报错 #873

Bigpawn opened this issue Jul 2, 2019 · 0 comments

Comments

@Bigpawn
Copy link

Bigpawn commented Jul 2, 2019

image
`const path = require('path')
const { version } = require('./package.json')

module.exports = {
html: {
template: './src/entry.ejs'
},
entry: 'src/index.js',
theme: './theme.config.js',
publicPath: /${version}/,
outputPath: ./dist/${version},
// 接口代理示例
proxy: {
'/': {
'target': 'http://154.8.213.251:8081',
'changeOrigin': true
},
'/api/v1/weather': {
'target': 'https://api.seniverse.com/',
'changeOrigin': true,
'pathRewrite': { '^/api/v1/weather': '/v3/weather' },
},
// "/api/v2": {
// "target": "http://192.168.0.110",
// "changeOrigin": true,
// "pathRewrite": { "^/api/v2" : "/api/v2" }
// }
},
env: {
development: {
extraBabelPlugins: [
'dva-hmr',
'transform-decorators-legacy',
[
'import', {
'libraryName': 'antd',
'style': true,
},
],
],
},
production: {
extraBabelPlugins: [
'transform-runtime',
'transform-decorators-legacy',
[
'import', {
'libraryName': 'antd',
'style': true,
},
],
],
},
},
dllPlugin: {
exclude: ['babel-runtime', 'roadhog', 'cross-env'],
include: ['dva/router', 'dva/saga', 'dva/fetch'],
},
}
`

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant