@ohif-i18n - Replace use of context to import locales (#575)

This commit is contained in:
Rodrigo Antinarelli authored and Erik Ziegler committed 2019-06-27 12:01:11 +02:00
1 parent 6548dffb42
commit d04bb323f7
25 files changed
+1625 -1755

No files matched your search

+42 -40
View File
@@ -1,5 +1,5 @@
var path = require('path')
var webpack = require('webpack')
var path = require('path');
var webpack = require('webpack');
const autoprefixer = require('autoprefixer');
@@ -13,25 +13,25 @@ const cssRules = [
{
loader: 'postcss-loader',
options: {
plugins: () => [autoprefixer('last 2 version', 'ie >= 10')],
},
},
],
plugins: () => [autoprefixer('last 2 version', 'ie >= 10')]
}
}
]
},
{
test: /\.glsl$/i,
include: /vtk\.js[\/\\]Sources/,
loader: 'shader-loader',
loader: 'shader-loader'
},
{
test: /\.worker\.js$/,
include: /vtk\.js[\/\\]Sources/,
use: [
test: /\.worker\.js$/,
include: /vtk\.js[\/\\]Sources/,
use: [
{
loader: 'worker-loader',
options: { inline: true, fallback: false },
},
],
options: { inline: true, fallback: false }
}
]
},
{
test: /\.css$/,
@@ -42,22 +42,22 @@ const cssRules = [
loader: 'css-loader',
options: {
localIdentName: '[name]-[local]_[sha512:hash:base64:5]',
modules: true,
},
modules: true
}
},
{
loader: 'postcss-loader',
options: {
plugins: () => [autoprefixer('last 2 version', 'ie >= 10')],
},
},
],
},
plugins: () => [autoprefixer('last 2 version', 'ie >= 10')]
}
}
]
}
];
var entry = path.join(__dirname, './src/index.js')
const sourcePath = path.join(__dirname, './src')
const outputPath = path.join(__dirname, './dist')
var entry = path.join(__dirname, './src/index.js');
const sourcePath = path.join(__dirname, './src');
const outputPath = path.join(__dirname, './dist');
module.exports = {
entry,
@@ -66,43 +66,45 @@ module.exports = {
filename: 'index.umd.js',
library: '@ohif/extension-vtk',
libraryTarget: 'umd',
globalObject: 'this',
globalObject: 'this'
},
module: {
rules: [
{
test: /\.(js|jsx)$/,
exclude: /node_modules/,
use: ['babel-loader'],
use: ['babel-loader']
}
].concat(cssRules),
].concat(cssRules)
},
resolve: {
modules: [path.resolve(__dirname, 'node_modules'), sourcePath],
modules: [path.resolve(__dirname, 'node_modules'), sourcePath]
},
externals: [{
externals: [
{
'cornerstone-core': {
commonjs: 'cornerstone-core',
commonjs2: 'cornerstone-core',
amd: 'cornerstone-core',
root: 'cornerstone',
root: 'cornerstone'
},
'cornerstone-math': {
commonjs: 'cornerstone-math',
commonjs2: 'cornerstone-math',
amd: 'cornerstone-math',
root: 'cornerstoneMath',
},
root: 'cornerstoneMath'
}
},
'@ohif/i18n',
'ohif-core',
'dcmjs',
'react-viewerbase',
'react',//: 'React',
'react-dom',//: 'ReactDOM',
'react-redux',//: 'ReactRedux',
'react-resize-detector',//: 'ReactResizeDetector',
'react-viewerbase',//: 'reactViewerbase',
'prop-types'//: 'PropTypes'
/*/\b(vtk.js)/*/
],
}
'react', //: 'React',
'react-dom', //: 'ReactDOM',
'react-redux', //: 'ReactRedux',
'react-resize-detector', //: 'ReactResizeDetector',
'react-viewerbase', //: 'reactViewerbase',
'prop-types' //: 'PropTypes'
/*/\b(vtk.js)/*/
]
};