UNPKG

@ecwid/gatsby-plugin-ecwid

Version:

Ecwid Ecommerce Shopping Cart is everything you need to add an online store to your site

49 lines (47 loc) 942 B
const path = require('path'); module.exports = { mode: 'production', entry: './src/index.js', output: { path: path.resolve('lib'), filename: 'index.js', libraryTarget: 'commonjs2', }, module: { rules: [ { test: /\.js?$/, exclude: /(node_modules)/, use: 'babel-loader', }, { test: /\.css$/, use: [ 'style-loader', 'css-loader' ] } ], }, resolve: { alias: { 'react': path.resolve(__dirname, './node_modules/react'), 'react-dom': path.resolve(__dirname, './node_modules/react-dom'), } }, externals: { // Don't bundle react or react-dom react: { commonjs: "react", commonjs2: "react", amd: "React", root: "React" }, "react-dom": { commonjs: "react-dom", commonjs2: "react-dom", amd: "ReactDOM", root: "ReactDOM" } } };