JSFiddle - React, Tailwind, and code Playground
by uiwwnw
HTML
{
"name": "hwa-chang-project",
"version": "0.0.1",
"description": "interpark UI develop Team",
"main": "index.js",
"scripts": {
"start": "webpack --watch",
"build": "webpack -p"
},
"repository": {
"type": "git",
"url": "http://ui.interpark.com:8000/uiwwnw87/hwaChangProject.git"
},
"author": "",
"license": "ISC",
"dependencies": {
"babel": "^6.23.0",
"babel-core": "^6.26.0",
"babel-loader": "^7.1.4",
"css-loader": "^0.28.11",
"extract-text-webpack-plugin": "^3.0.2",
"file-loader": "^1.1.11",
"node-sass": "^4.8.3",
"path": "^0.12.7",
"sass-loader": "^6.0.7",
"style-loader": "^0.20.3",
"webpack": "^4.3.0",
"webpack-cli": "^2.0.13"
},
"devDependencies": {
"webpack-cli": "^2.0.13",
"webpack-dev-server": "^3.1.1"
}
}
JavaScript
const path = require('path');
const ExtractTextPlugin = require('extract-text-webpack-plugin');
const extractSass = new ExtractTextPlugin({
filename: '[name].[contenthash].css',
disable: process.env.NODE_ENV === 'development'
});
module.exports = {
context: path.resolve(__dirname, 'src'),
entry: './app.js',
output: {
path: path.resolve(__dirname, 'dist'),
filename: './bundle.js'
},
mode: 'production',
module: {
rules: [{
test: /\.scss$/,
use: [{
loader: 'style-loader' // creates style nodes from JS strings
}, {
loader: 'css-loader' // translates CSS into CommonJS
}, {
loader: 'sass-loader' // compiles Sass to CSS
}]
}]
}
};