@elliemae/pui-cli 6.0.0-beta.36 → 6.0.0-beta.37

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.
@@ -24,10 +24,15 @@ exports.logSuccess = (...args) => console.log(chalk.green(...args));
24
24
  exports.logError = console.error;
25
25
 
26
26
  const readPackageLock = async () => {
27
- const appPkgLockFile = path.join(process.cwd(), 'package-lock.json');
28
- const pkgLockJSON = await readFile(appPkgLockFile, 'utf8');
29
- const { dependencies } = JSON.parse(pkgLockJSON);
30
- return (moduleName) => dependencies[moduleName]?.version || '';
27
+ try {
28
+ const appPkgLockFile = path.join(process.cwd(), 'package-lock.json');
29
+ const pkgLockJSON = await readFile(appPkgLockFile, 'utf8');
30
+ const { dependencies } = JSON.parse(pkgLockJSON);
31
+ return (moduleName) => dependencies[moduleName]?.version || '';
32
+ } catch (err) {
33
+ console.warn('Package lock file not found');
34
+ return () => '';
35
+ }
31
36
  };
32
37
 
33
38
  const getSupportedBrowsers = async () => {
@@ -80,6 +80,7 @@ const devConfig = {
80
80
  },
81
81
  }),
82
82
  new HtmlWebpackPlugin({
83
+ scriptLoading: 'module',
83
84
  inject: !isAppLoaderEnabled(), // Inject all files that are generated by webpack, e.g. bundle.js
84
85
  template: !isAppLoaderEnabled()
85
86
  ? 'app/index.html'
@@ -28,6 +28,7 @@ module.exports = require('./webpack.lib.base.babel')({
28
28
  // Add development plugins
29
29
  plugins: [
30
30
  new HtmlWebpackPlugin({
31
+ scriptLoading: 'module',
31
32
  inject: true, // Inject all files that are generated by webpack, e.g. bundle.js
32
33
  template: 'lib/index.pug',
33
34
  filename: 'index.html',
@@ -39,6 +39,7 @@ module.exports = require('./webpack.lib.base.babel')({
39
39
  plugins: [
40
40
  // Minify and optimize the index.html
41
41
  new HtmlWebpackPlugin({
42
+ scriptLoading: 'module',
42
43
  template: 'lib/index.pug',
43
44
  filename: 'index.html',
44
45
  libraryName,
@@ -102,6 +102,7 @@ const {
102
102
  encwLoaderScriptPath,
103
103
  } = getPaths();
104
104
  const htmlWebpackPlugin = new HtmlWebpackPlugin({
105
+ scriptLoading: 'module',
105
106
  filename: '../index.html',
106
107
  inject: !isAppLoaderEnabled(),
107
108
  template: !isAppLoaderEnabled()
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@elliemae/pui-cli",
3
- "version": "6.0.0-beta.36",
3
+ "version": "6.0.0-beta.37",
4
4
  "private": false,
5
5
  "description": "ICE MT UI Platform CLI",
6
6
  "sideEffects": false,