Skip to content
This repository has been archived by the owner on Mar 7, 2024. It is now read-only.

Commit

Permalink
fix: 修复 windows 下 @remax/plugin-error-screen 加载失败的问题
Browse files Browse the repository at this point in the history
close #1388
close #1390
  • Loading branch information
yesmeck committed Nov 28, 2020
1 parent 6c7c2ae commit 80d5e41
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
1 change: 1 addition & 0 deletions packages/remax-plugin-error-screen/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
},
"dependencies": {
"@remax/redbox-react": "^1.0.0",
"@remax/shared": "^2.9.1",
"webpack-virtual-modules": "^0.3.1"
},
"devDependencies": {
Expand Down
5 changes: 3 additions & 2 deletions packages/remax-plugin-error-screen/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import * as path from 'path';
import * as fs from 'fs';
import VirtualModulesPlugin from 'webpack-virtual-modules';
import { slash } from '@remax/shared';

export default (_: any, { cwd, rootDir }: { cwd: string; rootDir: string }) => {
const searchCustomErrorFile = () => {
Expand All @@ -26,8 +27,8 @@ export default (_: any, { cwd, rootDir }: { cwd: string; rootDir: string }) => {
'node_modules/@remax/plugin-error-screen/runtime.js': `
import React from 'react';
import { View } from 'remax/one';
import ErrorScreen from '${errorScreenFile}';
import ErrorBoundary from '${errorBoundaryFile}';
import ErrorScreen from '${slash(errorScreenFile)}';
import ErrorBoundary from '${slash(errorBoundaryFile)}';
export default {
onPageComponent({ component }) {
Expand Down

1 comment on commit 80d5e41

@vercel
Copy link

@vercel vercel bot commented on 80d5e41 Nov 28, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.