tts.js | Javascript API for the Text-to-Speech service | Speech library
kandi X-RAY | tts.js Summary
kandi X-RAY | tts.js Summary
Javascript API for the Text-to-Speech service, provide an interface to manage built-in TTS speaker or your own TTS service.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of tts.js
tts.js Key Features
tts.js Examples and Code Snippets
Community Discussions
Trending Discussions on tts.js
QUESTION
Upgrading an existing React project from Rails 4 to 5.1 and loading assets with the new Webpacker pack_tag
system. Things seem to compile correctly, I've got a pack file packs/mutts.jsx
and in my index.html.erb I reference with
<%= javascript_pack_tag 'mutts' %>
<%= stylesheet_pack_tag 'mutts' %>
When the server runs, this results in 4 files compiled to app/public/packs/
: a .js
, .js.map
, .css
and .css.map
- all with [packname]-[hash].extension format.
When I inspect the html generated from the pack_tag
s, I can see they each link to the corresponding js and css files, with the correct hash in the filename. And looking at the Network tab in devtools, both files load successfully with 200.
But when I look at the Sources tab, I see at localhost:3000
there is a packs/
directory that only contains the js file, and the css is nowhere in sight, and styles are definitely not being applied to the page.
Am I getting the file structure or importing wrong or something? Doesn't seem to be a webpack config issue, as the contents of the compiled file look correct.
...ANSWER
Answered 2018-Feb-20 at 04:11The problem was where I placed the stylesheet_pack_tag
. After placing it in the it worked.
Should have caught this - most of the demos for Webpacker have the tag placed right with the relevant javascript_pack_tag
, but in my case I'm rendering a new JS root per page, so the js pack is rendered by a rails view that's not the root application.html.erb
I've seen some webpacker examples that seemed to be going for "keep assets in proximity of concerned code", but I'm happy just chucking global styles in the head here.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install tts.js
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page