Comments (19)
yes should be remove... I'm also removing the dependency on module-css.
from vtk-js.
Just verified that everything is working with 2.24.1. Thanks!
from vtk-js.
That loader is not required when you are using vtk.js as a dependency.
The file in vtk-js/Utilities/config/webpack.loaders.js
is given as a convenient but based on the webpack logic. The application bundling the package is responsible of defining its rules.
And mostly for those who use kw-web-suite.
Maybe we can provide a webpack1.loader-dep.js
and webpack2.loader-dep.js
for your use case along with a dependency list so users know what to add in their devDependencies.
from vtk-js.
Moreover, if you use the prebuilt version of vtk.js, you don't need any of those loaders.
from vtk-js.
Moreover, if you use the prebuilt version of vtk.js, you don't need any of those loaders.
What about all the libraries that are listed inside dependencies
? In the prebuilt case, wouldn't they be statically bundled, and hence also not required as dependencies?
from vtk-js.
yes they would, which mean that nothing should be in dependencies. ;-)
In my mind I put dev tools in devDependencies
and the libraries that I'm using in my code in dependencies
.
from vtk-js.
One possibility would be to have a vtk.js
package that is a source dist and includes build-time deps in dependencies
, and a second npm package vtk.js-prebuilt
for those who just want the prebuilt version. That would cleanly separate the two use cases with the least burden on downstreams.
from vtk-js.
I think it is better to have a single name. After that the build tools needed could be better documented.
from vtk-js.
So downstreams using the source distribution would have to duplicate all the build-time dependencies? Would those be expected to remain stable?
from vtk-js.
yes they should. The requirements are very low here (es6 loader/shader loader).
Nothing else. No JSX or any CSS for the core lib.
from vtk-js.
kw-web-suite is a superset but it is overkilling for vtk.js.
from vtk-js.
Ok, cool, that's not too much, and if it remains stable within a major version, that's good.
from vtk-js.
Most likely the project importing VTK.js is already picking its build tools and should reuse them.
from vtk-js.
I'll try to document that usage (without kw-web-suite) when I get a chance.
from vtk-js.
Probably something along those lines but without kw-web-suite
.
from vtk-js.
Great, I'm trying it now in some girder plugins and will post here with results.
from vtk-js.
Reopening because I ran into one more issue that might actually be a bug. When building I'm still seeing:
ERROR in ./~/vtk.js/Sources/Rendering/Core/Actor/index.js
Module build failed: Error: Couldn't find preset "react" relative to directory "/Users/zach/dev/girder/node_modules/vtk.js"
Even though my loaders do not mention react preset at all. I believe this is due to react being listed in the .babelrc
file within the vtk.js package. Should we remove that?
from vtk-js.
You might be able to use https://github.com/Kitware/vtk-js/blob/master/Utilities/config/dependency.js with the next release (once travis is done)
from vtk-js.
var entry = require.resolve('./src/index.js');
var path = require('path');
var webpack = require('webpack');
var vtkLoaders = require('vtk.js/Utilities/config/dependency.js').webpack.v1.loaders;
var pluginList = [];
if (process.env.NODE_ENV === 'production') {
console.log('==> Production build');
pluginList.push(new webpack.DefinePlugin({
'process.env': {
NODE_ENV: JSON.stringify('production'),
},
}));
}
module.exports = {
plugins: pluginList,
entry: entry,
output: {
path: './dist',
filename: 'itkVtkImageViewer.js',
},
module: {
preLoaders: [{
test: /\.js$/,
loader: 'eslint-loader',
exclude: /node_modules/,
}],
loaders: [
{ test: entry, loader: 'expose?itkVtkImageViewer' },
].concat(vtkLoaders),
},
postcss: [
require('autoprefixer')({ browsers: ['last 2 versions'] }),
],
eslint: {
configFile: '.eslintrc.js',
},
};
from vtk-js.
Related Issues (20)
- Can VTK.js slice on the polydata? HOT 2
- [Bug] prevent unexpected error in renderPassAll if polyData mapper does not exist HOT 1
- How to slice the polydata (cfd volume grid data) with vtk.js and see the grid on the slice? HOT 9
- Optimise matrices copy when multiplying in vtkMath HOT 2
- [Feature]
- [Bug] Headless Chrome - Cannot read property 'blendFuncSeparate' of null HOT 5
- [Bug] Cannot display Float32 images on iOS Safari HOT 14
- [Bug] Handling of clamped arrays? HOT 2
- [Bug] `vtkStringArray.newClone` raises error HOT 4
- [Feature] Support for LZMA vtk files HOT 5
- The vtkPLYReader parseAsText method reported an error [Bug] HOT 5
- [Bug] Incorrect interface for `insertNextPoint` on `vtkPoints` HOT 1
- STLReader and ORJReader parsing obj file with incorrect number of points[Bug]
- Middle and right mouse button interactor issue on Safari HOT 2
- [Feature] Rendering with OffscreenCanvas HOT 3
- [Bug] Issues in PR(Share GPU ressources across render windows) HOT 1
- [Bug] Memory leak in WidgetState HOT 2
- Can vtk.js read VTK files with the 'DATASET UNSTRUCTURED_GRID' format? HOT 7
- Mobile end lag issue HOT 1
- [Bug] Opacity problem on stl file when backface culling is enabled HOT 11
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 vtk-js.