UNPKG

react-price-component

Version:

A component for displaying different price typologies

42 lines (40 loc) 1.28 kB
const webpack = require("webpack"); const ExtractTextPlugin = require("extract-text-webpack-plugin"); const path = require("path"); var config = { target: "web", debug: true, devtool: "source-map", entry: "./src/Price.js", output: { path: './dist', filename: 'bundle.js', //this is the default name, so you can skip it //at this directory our bundle file will be available //make sure port 8090 is used when launching webpack-dev-server publicPath: '/assets/', libraryTarget: 'var', library: 'App' }, module: { loaders: [ { test: /\.js$/, exclude: /node_modules/, loader: "babel-loader" }, { test: /\.scss$/, loader: ExtractTextPlugin.extract("style-loader", "css-loader!sass-loader") } ] }, externals: { //don't bundle the 'react' npm package with our bundle.js //but get it from a global 'React' variable 'react': 'React' }, // Use the plugin to specify the resulting filename (and add needed behavior to the compiler) plugins: [ new ExtractTextPlugin("css/style.css") ] } module.exports = config;