-
Notifications
You must be signed in to change notification settings - Fork 70
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #992 from raxjs/hotfix/3.8.15
hotfix: v3.8.15
- Loading branch information
Showing
20 changed files
with
79 additions
and
44 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -26,4 +26,4 @@ | |
"dependencies": { | ||
"camelcase": "^3.0.0" | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,4 +17,4 @@ | |
"cross-spawn": "7.0.1" | ||
}, | ||
"homepage": "https://github.com/raxjs/rax-scripts#readme" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
{ | ||
"name": "build-plugin-rax-app", | ||
"version": "7.0.8", | ||
"version": "7.0.9", | ||
"description": "The basic webpack configuration for rax project", | ||
"author": "Rax Team", | ||
"main": "lib/index.js", | ||
|
@@ -18,8 +18,8 @@ | |
], | ||
"license": "MIT", | ||
"dependencies": { | ||
"rax-webpack-config": "^3.0.4", | ||
"rax-babel-config": "^2.0.0", | ||
"rax-webpack-config": "^3.0.5", | ||
"rax-babel-config": "^2.0.2", | ||
"rax-jest-config": "^1.1.0", | ||
"rax-platform-loader": "^1.1.1", | ||
"@builder/user-config": "^2.0.0", | ||
|
@@ -44,12 +44,12 @@ | |
"process": "^0.11.10", | ||
"events": "^3.3.0", | ||
"node-libs-browser": "^2.2.1", | ||
"@builder/pack": "^0.5.2", | ||
"@builder/pack": "^0.6.0", | ||
"@builder/swc-loader": "^1.0.1" | ||
}, | ||
"repository": { | ||
"type": "git", | ||
"url": "[email protected]:raxjs/rax-app.git" | ||
}, | ||
"gitHead": "07ac7bb07162aac8c90778dd1de4a2060f8df498" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,4 +6,4 @@ | |
"dependencies": { | ||
"postcss": "^7.0.36" | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -33,4 +33,4 @@ | |
"bugs": { | ||
"url": "https://github.com/raxjs/rax-app/issues" | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
23 changes: 23 additions & 0 deletions
23
packages/rax-webpack-config/src/getPostcssImplementation.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
function resolvePkgPath(pkg, resolvePath?: string): string { | ||
return resolvePath ? require.resolve(pkg, { paths: [resolvePath] }) : require.resolve(pkg); | ||
} | ||
|
||
function getDefaultPostcssImplementation(resolvePath?: string) { | ||
let postcssImplPkg = 'postcss'; | ||
try { | ||
postcssImplPkg = resolvePkgPath(postcssImplPkg, resolvePath); | ||
// eslint-disable-next-line no-empty | ||
} catch (error) {} | ||
// eslint-disable-next-line import/no-dynamic-require, global-require | ||
return require(postcssImplPkg); | ||
} | ||
|
||
export default function getPostcssImplementation(resolvePath?: string) { | ||
try { | ||
return getDefaultPostcssImplementation(resolvePath); | ||
} catch (error) { | ||
console.error('Run `npm install postcss` or `yarn add postcss` inside your workspace.'); | ||
// exit process when postcss require is failed | ||
process.exit(1); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters