@movable/studio-framework-build-config 3.2.0 → 3.3.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": "@movable/studio-framework-build-config",
3
- "version": "3.2.0",
3
+ "version": "3.3.0",
4
4
  "license": "MIT",
5
5
  "private": false,
6
6
  "author": "Movable Ink",
@@ -13,8 +13,8 @@
13
13
  "@babel/plugin-transform-runtime": "^7.13.15",
14
14
  "@babel/preset-env": "^7.20.2",
15
15
  "@babel/preset-react": "^7.14.5",
16
- "@movable/rollup-plugin-manifest-merger": "^3.2.0",
17
- "@movable/rollup-plugin-package-manifest-validator": "^3.2.0",
16
+ "@movable/rollup-plugin-manifest-merger": "^3.3.0",
17
+ "@movable/rollup-plugin-package-manifest-validator": "^3.3.0",
18
18
  "@rollup/plugin-terser": "^0.4.0",
19
19
  "@rollup/plugin-url": "^6.0.0",
20
20
  "esbuild": "^0.15.14",
@@ -45,5 +45,5 @@
45
45
  "volta": {
46
46
  "extends": "../../package.json"
47
47
  },
48
- "gitHead": "16e85f9ca7868b4fe3a8d397b26bd8569bfbeff9"
48
+ "gitHead": "c2dea26a1b80ea8c37d63728bd05e3820de6df31"
49
49
  }
@@ -13,6 +13,7 @@ const { manifestMerger } = require('@movable/rollup-plugin-manifest-merger');
13
13
  const { importExportToGlobal, dependenciesOnly } = require('rollup-split-index');
14
14
  const babelrc = require('./babel');
15
15
  const buildDataLoader = require('./data-loader');
16
+ const { manifestValidatorPluginApps } = require('@movable/rollup-plugin-manifest-validator');
16
17
 
17
18
  module.exports = function rollupConfig(passedConfig = {}) {
18
19
  const inputFile = 'app/index.js';
@@ -24,35 +25,37 @@ module.exports = function rollupConfig(passedConfig = {}) {
24
25
  ...passedConfig
25
26
  };
26
27
 
28
+ const plugins = [
29
+ manifestMerger({ output: 'manifest.yml', ignoreFrameworkVersionUpdate: true }),
30
+ babel(babelrc),
31
+ resolve(),
32
+ commonjs(),
33
+ postcss({
34
+ modules: false
35
+ }),
36
+ copy({
37
+ assets: glob.sync('**/app/*.{png,jpg,jpeg}')
38
+ }),
39
+ image(),
40
+ json(),
41
+ dependenciesOnly(),
42
+ replace({
43
+ 'process.env.NODE_ENV': JSON.stringify('production')
44
+ }),
45
+ config.dataLoader ? buildDataLoader(config.dataLoader) : null,
46
+ config.minify
47
+ ? terser({
48
+ ecma: 2022,
49
+ sourceMap: true,
50
+ format: { comments: false, ecma: 2022 }
51
+ })
52
+ : null,
53
+ config.serve ? serve() : null
54
+ ].filter(Boolean);
55
+
27
56
  const vendorTree = {
28
57
  input: inputFile,
29
- plugins: [
30
- manifestMerger({ output: 'manifest.yml', ignoreFrameworkVersionUpdate: true }),
31
- babel(babelrc),
32
- resolve(),
33
- commonjs(),
34
- postcss({
35
- modules: false
36
- }),
37
- copy({
38
- assets: glob.sync('**/app/*.{png,jpg,jpeg}')
39
- }),
40
- image(),
41
- json(),
42
- dependenciesOnly(),
43
- replace({
44
- 'process.env.NODE_ENV': JSON.stringify('production')
45
- }),
46
- config.dataLoader ? buildDataLoader(config.dataLoader) : null,
47
- config.minify
48
- ? terser({
49
- ecma: 2022,
50
- sourceMap: true,
51
- format: { comments: false, ecma: 2022 }
52
- })
53
- : null,
54
- config.serve ? serve() : null
55
- ].filter(Boolean),
58
+ plugins: plugins,
56
59
  output: {
57
60
  name: 'studioDependencies',
58
61
  dir: './',
@@ -61,6 +64,8 @@ module.exports = function rollupConfig(passedConfig = {}) {
61
64
  }
62
65
  };
63
66
 
67
+ plugins.splice(1, 0, manifestValidatorPluginApps({ manifestPath: 'app-manifest.yml' }));
68
+
64
69
  const indexTree = {
65
70
  input: inputFile,
66
71
  plugins: [
@@ -11,7 +11,7 @@ const {
11
11
  manifestMerger,
12
12
  inputFile
13
13
  } = require('@movable/rollup-plugin-manifest-merger');
14
- const { manifestValidatorPlugin } = require('@movable/rollup-plugin-package-manifest-validator');
14
+ const { manifestValidatorPluginPackages } = require('@movable/rollup-plugin-manifest-validator');
15
15
  const babelConf = require('./babel');
16
16
 
17
17
  const reactBase = require.resolve('react');
@@ -44,7 +44,11 @@ module.exports = function rollupConfig(pkg) {
44
44
  ];
45
45
 
46
46
  if (!process.env.SKIP_VALIDATION)
47
- plugins.splice(1, 0, manifestValidatorPlugin({ manifestPath: 'package-manifest.yml' }));
47
+ plugins.splice(
48
+ 1,
49
+ 0,
50
+ manifestValidatorPluginPackages({ manifestPath: 'package-manifest.yml' })
51
+ );
48
52
 
49
53
  return {
50
54
  input: inputFile,
@@ -75,7 +79,11 @@ module.exports = function rollupConfig(pkg) {
75
79
  ];
76
80
 
77
81
  if (!process.env.SKIP_VALIDATION)
78
- plugins.splice(1, 0, manifestValidatorPlugin({ manifestPath: 'package-manifest.yml' }));
82
+ plugins.splice(
83
+ 1,
84
+ 0,
85
+ manifestValidatorPluginPackages({ manifestPath: 'package-manifest.yml' })
86
+ );
79
87
 
80
88
  return {
81
89
  output: [