UNPKG

react-styleable

Version:
46 lines (43 loc) 964 B
const HtmlWebpackPlugin = require('html-webpack-plugin') const path = require('path') const src = path.resolve('src') module.exports = { mode: 'production', entry: './src/index.js', output: { filename: 'index.js', path: path.resolve('dist') }, module: { rules: [ { test: /\.js$/, use: [ { loader: 'babel-loader', options: { presets: ['@babel/preset-react'], plugins: ['@babel/plugin-proposal-object-rest-spread'] } } ], include: [src, path.resolve(path.join('..', 'src'))] }, { test: /\.css$/, use: [ 'style-loader', { loader: 'css-loader', options: { modules: true } } ], include: src } ] }, plugins: [ new HtmlWebpackPlugin({ inject: false, template: require('html-webpack-template'), appMountId: 'app' }) ] }