aboutsummaryrefslogtreecommitdiff
path: root/plugins/base/search-component/webpack.config.js
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/base/search-component/webpack.config.js')
-rw-r--r--plugins/base/search-component/webpack.config.js30
1 files changed, 16 insertions, 14 deletions
diff --git a/plugins/base/search-component/webpack.config.js b/plugins/base/search-component/webpack.config.js
index a7b503b6..559f5792 100644
--- a/plugins/base/search-component/webpack.config.js
+++ b/plugins/base/search-component/webpack.config.js
@@ -13,9 +13,10 @@ ringUiWebpackConfig.loaders.svgInlineLoader.include.push(
);
const webpackConfig = () => ({
- entry: `${componentsPath}/app.js`,
+ entry: `${componentsPath}/root.tsx`,
resolve: {
mainFields: ['module', 'browser', 'main'],
+ extensions: ['.tsx', '.ts', '.js'],
alias: {
react: resolve('./node_modules/react'),
'react-dom': resolve('./node_modules/react-dom'),
@@ -32,24 +33,25 @@ const webpackConfig = () => ({
rules: [
...ringUiWebpackConfig.config.module.rules,
{
- test: /\.css$/,
- include: componentsPath,
+ test: /\.s[ac]ss$/i,
use: [
'style-loader',
- {loader: 'css-loader'},
- {loader: 'postcss-loader'}
- ]
- },
- {
- test: /\.css$/,
- include: /node_modules/,
+ 'css-loader',
+ 'sass-loader',
+ ],
+ include: componentsPath,
exclude: ringUiWebpackConfig.componentsPath,
- use: ['style-loader', 'css-loader']
},
{
- test: /\.js$/,
- include: [componentsPath],
- loader: 'babel-loader?cacheDirectory'
+ test: /\.tsx?$/,
+ use: [
+ {
+ loader: 'ts-loader',
+ options: {
+ transpileOnly: true
+ }
+ }
+ ]
}
]
},