@nlabs/lex 1.52.5 → 1.52.6

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": "@nlabs/lex",
3
- "version": "1.52.5",
3
+ "version": "1.52.6",
4
4
  "description": "Lex",
5
5
  "license": "MIT",
6
6
  "type": "module",
package/webpack.config.js CHANGED
@@ -15,9 +15,7 @@ import {existsSync} from 'fs';
15
15
  import {sync as globSync} from 'glob';
16
16
  import HtmlWebPackPlugin from 'html-webpack-plugin';
17
17
  import isEmpty from 'lodash/isEmpty.js';
18
- import {createRequire} from 'module';
19
18
  import {resolve as pathResolve} from 'path';
20
- import {fileURLToPath} from 'url';
21
19
  import postcssBrowserReporter from 'postcss-browser-reporter';
22
20
  import postcssCustomProperties from 'postcss-custom-properties';
23
21
  import postcssFlexbugsFixes from 'postcss-flexbugs-fixes';
@@ -42,7 +40,6 @@ const {ProgressPlugin, ProvidePlugin} = webpack;
42
40
  const isProduction = process.env.NODE_ENV === 'production';
43
41
  const lexConfig = JSON.parse(process.env.LEX_CONFIG) || {};
44
42
  const dirName = new URL('.', import.meta.url).pathname;
45
- const require = createRequire(fileURLToPath(import.meta.url));
46
43
 
47
44
  const {
48
45
  isStatic,
@@ -234,7 +231,8 @@ if(staticPaths.length) {
234
231
  if(existsSync(`${sourceFullPath}/${lexConfig.entryHTML}`)) {
235
232
  plugins.push(
236
233
  new HtmlWebPackPlugin({
237
- filename: './index.html',
234
+ chunks: ['index'],
235
+ filename: lexConfig.entryHTML || './index.html',
238
236
  minify: isProduction,
239
237
  scriptLoading: 'defer',
240
238
  showErrors: !isProduction,
@@ -686,7 +684,7 @@ export default (webpackEnv, webpackOptions) => {
686
684
  historyFallback: {
687
685
  disableDotRule: true,
688
686
  htmlAcceptHeaders: ['text/html', '*/*'],
689
- index: '/index.html',
687
+ index: '/index.html', // Always point to the output HTML file (webpack always outputs index.html)
690
688
  logger: console.log.bind(console),
691
689
  rewrites: [
692
690
  {
@@ -757,7 +755,7 @@ export default (webpackEnv, webpackOptions) => {
757
755
  open: process.env.WEBPACK_DEV_OPEN === 'true',
758
756
  port: finalPort,
759
757
  progress: 'minimal',
760
- static: existsSync(outputFullPath) ? [outputFullPath] : [],
758
+ static: outputFullPath ? [outputFullPath] : [], // Always include output path to serve generated HTML
761
759
  status: true
762
760
  })
763
761
  );