123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125 |
- const path = require('path');
- const commonConfig = {
- mode:"production",
- module: {
- rules: [
- {
- test: /\.(html|ico)$/,
- use: [{
- loader: 'file-loader',
- options: { name: '[name].[ext]' }
- }]
- },{
- test: /\.scss$/,
- use: [
- 'style-loader',
- {
- loader: 'css-loader',
- options: {
- modules: {
- localIdentName:'[local]'
- }
- }
- },
- 'sass-loader'
- ]
- }
- ]
- },
- resolve: {
- modules: [
- 'node_modules',
- path.resolve(__dirname, 'build/src/')
- ],
- fallback: {
- fs: false,
- buffer: require.resolve('buffer'),
- crypto: require.resolve('crypto-browserify'),
- path: require.resolve('path-browserify'),
- stream: require.resolve('stream-browserify')
- }
- }
- };
- const out_path = "build/examples";
- const examples = [];
- examples.push({
- ...commonConfig,
- entry: {
- "index": './build/src/examples/uniprot/index.js'
- },
- output: {
- filename: '[name].js',
- path: path.resolve(__dirname, out_path+'/uniprot/')
- }
- });
- examples.push({
- ...commonConfig,
- entry: {
- "index": './build/src/examples/assembly/index.js'
- },
- output: {
- filename: '[name].js',
- path: path.resolve(__dirname, out_path+'/assembly/')
- }
- });
- examples.push({
- ...commonConfig,
- entry: {
- "index": './build/src/examples/external-mapping/index.js'
- },
- output: {
- filename: '[name].js',
- path: path.resolve(__dirname, out_path+'/external-mapping/')
- }
- });
- examples.push({
- ...commonConfig,
- entry: {
- "index": './build/src/examples/single-chain/index.js'
- },
- output: {
- filename: '[name].js',
- path: path.resolve(__dirname, out_path+'/single-chain/')
- }
- });
- examples.push({
- ...commonConfig,
- entry: {
- "index": './build/src/examples/structural-alignment/index.js'
- },
- output: {
- filename: '[name].js',
- path: path.resolve(__dirname, out_path+'/structural-alignment/')
- }
- });
- examples.push({
- ...commonConfig,
- entry: {
- "index": './build/src/examples/multiple-chain/index.js'
- },
- output: {
- filename: '[name].js',
- path: path.resolve(__dirname, out_path+'/multiple-chain/')
- }
- });
- examples.push({
- ...commonConfig,
- entry: {
- "index": './build/src/examples/css-config/index.js'
- },
- output: {
- filename: '[name].js',
- path: path.resolve(__dirname, out_path+'/css-config/')
- }
- });
- module.exports = examples;
|