Skip to content

Commit

Permalink
Using source version of geotiff.js
Browse files Browse the repository at this point in the history
  • Loading branch information
constantinius committed Feb 14, 2019
1 parent f3b353b commit 5ec965f
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/components/mapview.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import TileGrid from 'ol/tilegrid/tilegrid';
import proj from 'ol/proj';
import extent from 'ol/extent';

import { fromUrl, fromUrls, Pool } from 'geotiff';
import { fromUrl, fromUrls, Pool } from 'geotiff/src/main';

import CanvasTileImageSource, { ProgressBar } from '../maputil';
import { renderData } from '../renderutils';
Expand Down
15 changes: 15 additions & 0 deletions webpack.conf.js
Original file line number Diff line number Diff line change
@@ -1,21 +1,36 @@
const path = require('path');

const isProduction = (process.env.NODE_ENV === 'production');

module.exports = {
entry: ['babel-polyfill', './src/index.jsx'],

output: {
path: path.resolve(__dirname, 'dist'),
filename: 'app.bundle.js',
globalObject: 'this',
},

module: {
rules: [
// test: /\.worker\.js$/,
// use: [{
// loader: 'babel-loader',
// // options are in .babelrc
// }, {
// loader: 'worker-loader',
// options: {
// inline: true,
// },
// }],
{
test: /\.worker\.js$/,
use: {
loader: 'worker-loader',
options: {
name: isProduction ? '[hash].decoder.worker.min.js' : '[hash].decoder.worker.js',
inline: true,
fallback: true,
},
},
}, {
Expand Down

0 comments on commit 5ec965f

Please sign in to comment.