UNPKG

@lydxwj/react-fullpage

Version:
26 lines (25 loc) 959 B
const path = require('path') const htmlWebpackPlugin = require('html-webpack-plugin') module.exports = { entry: path.join(__dirname, '../example/main.js'), devtool: 'cheap-module-eval-source-map', output: { path: path.join(__dirname, '../dist'), filename: 'bundle.js' }, plugins: [ // 插件 new htmlWebpackPlugin({ template: path.join(__dirname, '../example/index.html'), filename: 'index.html' }) ], module: { rules: [ { test: /\.css$/, use: ['style-loader', 'css-loader'] }, // 如果想要启用 CSS 模块化,可以为 css-loader 添加 modules 参数即可 { test: /\.styl$/, use: ['style-loader', 'css-loader', 'stylus-loader'] }, { test: /\.(jpg|png|gif|bmp|jpeg)$/, use: 'url-loader?limit=5000' }, { test: /\.(ttf|eot|svg|woff|woff2)$/, use: 'url-loader?limit=5000' }, { test: /\.jsx?$/, use: 'babel-loader', exclude: /node_modules/ } ] } }