Comments (6)
Thanks @abubics It sounds the Webpack build process called some client only code. document
is a browser only thing. I think your app is a client side app not using server side rendering right? I will leave you to investigate and find more information. Thanks!
from ripple.
We figured this out. We were customising the svgRule in vue.config.js
. We need to use url-loader
so that
config.module.rule('svg').exclude
.add(resolve(__dirname, path.dirname(require.resolve('@dpc-sdp/ripple-global/package.json'))));
config.module
.rule('svg-url')
.test(/\.svg$/i)
.use('url-loader').loader('url-loader')
.end();
from ripple.
Thanks @gazal-k for updating what you got! That make sense if you have your own loader. I will close this issue now as it's resolved in your side.
from ripple.
Thanks @abubics for raise the issue here!
For SVG icons, yes, we did a change on how to add custom icons. However, it's not a breaking change, your app can work without migrating to the new implementation. Do you know if your project has custom Ripple icons? If not, you can just remove old implementation like here https://github.com/dpc-sdp/ripple/pull/774/files#diff-e98f43f1a2c175915ef9aea0f011c5085b58c9fa241d6d20d19a9ef28b00c7eeL1
If you do, you can still remove as above and migrate to the new way to register custom icon https://github.com/dpc-sdp/ripple/blob/master/packages/components/Atoms/Icon/README.md#registering-custom-icons
Examples: https://github.com/dpc-sdp/ripple/tree/master/examples/basic-examples/assets/ripple-icon
For the error:
error in ./node_modules/@dpc-sdp/ripple-pagination/PrevNext.vue?vue&type=style&index=0&lang=scss&
Syntax Error: ReferenceError: document is not defined
I can't reproduce it in my example vue cli app when I add PrevNext
component then run vue-cli-service build --mode production
. Also I couldn't see document
is used in PrevNext.vue
so I am not able to debug it. The error self not make much sense to me.
I will suggest try migrate the svg icon then see if the issue fixed.
It also will be helpful if you can create a repo which can reproduce the issue. Cheers!
from ripple.
Thanks for the quick response, @tim-yao!
I can see a couple of custom <rpl-icon ...>
tags in the codebase, I'll check them out, and try the new custom registration. If that doesn't get us anywhere, I'll see if we have time to make a repro repo . . . we have some delivery pressure atm.
I did look through the pagination package, and anything else that seemed to be implicated, and (just like you) also couldn't find any document
references, so I assumed it's something weird in the webpack setup.
And also, since it was raised months ago (before we inherited it), I guessed it's also unlikely to be related to that PR's changes. Thanks for confirming :)
from ripple.
Yeah, exactly. We'll jump back in this thread once we figure more out :)
from ripple.
Related Issues (20)
- test automate
- Example application `vue-example-app` does not work out of the box. HOT 2
- Packages appear to have untranspiled optional chaining ('?.') operator. HOT 2
- SassError: $string: #457b9d is not a string. HOT 2
- Allow overriding the vic-go-au logo HOT 2
- Ripple Form does not pass selectedCharLength to rpl-select component
- main menu with hundreds of menu items and very deep hierarchy behaves unexpectedly
- Back to top button not working, id changed HOT 1
- Add ability to disable hardcoded pages through feature flag
- Node 13 has deprecated the use of request.connection
- Spelling Fix - Field Rpl Slider (has PR) HOT 2
- getBaseUrl incorrectly setting the request protocol
- Pagination next button, when disabled, still shows an interactive cursor pointer.
- Accessibility: RplSelect, when no value is set will read the plceholder twice
- Date field calendar popup z-index issue
- Anchor links with no href should be ignored by markup plugin
- Server-side rendering on content collection is pointed to the URL that is not reachable by the server.
- Ripple Form Component Datepicker does not meet WCAG 2.0 Level AA: Acceptable compliance
- Ripple's From component Datepicker does not update date on manual enter.
- @dpc-sdp/ripple-site-footer - When in responsive mode, elements in the footer become collapsed and are not keyboard accessible.
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 ripple.