Skip to content

Commit a97852a

Browse files
committed
feat: deploy 4.0.8
1 parent d1029b9 commit a97852a

File tree

4 files changed

+1187
-1073
lines changed

4 files changed

+1187
-1073
lines changed

package.json

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "pri",
3-
"version": "4.0.6",
3+
"version": "4.0.8",
44
"types": "src/node/index.ts",
55
"main": "built/node/index.js",
66
"scripts": {
@@ -138,14 +138,14 @@
138138
"socket.io": "2.3.0",
139139
"socket.io-client": "2.3.0",
140140
"style-loader": "1.0.1",
141-
"typescript": "3.7.3",
141+
"typescript": "3.7.5",
142142
"update-notifier": "3.0.1",
143143
"url-join": "4.0.1",
144144
"url-loader": "3.0.0",
145145
"walk": "2.3.14",
146-
"webpack": "4.41.2",
146+
"webpack": "4.41.5",
147147
"webpack-bundle-analyzer": "3.6.0",
148-
"webpack-dev-server": "3.9.0",
148+
"webpack-dev-server": "3.10.1",
149149
"webpack-node-externals": "1.7.2",
150150
"webpack-sources": "1.4.3",
151151
"webpackbar": "4.0.0",

src/built-in-plugins/project-analyse-pages/plugin/index.ts

+4-7
Original file line numberDiff line numberDiff line change
@@ -51,13 +51,13 @@ pri.project.onAnalyseProject(files => {
5151
return true;
5252
})
5353
.map(file => {
54-
const relativePathWithoutIndex = path.relative(pri.projectRootPath, file.dir);
54+
const relativePathWithoutIndex = path.relative(pri.sourceRoot, file.dir);
5555
const routerPath = normalizePath(
5656
`/${path.relative(path.join(pri.sourceRoot, pagesPath.dir), relativePathWithoutIndex)}`,
5757
);
5858
const chunkName = _.camelCase(routerPath) || 'index';
5959

60-
const relativePageFilePath = path.relative(pri.projectRootPath, `${file.dir}/${file.name}`);
60+
const relativePageFilePath = path.relative(pri.sourceRoot, `${file.dir}/${file.name}`);
6161
const componentName = safeName(relativePageFilePath) + md5(relativePageFilePath).slice(0, 5);
6262

6363
return {
@@ -91,7 +91,7 @@ pri.project.onAnalyseProject(files => {
9191
.map((route, index) => {
9292
if (route.component) {
9393
const componentFile = files.find(file => {
94-
const relativePath = path.relative(pri.projectRootPath, path.join(file.dir, file.name));
94+
const relativePath = path.relative(pri.sourceRoot, path.join(file.dir, file.name));
9595
return (
9696
(route.component === relativePath && !file.isDir && ['.tsx', '.md', '.mdx'].indexOf(file.ext) > -1) ||
9797
(path.join(route.component, 'index') === relativePath &&
@@ -107,10 +107,7 @@ pri.project.onAnalyseProject(files => {
107107
const routerPath = route.path;
108108
const chunkName = _.camelCase(routerPath) || 'index';
109109

110-
const relativePageFilePath = path.relative(
111-
pri.projectRootPath,
112-
`${componentFile.dir}/${componentFile.name}`,
113-
);
110+
const relativePageFilePath = path.relative(pri.sourceRoot, `${componentFile.dir}/${componentFile.name}`);
114111
const componentName = safeName(relativePageFilePath) + md5(relativePageFilePath).slice(0, 5);
115112

116113
return {

src/utils/webpack-config.ts

+1
Original file line numberDiff line numberDiff line change
@@ -270,6 +270,7 @@ export const getWebpackConfig = async (opts: IOptions) => {
270270
],
271271
},
272272
resolve: {
273+
modules: selfAndProjectNodeModules,
273274
alias: {
274275
// Src alias to ./src
275276
...(globalState.sourceConfig.type === 'project' && {

0 commit comments

Comments
 (0)