question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

How to import store.on?

See original GitHub issue

First, thanks for this awesome lib…!

I’m using store2 on vue.js without problems, but now I want to import store.on, how to do it?

import Storage from 'store2' // WORKS!

// Uncaught TypeError: Cannot read property '_' of undefined
import StoreOn from 'store2/src/store.on'

So, why not include extensions via “ES6 Destructuring and Module imports”? It could be nice do this:

import Storage, {StoreOn, StoreOverflow, StoreQuota} from 'store2'

Thanks

Issue Analytics

  • State:open
  • Created 7 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

9reactions
gregorskiicommented, Nov 9, 2017

You can solve this with webpack (or rollup):

Weback:

 resolve: {
    extensions: ['.js'],
    alias: {
      'store2/old': 'store2/src/store.old.js'
    }
  },
  plugins: [
    new webpack.ProvidePlugin({
      'window.store': 'store2',
      'store': 'store2'
    })
  ]

In code:

import store from 'store2';
import 'store2/old';
2reactions
hustcercommented, Oct 10, 2016

Any update on this lib? The last commit is one year ago…

Read more comments on GitHub >

github_iconTop Results From Across the Web

Getting started with your store migration - Shopify Help Center
Step 1: Configure your basic administrative settings · Step 2: Import your store's content and data to Shopify · Step 3: Organize your...
Read more >
How to Import Products To Your Shopify Store - YouTube
In this video, we will learn how to save time and energy importing products to our Shopify stores with a few mice clicks....
Read more >
How to import products from Shopify store to ... - YouTube
How to import products from Shopify store to another Shopify storeTry For free: https://apps.shopify.com/importify⬇️Watch below which ...
Read more >
Shopify Import Products: How To Perform The Process?
In the Upload files section, click Add file. When you migrate from a certain platform to Shopify, the Import store app chooses a...
Read more >
How to import old order data into your Shopify store
If you've set up a new store on Shopify, you'd want to import the data from your old store into the new one....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found