diff --git a/packages/field-kit/bin/field-scripts/build-module/rollup-plugin-field-module.js b/packages/field-kit/bin/field-scripts/build-module/rollup-plugin-field-module.js index 0034ea7a..0538ca66 100644 --- a/packages/field-kit/bin/field-scripts/build-module/rollup-plugin-field-module.js +++ b/packages/field-kit/bin/field-scripts/build-module/rollup-plugin-field-module.js @@ -20,7 +20,7 @@ export default function fieldModulePlugin(pluginOptions = {}) { try { const js = bundle[pluginOptions.fileName()]; const css = bundle[STYLE_BUNDLE]; - js.code = injectStyle(js.code, css.source); + if (css) js.code = injectStyle(js.code, css.source); delete bundle[STYLE_BUNDLE]; } catch (error) { const msg = `Error injecting styles for ${pluginOptions.name} module: `;