Comments (7)
For making it work on macos I had to change unfortunately another line in the DirectoryWatcher.js
:
function DirectoryWatcher(directoryPath, options) {
...
this.watcher = chokidar.watch(directoryPath, {
...
followSymlinks: true,
depth: 1,
Seems that on macos if you don't increase the depth of the traversed subdirectories changes are not detected. I have opened a ticket webpack/watchpack#141 to understand if this is something is known and fixed in the latest beta version.
from invenio-app-rdm.
Made to work in debug mode. Steps to follow:
- Install
invenio-app-rdm
. - Edit the
config.py
and add:
from invenio_app.config import APP_DEFAULT_SECURE_HEADERS
APP_DEFAULT_SECURE_HEADERS['content_security_policy'] = {}
WEBPACKEXT_STORAGE_CLS = 'pywebpack.storage.LinkStorage'
- Install
invenio-assets
from GitHub master branch.- Edit the
invenio_assets/assets/build/webpack.config.js
and add:
- Edit the
var webpackConfig = {
...
resolve: {
...
symlinks: false
},
...
}
- Since
--watch
does not work with symlinks we need to editDirectoryWatcher.js
. Edit<instance_path>/assets/node_modules/watchpack/lib/DirectoryWatcher.js
function DirectoryWatcher(directoryPath, options) {
...
this.watcher = chokidar.watch(directoryPath, {
...
followSymlinks: true,
-
Open two terminals: In each one of them export:
FLASK_ENV=development
NODE_PRESERVE_SYMLINKS=1
-
In Terminal 1 run:
./scripts/bootstrap
./scripts/setup
invenio run --cert ./docker/nginx/test.t --key ./docker/nginx/test.key
- In Terminal 2 run:
invenio webpack run start
Starting implementing the changes in the correct places.
Kudos @slint for the guidelines and work :)
from invenio-app-rdm.
Since it's not sure if more changes are coming, I've made the webpack-fixes
WIP branch in invenio-assets
, which can be checked out and contains part of the changes (specifically steps 3 and 5)
from invenio-app-rdm.
@slint Thanks! I added a comment here: inveniosoftware/invenio-assets@094c1ef
The most problematic might be point 4.
followSymlinks
was added on watchpack (see webpack/watchpack#114). However, it is not compatible with webpack 4 (it cannot be set from there) and as stated here webpack/webpack#6845 it will come with webpack 5...
While searching for the option I did not find it. So I guess it is fixed somehow different in webpack 5 (I'll keep investigating)
Thoughts?
from invenio-app-rdm.
Isn't this solved by #59 ?
from invenio-app-rdm.
@lnielsen if we move the information on how to you can make webpack work locally in another issue this one can be closed! I will create an issue and I will close it!
from invenio-app-rdm.
Created this #65 out of the information here!
from invenio-app-rdm.
Related Issues (20)
- Non-localized strings HOT 2
- export formats: enable codemeta serializer
- Vocabularies: 'id' Field Requirement for Names Schema in InvenioRDM HOT 4
- Support for `.eln` files HOT 3
- `invenio-cli assets watch` not compiling LESS files on repeated changes HOT 1
- GitHub Integration Upgrade: Enabling Draft Reviews and Community Selections Before Publishing HOT 1
- Additional community permission level HOT 3
- Indicate chosen facet/filter HOT 1
- Dying celery workers
- remove CSS from unstyled form HOT 1
- Allow setting the order of files for records HOT 2
- User and domain administration interface improvements.
- access-requests: add UI tab for groups
- access-requests: add "Add people" functionality
- review inline style CSS HOT 1
- Fix incompatible JS major versions
- Update award text HOT 2
- services: expose metrics in result objects
- Reindexing isn't fully implemented and users/community members indexing doesn't work HOT 5
- Permissions: use "read" permission in the `read_many` method 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 invenio-app-rdm.