Comments (12)
Rollup also alert about this:
(!) `this` has been rewritten to `undefined`
https://rollupjs.org/guide/en/#error-this-is-undefined
node_modules/lit-redux-router/dist/route.js
47: }
48:
49: var __decorate = this && this.__decorate || function (decorators, target, key, desc) {
^
50: var c = arguments.length,
51: r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc,
from lit-redux-router.
Hi @jorgecasar! Thanks for opening this issue
I've added the module attribute pointing to the main typescript file.
"module": "src/lit-redux-router.ts"
from lit-redux-router.
Rollup also alert about this:
(!) `this` has been rewritten to `undefined` https://rollupjs.org/guide/en/#error-this-is-undefined node_modules/lit-redux-router/dist/route.js 47: } 48: 49: var __decorate = this && this.__decorate || function (decorators, target, key, desc) { ^ 50: var c = arguments.length, 51: r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc,
please try again with the new version and I'll re-open this issue
from lit-redux-router.
fixed in https://github.com/fernandopasik/lit-redux-router/releases/tag/v0.9.6
from lit-redux-router.
Typescript is not a JavaScript I should use Babel to parse your library. You have to generate 2 distributions. Es modules and commonjs. Really with esm is enough because litElement is only distributed as module.
from lit-redux-router.
Then I think what I should do, it's just point module to dist/lit-redux-router.js as that is ES modules as well. What do you think?
from lit-redux-router.
Yes, it should work. In the other hand we have the roll-up issue you commented
from lit-redux-router.
ok, I've fixed the module property and published a new version.
Could you please provide more details on how to reproduce the issue with rollup?
from lit-redux-router.
I guess it's a tsconfig because running npm run build
there are 2 warnings:
dist/lit-redux-router.js → dist/lit-redux-router.min.js...
(!) The 'this' keyword is equivalent to 'undefined' at the top level of an ES module, and has been rewritten
(!) The 'this' keyword is equivalent to 'undefined' at the top level of an ES module, and has been rewritten
from lit-redux-router.
I noticed that, and the transpiled code that you posted before. Did this bring you any problem?
from lit-redux-router.
I think it must be to avoid conflicts with an existing polyfill declaration or something
from lit-redux-router.
https://rollupjs.org/guide/en/#error-this-is-undefined
I've added ignores for known warnings in the rollup config. If this causes any problems we can reopen this issue
from lit-redux-router.
Related Issues (20)
- XSS vulnerability when using path params
- Ability to conditionally pre-redirect HOT 3
- Update Documentation to show store setup HOT 2
- route not working. HOT 1
- path routing 404 on client side HOT 3
- JS error in Edge v44 HOT 4
- allow path to assume base href HOT 3
- Suggestion - enable `scrollDisable` by default HOT 3
- how to get query params HOT 2
- Component reloads on every state change HOT 5
- Imports should specify the file extension HOT 11
- Lazy Loaded components are never rendered
- Usage with redux-toolkit? HOT 3
- lit-route lit-plugin typing HOT 4
- Upgrade to latest version / distribution of `Lit@2` HOT 9
- The demo folder is also published to NPM which causes issues when building HOT 1
- Allow the use of sub-routers HOT 1
- Add authentication property HOT 2
- add option to disable / opt-out of Shadow DOM to support global CSS libraries HOT 8
- Using subroutes inside of components (with shadowRoot) HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from lit-redux-router.