function withNextSpark(userConfig = {}) {
  return {
    ...userConfig,
    // Transpile NextSpark core package when installed via npm
    transpilePackages: [
      "@nextsparkjs/core",
      ...userConfig.transpilePackages || []
    ],
    // Configure webpack for proper resolution
    webpack: (config, options) => {
      if (userConfig.webpack) {
        return userConfig.webpack(config, options);
      }
      return config;
    },
    // Experimental features
    experimental: {
      ...userConfig.experimental
      // Add any experimental features needed by NextSpark
    }
  };
}
export {
  withNextSpark
};
