diff --git a/packages/create-fes-app/templates/app/h5/.npmrc b/packages/create-fes-app/templates/app/h5/.npmrc index 276285cd..6fdb9ae1 100644 --- a/packages/create-fes-app/templates/app/h5/.npmrc +++ b/packages/create-fes-app/templates/app/h5/.npmrc @@ -1 +1,3 @@ -public-hoist-pattern[]=@babel/* \ No newline at end of file +public-hoist-pattern[]=@babel/* +# 使用pnpm必须加上 +shamefully-hoist=true \ No newline at end of file diff --git a/packages/create-fes-app/templates/app/h5/index.html b/packages/create-fes-app/templates/app/h5/index.html index e2beb916..2eba5629 100644 --- a/packages/create-fes-app/templates/app/h5/index.html +++ b/packages/create-fes-app/templates/app/h5/index.html @@ -17,7 +17,7 @@ -
+
diff --git a/packages/create-fes-app/templates/app/h5/src/app.js b/packages/create-fes-app/templates/app/h5/src/app.js index 140e25e5..d508ce12 100644 --- a/packages/create-fes-app/templates/app/h5/src/app.js +++ b/packages/create-fes-app/templates/app/h5/src/app.js @@ -2,6 +2,6 @@ export const request = { errorConfig: { 404() { console.log('to 404 page'); - } - } + }, + }, }; diff --git a/packages/create-fes-app/templates/app/pc/.eslintrc.js b/packages/create-fes-app/templates/app/pc/.eslintrc.js index 6300816f..fa1e7f3b 100644 --- a/packages/create-fes-app/templates/app/pc/.eslintrc.js +++ b/packages/create-fes-app/templates/app/pc/.eslintrc.js @@ -2,13 +2,10 @@ module.exports = { extends: ['@webank/eslint-config-webank/vue.js'], overrides: [ { - files: [ - '**/__tests__/*.{j,t}s?(x)', - '**/tests/unit/**/*.spec.{j,t}s?(x)' - ] - } + files: ['**/__tests__/*.{j,t}s?(x)', '**/tests/unit/**/*.spec.{j,t}s?(x)'], + }, ], env: { - jest: true - } + jest: true, + }, }; diff --git a/packages/create-fes-app/templates/app/pc/.npmrc b/packages/create-fes-app/templates/app/pc/.npmrc index 276285cd..6fdb9ae1 100644 --- a/packages/create-fes-app/templates/app/pc/.npmrc +++ b/packages/create-fes-app/templates/app/pc/.npmrc @@ -1 +1,3 @@ -public-hoist-pattern[]=@babel/* \ No newline at end of file +public-hoist-pattern[]=@babel/* +# 使用pnpm必须加上 +shamefully-hoist=true \ No newline at end of file diff --git a/packages/create-fes-app/templates/app/pc/index.html b/packages/create-fes-app/templates/app/pc/index.html index 8520c0ec..34868378 100644 --- a/packages/create-fes-app/templates/app/pc/index.html +++ b/packages/create-fes-app/templates/app/pc/index.html @@ -1,12 +1,17 @@ + - fes.js + + <%= title %> + + -
+
- + + \ No newline at end of file diff --git a/packages/create-fes-app/templates/app/pc/src/app.js b/packages/create-fes-app/templates/app/pc/src/app.jsx similarity index 72% rename from packages/create-fes-app/templates/app/pc/src/app.js rename to packages/create-fes-app/templates/app/pc/src/app.jsx index e5f951c1..fddc4f9e 100644 --- a/packages/create-fes-app/templates/app/pc/src/app.js +++ b/packages/create-fes-app/templates/app/pc/src/app.jsx @@ -1,8 +1,6 @@ - - import { access } from '@fesjs/fes'; -import PageLoading from '@/components/PageLoading'; -import UserCenter from '@/components/UserCenter'; +import PageLoading from '@/components/PageLoading.vue'; +import UserCenter from '@/components/UserCenter.vue'; export const beforeRender = { loading: , @@ -13,13 +11,13 @@ export const beforeRender = { setRole('admin'); // 初始化应用的全局状态,可以通过 useModel('@@initialState') 获取,具体用法看@/components/UserCenter 文件 resolve({ - userName: '李雷' + userName: '李雷', }); }, 1000); }); - } + }, }; export const layout = { - customHeader: + customHeader: , };