1 Star 0 Fork 8

JRK_dai/pile.js

forked from DiDi-opensource/pile.js 
Create your Gitee Account
Explore and code with more than 12 million developers,Free private repositories !:)
Sign up
文件
Clone or Download
webpack.config.prod.js 2.00 KB
Copy Edit Raw Blame History
renmaomin authored 2018-04-10 18:38 . chore: init project
const webpack = require('webpack');
const path = require('path');
const HtmlWebpackPlugin = require('html-webpack-plugin');
module.exports = {
// context: path.join(__dirname, 'example'),
entry: {
js: './example/index.js',
},
output: {
path: path.resolve(__dirname, 'demo'),
filename: 'main.js',
publicPath: '',
},
module: {
rules: [
// {
// test: /\.(js|jsx)$/,
// include: [
// path.resolve(__dirname, 'example'),
// path.resolve(__dirname, 'src')
// ],
// exclude: /node_modules/,
// use: [{
// loader: "babel-loader",
// }],
// },
{
test: [/\.js$/, /\.jsx$/, /\.es6$/],
include: [
path.resolve(__dirname, 'example'),
path.resolve(__dirname, 'src'),
],
use: [{
loader: 'babel-loader?cacheDirectory=true',
}],
},
{
test: /\.css$/,
use: [
'style-loader',
'css-loader',
'postcss-loader',
'less-loader',
],
},
{
test: /\.less$/,
use: [
'style-loader',
'css-loader',
'postcss-loader',
'less-loader',
],
},
{
test: /\.(eot|svg|ttf|woff|woff2)\w*/,
use: [{
loader: 'file-loader',
}],
},
{
test: /\.(png|jpg|gif)$/,
use: [{
loader: 'url-loader?limit=1000',
}],
},
// ,
// {
// test: [/\.jsx$/, /\.es6$/],
// exclude: /(node_modules|bower_components)/,
// use: [
// { loader: 'babel-loader' }
// ]
// }
],
},
resolve: {
extensions: ['.js', '.jsx', '.es6'],
modules: [path.resolve(__dirname, 'example'), 'node_modules'],
},
plugins: [
new webpack.DefinePlugin({
DEBUG: process.env.NODE_ENV !== 'production',
}),
new HtmlWebpackPlugin({
template: path.join(__dirname, 'example/index.html'),
}),
],
};
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
JavaScript
1
https://gitee.com/dfx/pile.js.git
git@gitee.com:dfx/pile.js.git
dfx
pile.js
pile.js
master

Search

0d507c66 1850385 C8b1a773 1850385