Skip to content
Snippets Groups Projects
Unverified Commit 96a9cd52 authored by Jack Reed's avatar Jack Reed Committed by GitHub
Browse files

Merge pull request #3201 from ProjectMirador/state

Use the  init  artifact as the dev entry  point and restore state exp…
parents e10f1af4 53a297b1
Branches
Tags
No related merge requests found
import init from './init';
import * as state from './state';
const exports = {
viewer: init,
...init,
...state,
};
export default exports;
......@@ -3,7 +3,7 @@ import MiradorViewer from './lib/MiradorViewer';
/**
* Default Mirador instantiation
*/
export default function (config, pluginsOrStruct) {
function viewer(config, pluginsOrStruct) {
let struct;
if (Array.isArray(pluginsOrStruct)) {
......@@ -14,3 +14,9 @@ export default function (config, pluginsOrStruct) {
return new MiradorViewer(config, struct);
}
const exports = {
viewer,
};
export default exports;
......@@ -61,7 +61,7 @@ module.exports = (env, options) => {
const config = baseConfig(options.mode);
if (isProduction) {
const prodConfig = {
return {
...config,
devtool: 'source-map',
mode: 'production',
......@@ -72,19 +72,6 @@ module.exports = (env, options) => {
}),
],
};
return [
prodConfig,
{
...prodConfig,
entry: ['./src/polyfills.js', './src/state/index.js'],
output: {
...prodConfig.output,
filename: 'mirador-state.min.js',
library: 'MiradorState',
},
},
];
}
return {
......@@ -95,7 +82,7 @@ module.exports = (env, options) => {
port: 4444,
},
devtool: 'eval-source-map',
entry: ['react-hot-loader/patch', ...config.entry],
entry: ['react-hot-loader/patch', './src/polyfills.js', './src/init.js'],
mode: 'development',
};
};
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment