Update dependencies, add support for styled-components

This commit is contained in:
Dane Everitt 2019-09-17 21:05:20 -07:00
parent 086018751d
commit 2b68e5a984
No known key found for this signature in database
GPG key ID: EEA66103B3D71F53
3 changed files with 1516 additions and 1276 deletions

View file

@ -71,22 +71,19 @@ module.exports = {
loader: 'babel-loader',
options: {
cacheDirectory: !isProduction,
presets: ['@babel/env', '@babel/react'],
plugins: [
'react-hot-loader/babel',
'@babel/plugin-syntax-dynamic-import',
['styled-components', {
displayName: true,
}],
'tailwind-components',
presets: [
'@babel/typescript',
'@babel/env',
'@babel/react',
],
plugins: [
'tailwind-components',
'react-hot-loader/babel',
'@babel/transform-runtime',
'@babel/proposal-class-properties',
'@babel/proposal-object-rest-spread',
'@babel/syntax-dynamic-import',
],
},
},
{
loader: 'ts-loader',
options: {
experimentalWatchApi: true,
transpileOnly: true,
},
},
],
@ -97,7 +94,12 @@ module.exports = {
path.resolve(__dirname, 'resources'),
],
use: [
{ loader: MiniCssExtractPlugin.loader },
{
loader: MiniCssExtractPlugin.loader,
options: {
hmr: !isProduction,
},
},
{
loader: 'css-loader',
options: {
@ -157,6 +159,9 @@ module.exports = {
}),
],
},
watchOptions: {
ignored: /node_modules/,
},
devServer: {
contentBase: path.join(__dirname, 'public'),
publicPath: _.get(process.env, 'PUBLIC_PATH', '') + '/assets/',