mirror of
https://github.com/strapi/strapi.git
synced 2025-12-29 08:04:51 +00:00
Fix document
This commit is contained in:
parent
1c2a1c8d89
commit
988225f6cd
@ -95,10 +95,11 @@ async function createPluginsJs(plugins, dest) {
|
||||
|
||||
/**
|
||||
* path.join, on windows, it uses backslashes to resolve path.
|
||||
* The problem is that JavaScript does not resolve the path as windows.
|
||||
* In JavaScript, we need to rely on "/" and not "\".
|
||||
* This is the reason why '..\\..\\..\\node_modules\\@strapi\\plugin-content-type-builder/strapi-admin.js' was not working in javascript.
|
||||
* The regexp at line 105 aims to replace the windows backslashes by standard slash so that javascript can deal with them.
|
||||
* The problem is that Webpack does not windows paths
|
||||
* With this tool, we need to rely on "/" and not "\".
|
||||
* This is the reason why '..\\..\\..\\node_modules\\@strapi\\plugin-content-type-builder/strapi-admin.js' was not working.
|
||||
* The regexp at line 105 aims to replace the windows backslashes by standard slash so that webpack can deal with them.
|
||||
* Backslash looks to work only for absolute paths with webpack => https://webpack.js.org/concepts/module-resolution/#absolute-paths
|
||||
*/
|
||||
const realPath = path
|
||||
.join(path.relative(path.resolve(dest, 'admin', 'src'), pathToPlugin), 'strapi-admin.js')
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user