@kaliber/build 0.0.124 → 0.0.127

Sign up to get free protection for your applications and to get access to all the features.
package/.eslintrc CHANGED
@@ -70,6 +70,7 @@
70
70
  "dot-location": ["warn", "property"],
71
71
  "eol-last": "warn",
72
72
  "eqeqeq": "warn",
73
+ "key-spacing": "warn",
73
74
  "keyword-spacing": "warn",
74
75
  "new-parens": "warn",
75
76
  "no-array-constructor": "warn",
package/lib/build.js CHANGED
@@ -311,7 +311,8 @@ module.exports = function build({ watch }) {
311
311
  },
312
312
 
313
313
  {
314
- test: /(\.js|\.mjs)$/
314
+ test: /(\.js|\.mjs)$/,
315
+ type: 'javascript/auto',
315
316
  },
316
317
 
317
318
  {
@@ -12,7 +12,9 @@ export function ComponentServerWrapper({ componentName, props, renderedComponent
12
12
 
13
13
  {/* Use render blocking script to remove the container and supply the correct comment nodes.
14
14
  This ensures the page is never rendered with the intermediate structure */}
15
- <script dangerouslySetInnerHTML={{ __html: restructureDomNodes(componentInfo) }} />
15
+ <script dangerouslySetInnerHTML={{
16
+ __html: restructureDomNodes(componentInfo).replace(/<\/?script>/gi, '')
17
+ }} />
16
18
  </>
17
19
  )
18
20
  }
package/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "0.0.124",
2
+ "version": "0.0.127",
3
3
  "name": "@kaliber/build",
4
4
  "description": "Zero configuration, opinionated webpack / react build setup",
5
5
  "scripts": {
@@ -93,8 +93,9 @@ module.exports = function templatePlugin(renderers) {
93
93
  */
94
94
  compilation.hooks.chunkAsset.tap(p, (chunk, file) => {
95
95
  if (!chunk.entryModule) return
96
+ const rootModule = chunk.entryModule.rootModule || chunk.entryModule
96
97
  const { module } =
97
- chunk.entryModule.dependencies.find(x =>
98
+ rootModule.dependencies.find(x =>
98
99
  x.module && x.module.request.endsWith('?template-source')
99
100
  ) || {}
100
101
  if (!module) return