Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[EEG Browser] Fix webpack and ts config #9517

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view

This file was deleted.

55 changes: 18 additions & 37 deletions webpack.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -171,10 +171,27 @@ const module: webpack.ModuleOptions = {
},
{
test: /\.tsx?$/,
exclude: [/react-series-data-viewer/],
use: [
{
loader: 'ts-loader',
options: {onlyCompileBundledFiles: true},
options: {
onlyCompileBundledFiles: true,
},
},
],
},
{
test: /.*\/react-series-data-viewer\/.*\.tsx?$/,
use: [
{
loader: 'ts-loader',
options:{
onlyCompileBundledFiles: true,
compilerOptions: {
strict: false,
}
}
},
],
},
Expand Down Expand Up @@ -317,40 +334,4 @@ configs.push({
stats: 'errors-warnings',
});

// HACK: For some reason, the electrophysiology session view only compiles if
// it uses a separate (although possibly identical) configuration.
if (!target || target === 'electrophysiology_browser') {
configs.push({
entry: {
electrophysiology_browser: {
import: './modules/electrophysiology_browser/'
+ 'jsx/electrophysiologySessionView',
filename: './modules/electrophysiology_browser/'
+ 'js/electrophysiologySessionView.js',
library: {
name: [
'lorisjs',
'electrophysiology_browser',
'electrophysiologySessionView',
],
type: 'window',
},
},
},
output: {
path: __dirname,
filename: './htdocs/js/components/[name].js',
library: ['lorisjs', '[name]'],
libraryTarget: 'window',
},
externals: {'react': 'React', 'react-dom': 'ReactDOM'},
devtool: 'source-map',
plugins,
optimization,
resolve,
module,
stats: 'errors-warnings',
});
}

export default configs;