-
Notifications
You must be signed in to change notification settings - Fork 25
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 #429 from rabbitholegg/mmackz/update-template
feat(create-plugin): update package.json template
- Loading branch information
Showing
4 changed files
with
35 additions
and
9 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"@rabbitholegg/create-plugin": minor | ||
--- | ||
|
||
update template for new build process |
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 |
---|---|---|
@@ -0,0 +1,19 @@ | ||
/** @type {import('vite').UserConfig} */ | ||
export default { | ||
build: { | ||
rollupOptions: { | ||
external: [/@rabbitholegg/], | ||
}, | ||
lib: { | ||
entry: 'src/index.ts', | ||
emptyOutDir: false, | ||
name: 'QuestdkPlugin{{capitalize projectName}}', | ||
fileName: (module, name) => { | ||
const outPath = `${module === 'es' ? 'esm' : 'cjs'}/${ | ||
name.startsWith('index') ? 'index.js' : name + '/index.js' | ||
}` | ||
return outPath | ||
}, | ||
}, | ||
}, | ||
} |