-
Notifications
You must be signed in to change notification settings - Fork 85
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore!: Migrate build of single entry points from webpack to vite
This is a breaking change as this also introduces ESM entry points for all components etc and therfor changed the files from `.js` to `.cjs` and `.mjs` respective. Instead of `import NcButton from '@nextcloud/vue/dist/Components/NcButton.js` use `import NcButton from '@nextcloud/vue/components/NcButton'`. * Also fix docs for component import pattern Co-authored-by: John Molakvoæ <[email protected]> Signed-off-by: Ferdinand Thiessen <[email protected]>
- Loading branch information
Showing
5 changed files
with
60 additions
and
78 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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 |
---|---|---|
|
@@ -13,12 +13,9 @@ | |
"author": "John Molakvoæ (skjnldsv) <[email protected]>", | ||
"license": "AGPL-3.0", | ||
"scripts": { | ||
"dev": "webpack --node-env development --progress && npm run dev:module", | ||
"dev:module": "vite build --mode development", | ||
"watch": "webpack --node-env development --progress --watch", | ||
"watch:module": "vite build --mode development --watch", | ||
"build": "webpack --node-env production --progress && npm run build:module", | ||
"build:module": "vite --mode production build", | ||
"build": "vite build --mode production ", | ||
"dev": "vite build --mode development", | ||
"dev:watch": "vite build --mode development --watch", | ||
"l10n:extract": "node build/extract-l10n.js", | ||
"lint": "eslint --ext .js,.vue src", | ||
"lint:fix": "eslint --ext .js,.vue src --fix", | ||
|
@@ -38,7 +35,22 @@ | |
"import": "./dist/index.mjs", | ||
"require": "./dist/index.cjs" | ||
}, | ||
"./dist/*": "./dist/*" | ||
"./dist/Components/*.js": { | ||
"import": "./dist/Components/*.mjs", | ||
"require": "./dist/Components/*.cjs" | ||
}, | ||
"./dist/Directives/*.js": { | ||
"import": "./dist/Directives/*.mjs", | ||
"require": "./dist/Directives/*.cjs" | ||
}, | ||
"./dist/Functions/*.js": { | ||
"import": "./dist/Functions/*.mjs", | ||
"require": "./dist/Functions/*.cjs" | ||
}, | ||
"./dist/Mixins/*.js": { | ||
"import": "./dist/Mixins/*.mjs", | ||
"require": "./dist/Mixins/*.cjs" | ||
} | ||
}, | ||
"files": [ | ||
"CHANGELOG.md", | ||
|
@@ -104,7 +116,7 @@ | |
"@nextcloud/browserslist-config": "^3.0.0", | ||
"@nextcloud/eslint-config": "^8.3.0-beta.0", | ||
"@nextcloud/stylelint-config": "^2.3.1", | ||
"@nextcloud/vite-config": "^1.0.0-beta.17", | ||
"@nextcloud/vite-config": "^1.0.0-beta.18", | ||
"@nextcloud/webpack-vue-config": "github:nextcloud/webpack-vue-config#master", | ||
"@vue/test-utils": "^1.3.0", | ||
"@vue/tsconfig": "^0.4.0", | ||
|
@@ -132,8 +144,7 @@ | |
"vue-styleguidist": "~4.72.0", | ||
"vue-template-compiler": "^2.7.14", | ||
"webpack": "^5.88.1", | ||
"webpack-merge": "^5.9.0", | ||
"webpack-node-externals": "^3.0.0" | ||
"webpack-merge": "^5.9.0" | ||
}, | ||
"browserslist": [ | ||
"extends @nextcloud/browserslist-config" | ||
|
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