-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(nuxt): Inline nitro-utils function (#14680)
- Loading branch information
Showing
6 changed files
with
57 additions
and
29 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,4 @@ | ||
import { defineBuildConfig } from 'unbuild'; | ||
|
||
// Build Config for the Nuxt Module Builder: https://github.com/nuxt/module-builder | ||
export default defineBuildConfig({ | ||
// The devDependency "@sentry-internal/nitro-utils" triggers "Inlined implicit external", but it's not external | ||
failOnWarn: false, | ||
}); | ||
export default defineBuildConfig({}); |
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,19 @@ | ||
# The Nuxt package is built in 2 steps and the nuxt-module-builder shows a warning if one of the files specified in the package.json is missing. | ||
# unbuild checks for this: https://github.com/unjs/unbuild/blob/8c647ec005a02f852e56aeef6076a35eede17df1/src/validate.ts#L81 | ||
|
||
# The runtime folder (which is built with the nuxt-module-builder) is separate from the rest of the package and therefore we can ignore those warnings | ||
# as those files are generated in the other build step. | ||
|
||
# Create the directories if they do not exist | ||
mkdir -p build/cjs | ||
mkdir -p build/esm | ||
mkdir -p build/types | ||
|
||
# Write files if they do not exist | ||
[ ! -f build/cjs/index.server.js ] && echo "module.exports = {}" > build/cjs/index.server.js | ||
[ ! -f build/cjs/index.client.js ] && echo "module.exports = {}" > build/cjs/index.client.js | ||
[ ! -f build/esm/index.server.js ] && echo "export {}" > build/esm/index.server.js | ||
[ ! -f build/esm/index.client.js ] && echo "export {}" > build/esm/index.client.js | ||
[ ! -f build/types/index.types.d.ts ] && echo "export {}" > build/types/index.types.d.ts | ||
|
||
echo "Created build stubs for missing files" |
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