mirror of
https://gitee.com/dcloud/uni-preset-vue
synced 2025-04-27 15:30:11 +08:00
feat: support @vue/cli@5
This commit is contained in:
parent
6288a93e7b
commit
7d481b4a89
@ -2,13 +2,13 @@
|
||||
"useConfigFiles": false,
|
||||
"plugins": {
|
||||
"@dcloudio/vue-cli-plugin-uni": {
|
||||
"version": "^2.0.1-32920211122002"
|
||||
"version": "^2.0.1-alpha-35420220810001"
|
||||
},
|
||||
"@dcloudio/vue-cli-plugin-uni-optimize": {
|
||||
"version": "^2.0.1-32920211122002"
|
||||
"version": "^2.0.1-alpha-35420220810001"
|
||||
},
|
||||
"@dcloudio/vue-cli-plugin-hbuilderx": {
|
||||
"version": "^2.0.1-32920211122002"
|
||||
"version": "^2.0.1-alpha-35420220810001"
|
||||
},
|
||||
"@vue/cli-plugin-babel": {
|
||||
"presets": [
|
||||
|
@ -1,3 +1,4 @@
|
||||
const webpack = require('webpack')
|
||||
const plugins = []
|
||||
|
||||
if (process.env.UNI_OPT_TREESHAKINGNG) {
|
||||
@ -34,7 +35,7 @@ if (
|
||||
}
|
||||
}
|
||||
])
|
||||
} catch (e) {}
|
||||
} catch (e) { }
|
||||
}
|
||||
|
||||
process.UNI_LIBRARIES = process.UNI_LIBRARIES || ['@dcloudio/uni-ui']
|
||||
@ -55,7 +56,7 @@ const config = {
|
||||
[
|
||||
'@vue/app',
|
||||
{
|
||||
modules: 'commonjs',
|
||||
modules: webpack.version[0] > 4 ? 'auto' : 'commonjs',
|
||||
useBuiltIns: process.env.UNI_PLATFORM === 'h5' ? 'usage' : 'entry'
|
||||
}
|
||||
]
|
||||
|
@ -1,6 +1,6 @@
|
||||
const path = require('path')
|
||||
module.exports = {
|
||||
parser: require('postcss-comment'),
|
||||
const webpack = require('webpack')
|
||||
const config = {
|
||||
plugins: [
|
||||
require('postcss-import')({
|
||||
resolve (id, basedir, importOptions) {
|
||||
@ -20,3 +20,7 @@ module.exports = {
|
||||
require('@dcloudio/vue-cli-plugin-uni/packages/postcss')
|
||||
]
|
||||
}
|
||||
if (webpack.version[0] <= 4) {
|
||||
options.parser = require('postcss-comment')
|
||||
}
|
||||
module.exports = config
|
||||
|
Loading…
x
Reference in New Issue
Block a user