diff options
author | Maksymilian Pamula <mpamula@virtuslab.com> | 2020-04-22 06:46:36 +0200 |
---|---|---|
committer | Paweł Marks <Kordyjan@users.noreply.github.com> | 2020-06-04 11:25:34 +0200 |
commit | 4065a65fe3294e0ddf54f5756380f7dc1aa032b2 (patch) | |
tree | 3f225828db0430f478f1db9650c9c2d858d6bfa8 /plugins/base/search-component/webpack.config.js | |
parent | 7674ce23f132f727b71545ad3aa62be5059613d6 (diff) | |
download | dokka-4065a65fe3294e0ddf54f5756380f7dc1aa032b2.tar.gz dokka-4065a65fe3294e0ddf54f5756380f7dc1aa032b2.tar.bz2 dokka-4065a65fe3294e0ddf54f5756380f7dc1aa032b2.zip |
TD: Rewrite application to TS
Diffstat (limited to 'plugins/base/search-component/webpack.config.js')
-rw-r--r-- | plugins/base/search-component/webpack.config.js | 30 |
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 + } + } + ] } ] }, |