2020-03-04 03:22:13 +03:00
|
|
|
const common = require('./webpack.config.common')
|
|
|
|
|
|
|
|
module.exports = {
|
|
|
|
...common,
|
|
|
|
mode: 'production',
|
|
|
|
entry: {
|
|
|
|
'dist': './components/Viewer.tsx',
|
|
|
|
},
|
2021-06-08 23:42:20 +03:00
|
|
|
optimization: {
|
|
|
|
// Blocking Snowpack import thus disabling `minimize`.
|
|
|
|
minimize: false,
|
|
|
|
},
|
2020-03-04 03:22:13 +03:00
|
|
|
output: {
|
|
|
|
path: __dirname,
|
|
|
|
filename: '[name]/index.js',
|
|
|
|
libraryTarget: 'umd',
|
|
|
|
globalObject: 'this',
|
|
|
|
},
|
2020-06-25 23:59:51 +03:00
|
|
|
externals: {
|
|
|
|
'react': {
|
|
|
|
commonjs: 'react',
|
|
|
|
commonjs2: 'react',
|
|
|
|
amd: 'React',
|
|
|
|
root: 'React',
|
|
|
|
},
|
|
|
|
'react-dom': {
|
|
|
|
commonjs: 'react-dom',
|
|
|
|
commonjs2: 'react-dom',
|
|
|
|
amd: 'ReactDOM',
|
|
|
|
root: 'ReactDOM',
|
2020-06-25 23:46:54 +03:00
|
|
|
}
|
2020-06-25 23:59:51 +03:00
|
|
|
}
|
2020-03-04 03:22:13 +03:00
|
|
|
}
|