@zohodesk/client_build_tool 0.0.6-exp.37 → 0.0.6-exp.39

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.
@@ -85,6 +85,7 @@ class ServiceWorkerPlugin {
85
85
  allChunkUrls = [...allChunkUrls, ...chunk.files];
86
86
  });
87
87
  allChunkUrls = allChunkUrls.filter(fileName => !fileName.endsWith('.map'));
88
+ allChunkUrls = allChunkUrls.map(fileName => fileName.replace('smap/', ''));
88
89
 
89
90
  if (enableRTLSplit) {
90
91
  allChunkUrls = (0, _replaceCssDirTemplate.replaceCssDirTemplateMapper)(allChunkUrls, _getInitialAssetsFuncTemplate.cssDirTemplate);
@@ -51,7 +51,12 @@ var _default = options => {
51
51
 
52
52
  const fileNameWithoutExt = _path.default.parse(relativePath).name;
53
53
 
54
- const cleanFileName = fileNameWithoutExt.replace(/-/g, '_').toLowerCase();
54
+ let cleanFileName = fileNameWithoutExt.replace(/-/g, '_').toLowerCase();
55
+
56
+ if (cleanFileName.endsWith('.module')) {
57
+ cleanFileName = cleanFileName.slice(0, -7);
58
+ }
59
+
55
60
  const suitableBlob = getSuitableBlob(customizations, resourcePath);
56
61
  return suitableBlob.replaceAll('[local]', localName).replaceAll('[prefix]', classNamePrefix).replaceAll('[filename]', cleanFileName).replaceAll('[hash]', getHash(`${relativePath}-${localName}`, 10));
57
62
  };
@@ -11,7 +11,7 @@ function tsLoaders(options) {
11
11
  return [{
12
12
  test: /\.tsx$/,
13
13
  exclude: /node_modules/,
14
- use: 'ts-loader' // include: path.join(appPath, folder)
14
+ use: [(0, _babelLoaderConfig.babelLoaderConfig)(options)] // include: path.join(appPath, folder)
15
15
 
16
16
  }];
17
17
  }
@@ -49,9 +49,11 @@ function initialHTMLHandling(compiler, app, options) {
49
49
  enableMockReplace,
50
50
  req
51
51
  }) {
52
- let newHTML = enableMockReplace && initialHTML ? mockReplace(initialHTML, req.query) : initialHTML; // if (req.protocol === 'https') {
53
- // newHTML = newHTML.replaceAll(httpsUrl, httpUrl);
54
- // }
52
+ let newHTML = enableMockReplace && initialHTML ? mockReplace(initialHTML, req.query) : initialHTML;
53
+
54
+ if (req.protocol === 'http') {
55
+ newHTML = newHTML.replaceAll(httpsUrl, httpUrl);
56
+ }
55
57
 
56
58
  return newHTML;
57
59
  }
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zohodesk/client_build_tool",
3
- "version": "0.0.6-exp.36",
3
+ "version": "0.0.6-exp.37",
4
4
  "lockfileVersion": 1,
5
5
  "requires": true,
6
6
  "dependencies": {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zohodesk/client_build_tool",
3
- "version": "0.0.6-exp.37",
3
+ "version": "0.0.6-exp.39",
4
4
  "description": "A CLI tool to build web applications and client libraries",
5
5
  "main": "lib/index.js",
6
6
  "bin": {