Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- const webpack = require('webpack');
- const path = require('path');
- module.exports = env => {
- return {
- devtool: 'eval',
- mode: 'development',
- entry: ['index.jsx'],
- output: {
- filename: 'app.js',
- publicPath: 'dist',
- path: path.resolve('dist'),
- },
- devServer: {
- port: 3001,
- historyApiFallback: {
- disableDotRule: true
- },
- inline: true,
- },
- resolve: {
- extensions: ['.jsx', '.js'],
- modules: ['src', 'node_modules'],
- alias: {
- $fff: path.resolve('/code/fff/src/')
- }
- },
- module: {
- rules: [
- {
- test: /\.jsx?$/,
- include: [
- path.resolve(__dirname),
- path.resolve('/code/fff/src/')
- ],
- exclude: /node_modules/,
- loader: "babel-loader",
- },
- {
- test: /\.scss$/,
- use: [{
- loader: "style-loader"
- }, {
- loader: "css-loader"
- }, {
- loader: "sass-loader",
- options: {
- mimtype: "text/css",
- includePaths: []
- }
- }]
- },
- {
- test: /\.css$/,
- use: [{
- loader: "style-loader"
- }, {
- loader: "css-loader"
- }, {
- loader: "sass-loader",
- options: {
- mimtype: "text/css",
- includePaths: []
- }
- }]
- },
- {
- test: /\.(svg|png|ico|xml|json)$/,
- loaders: ['file-loader'],
- include: path.resolve('assets')
- },
- ],
- },
- plugins: [
- new webpack.DefinePlugin({
- __API_URL: JSON.stringify(env.development ? 'https://localhost:44341/api/' : 'https://xxx/api/'),
- __APPLICATION_KEY: JSON.stringify('CrossCheck')
- })
- ]
- };
- };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement