@ditojs/build 2.0.0 → 2.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ditojs/build",
3
- "version": "2.0.0",
3
+ "version": "2.1.0",
4
4
  "type": "module",
5
5
  "repository": "https://github.com/ditojs/dito/tree/master/packages/build",
6
6
  "author": "Jürg Lehni <juerg@scratchdisk.com> (http://scratchdisk.com)",
@@ -30,6 +30,6 @@
30
30
  "postcss": "^8.4.21",
31
31
  "postcss-inset": "^1.0.0"
32
32
  },
33
- "gitHead": "dde9462e778bce37bc4fa3e47127a9ba12a4d5e2",
33
+ "gitHead": "5c5048b661395268e720b9ec402d4301bb4a34aa",
34
34
  "readme": "# Dito.js Build Helper Functions\n\nDito.js is a declarative and modern web framework with a focus on API driven\ndevelopment, based on Koa.js, Objection.js and Vue.js\n\nReleased in 2018 under the MIT license, with support by https://lineto.com/\n"
35
35
  }
package/src/rollup.js CHANGED
@@ -29,8 +29,7 @@ export function getRollupExternalsFromDependencies({
29
29
  addDependencies(packageJson.dependencies)
30
30
  addDependencies(packageJson.peerDependencies)
31
31
  addDependencies(packageJson.devDependencies)
32
- } catch (err) {
33
- }
32
+ } catch (err) {}
34
33
  }
35
34
 
36
35
  // Start with root to read from './package.json.js' and take it from there.
package/src/vite.js CHANGED
@@ -16,10 +16,13 @@ export function getViteConfig({
16
16
  } = {},
17
17
  ...rest
18
18
  } = {}) {
19
- const externals = build && getRollupExternalsFromDependencies({
20
- include,
21
- exclude
22
- })
19
+ const externals = (
20
+ build &&
21
+ getRollupExternalsFromDependencies({
22
+ include,
23
+ exclude
24
+ })
25
+ )
23
26
  return defineConfig({
24
27
  plugins: vue
25
28
  ? [createVuePlugin()]
@@ -29,23 +32,23 @@ export function getViteConfig({
29
32
  : null,
30
33
  build: build
31
34
  ? {
32
- minify,
33
- sourcemap,
34
- cssCodeSplit: false,
35
- lib: {
36
- name,
37
- format: ['es', 'umd'],
38
- entry: './src/index.js',
39
- fileName: format => `${name}.${format}.js`
40
- },
41
- rollupOptions: {
42
- external: id => !!externals[id],
43
- output: {
44
- manualChunks: undefined,
45
- globals: externals
35
+ minify,
36
+ sourcemap,
37
+ cssCodeSplit: false,
38
+ lib: {
39
+ name,
40
+ format: ['es', 'umd'],
41
+ entry: './src/index.js',
42
+ fileName: format => `${name}.${format}.js`
43
+ },
44
+ rollupOptions: {
45
+ external: id => !!externals[id],
46
+ output: {
47
+ manualChunks: undefined,
48
+ globals: externals
49
+ }
46
50
  }
47
51
  }
48
- }
49
52
  : null,
50
53
  css: css
51
54
  ? { postcss: getPostCssConfig() }