Fix build for windows
This commit is contained in:
parent
babbe39494
commit
3fc2108214
@ -3,7 +3,8 @@ import {
|
|||||||
join as pathJoin,
|
join as pathJoin,
|
||||||
relative as pathRelative,
|
relative as pathRelative,
|
||||||
basename as pathBasename,
|
basename as pathBasename,
|
||||||
dirname as pathDirname
|
dirname as pathDirname,
|
||||||
|
sep as pathSep
|
||||||
} from "path";
|
} from "path";
|
||||||
import { assert } from "tsafe/assert";
|
import { assert } from "tsafe/assert";
|
||||||
import { run } from "../shared/run";
|
import { run } from "../shared/run";
|
||||||
@ -45,9 +46,21 @@ export function vendorFrontendDependencies(params: { distDirPath: string }) {
|
|||||||
``,
|
``,
|
||||||
`module.exports = {`,
|
`module.exports = {`,
|
||||||
` mode: 'production',`,
|
` mode: 'production',`,
|
||||||
` entry: '${filePath}',`,
|
` entry: path.join(...[__dirname, ${pathRelative(
|
||||||
|
pathDirname(webpackConfigJsFilePath),
|
||||||
|
filePath
|
||||||
|
)
|
||||||
|
.split(pathSep)
|
||||||
|
.map(segment => `"${segment}"`)
|
||||||
|
.join(", ")}]),`,
|
||||||
` output: {`,
|
` output: {`,
|
||||||
` path: '${webpackOutputDirPath}',`,
|
` path: path.join(...[__dirname, ${pathRelative(
|
||||||
|
pathDirname(webpackConfigJsFilePath),
|
||||||
|
webpackOutputDirPath
|
||||||
|
)
|
||||||
|
.split(pathSep)
|
||||||
|
.map(segment => `"${segment}"`)
|
||||||
|
.join(", ")}]),`,
|
||||||
` filename: '${pathBasename(webpackOutputFilePath)}',`,
|
` filename: '${pathBasename(webpackOutputFilePath)}',`,
|
||||||
` libraryTarget: 'module',`,
|
` libraryTarget: 'module',`,
|
||||||
` },`,
|
` },`,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user