123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172 |
- const path = require('path');
- const commonConfig = {
- mode: "production",
- module: {
- rules: [{
- test: /\.svg$/,
- issuer: /\.[jt]sx?$/,
- use: [{
- loader:'@svgr/webpack',
- options: {
- expandProps: "end",
- svgoConfig: {}
- }
- }]
- },{
- 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/TmFeatureViewer";
- const examples = [];
- examples.push({
- ...commonConfig,
- entry: {
- "tm-saguaro": './lib/TmFv3DApp/index.js'
- },
- output: {
- filename: '[name].js',
- path: path.resolve(__dirname, out_path),
- library: {
- name: 'tmSaguaro',
- type: 'umd'
- }
- }
- });
- module.exports = examples;
|