Skip to content

Commit

Permalink
feat(ui): correctly export the non-standard prod quasar.esm.prod.js e…
Browse files Browse the repository at this point in the history
…ntry-point #14391 #14393
  • Loading branch information
rstoenescu committed Sep 15, 2022
1 parent 3b99421 commit 06ced83
Show file tree
Hide file tree
Showing 5 changed files with 46 additions and 4 deletions.
8 changes: 4 additions & 4 deletions ui/build/script.build.javascript.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ const uglifyJsOptions = {

const builds = [
{
// client entry used by @quasar/vite-plugin for DEV only
// client entry-point used by @quasar/vite-plugin for DEV only
// (has flags untouched; required to replace them)
rollup: {
input: {
Expand All @@ -94,12 +94,12 @@ const builds = [
},

{
// generic ESM entry that is not used by Quasar CLI,
// client prod entry-point that is not used by Quasar CLI,
// but pointed to in package.json > module;
// (no flags; not required to replace them)
rollup: {
input: {
input: resolve('src/index.dev.js')
input: resolve('src/index.prod.js')
},
output: {
file: resolve('dist/quasar.esm.js'),
Expand All @@ -119,7 +119,7 @@ const builds = [
},

{
// SSR server prod entry
// SSR server prod entry-point
// (no flags; not required to replace them)
rollup: {
input: {
Expand Down
4 changes: 4 additions & 0 deletions ui/src/index.dev.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
/**
* client entry-point used by @quasar/vite-plugin for DEV only
*/

import installQuasar from './install-quasar.js'
import lang from './lang.js'
import iconSet from './icon-set.js'
Expand Down
30 changes: 30 additions & 0 deletions ui/src/index.prod.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
/**
* client prod entry-point that is not used by Quasar CLI,
* but pointed to in package.json > module
*/

import installQuasar from './install-quasar.js'
import lang from './lang.js'
import iconSet from './icon-set.js'

import * as components from './components.js'
import * as directives from './directives.js'

export * from './components.js'
export * from './directives.js'
export * from './plugins.js'
export * from './composables.js'
export * from './utils.js'

export const Quasar = {
version: __QUASAR_VERSION__,
install (app, opts, ssrContext) {
installQuasar(
app,
{ components, directives, ...opts },
ssrContext
)
},
lang,
iconSet
}
4 changes: 4 additions & 0 deletions ui/src/index.ssr.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
/**
* SSR server prod entry-point
*/

import installQuasar from './install-quasar.js'
import lang from './lang.js'
import iconSet from './icon-set.js'
Expand Down
4 changes: 4 additions & 0 deletions ui/src/index.umd.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
/**
* UMD entry-point
*/

import installQuasar from './install-quasar.js'
import lang from './lang.js'
import iconSet from './icon-set.js'
Expand Down

0 comments on commit 06ced83

Please sign in to comment.