Update dependencies, add support for styled-components
This commit is contained in:
parent
086018751d
commit
2b68e5a984
3 changed files with 1516 additions and 1276 deletions
|
@ -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/',
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue