From cb7369d7434f8c50944a4dc587138046b59f1351 Mon Sep 17 00:00:00 2001 From: henning mueller Date: Fri, 10 Jul 2020 11:28:17 +0200 Subject: [PATCH] 0.3.1: Fix svelte_ujs_ng import issue --- Gemfile.lock | 2 +- lib/svelte/rails/templates/app/javascript/packs/application.js | 2 +- .../rails/templates/app/javascript/packs/server_rendering.js | 3 +-- lib/svelte/rails/templates/config/webpack/environment.js | 2 +- lib/svelte/rails/version.rb | 2 +- package.json | 2 +- svelte_ujs/getSvelteEnvironments.js | 2 +- 7 files changed, 7 insertions(+), 8 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index 6b1c274..6328509 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,7 +1,7 @@ PATH remote: . specs: - svelte-rails (0.3.0) + svelte-rails (0.3.1) execjs railties (>= 5.2) diff --git a/lib/svelte/rails/templates/app/javascript/packs/application.js b/lib/svelte/rails/templates/app/javascript/packs/application.js index ad1e430..893c297 100644 --- a/lib/svelte/rails/templates/app/javascript/packs/application.js +++ b/lib/svelte/rails/templates/app/javascript/packs/application.js @@ -1,3 +1,3 @@ -import SvelteRailsUJS from 'svelte_ujs'; +import SvelteRailsUJS from 'svelte_ujs_ng'; self.SvelteRailsUJS = SvelteRailsUJS; SvelteRailsUJS.start(); diff --git a/lib/svelte/rails/templates/app/javascript/packs/server_rendering.js b/lib/svelte/rails/templates/app/javascript/packs/server_rendering.js index 52c0f14..c675e00 100644 --- a/lib/svelte/rails/templates/app/javascript/packs/server_rendering.js +++ b/lib/svelte/rails/templates/app/javascript/packs/server_rendering.js @@ -1,3 +1,2 @@ -import SvelteRailsUJS from 'svelte_ujs'; - +import SvelteRailsUJS from 'svelte_ujs_ng'; self.SvelteRailsUJS = SvelteRailsUJS; diff --git a/lib/svelte/rails/templates/config/webpack/environment.js b/lib/svelte/rails/templates/config/webpack/environment.js index 952abf7..db8e2a0 100644 --- a/lib/svelte/rails/templates/config/webpack/environment.js +++ b/lib/svelte/rails/templates/config/webpack/environment.js @@ -1,6 +1,6 @@ const clientLoader = require('./loaders/svelte') const serverLoader = require('./loaders/svelte-ssr') -const getSvelteEnvironments = require('svelte_ujs/getSvelteEnvironments') +const getSvelteEnvironments = require('svelte_ujs_ng/getSvelteEnvironments') module.exports = getSvelteEnvironments(clientLoader, serverLoader) diff --git a/lib/svelte/rails/version.rb b/lib/svelte/rails/version.rb index 9169c78..80ee6f5 100644 --- a/lib/svelte/rails/version.rb +++ b/lib/svelte/rails/version.rb @@ -1,5 +1,5 @@ module Svelte module Rails - VERSION = '0.3.0' + VERSION = '0.3.1' end end diff --git a/package.json b/package.json index 97ab502..4d5ef1c 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "svelte_ujs_ng", - "version": "0.1.0", + "version": "0.3.1", "description": "Rails UJS for turbolinks and SSR of the svelte-rails gem", "license": "MIT", "author": "henning mueller ", diff --git a/svelte_ujs/getSvelteEnvironments.js b/svelte_ujs/getSvelteEnvironments.js index b415582..188a04f 100644 --- a/svelte_ujs/getSvelteEnvironments.js +++ b/svelte_ujs/getSvelteEnvironments.js @@ -1,6 +1,6 @@ const config = require('@rails/webpacker/package/config') const ConfigList = require('@rails/webpacker/package/config_types/config_list') -const WaitPlugin = require('svelte_ujs/WaitPlugin') +const WaitPlugin = require('./WaitPlugin') // Use version of WebpackAssetsManifest that supports merging entrypoints in manifest.json // https://github.com/webdeveric/webpack-assets-manifest/pull/59