mirror of
https://github.com/vuejs/babel-plugin-jsx.git
synced 2025-07-02 10:03:25 +08:00
refactor: with TypeScript (#24)
* refactor: add ts support (#19) Co-authored-by: 逆寒 <869732751@qq.com>
This commit is contained in:
@ -4,25 +4,28 @@ const HtmlWebpackPlugin = require('html-webpack-plugin');
|
||||
|
||||
module.exports = {
|
||||
mode: 'development',
|
||||
devtool: 'cheap-module-eval-source-map',
|
||||
devtool: false,
|
||||
context: path.join(__dirname, '../packages/jsx-explorer'),
|
||||
entry: './src/index.js',
|
||||
entry: './src/index.ts',
|
||||
output: {
|
||||
publicPath: './',
|
||||
},
|
||||
module: {
|
||||
rules: [
|
||||
{
|
||||
test: /\.jsx?$/,
|
||||
loader: 'babel-loader',
|
||||
test: /\.tsx?$/,
|
||||
loader: 'ts-loader',
|
||||
exclude: /node_modules/,
|
||||
options: {
|
||||
compilerOptions: { downlevelIteration: true },
|
||||
},
|
||||
},
|
||||
{
|
||||
test: /\.(woff2?|eot|ttf|otf)(\?.*)?$/,
|
||||
loader: 'url-loader',
|
||||
options: {
|
||||
limit: 10000,
|
||||
name: 'dist/fonts/[name].[hash:7].[ext]',
|
||||
name: 'fonts/[name].[hash:7].[ext]',
|
||||
},
|
||||
},
|
||||
{
|
||||
@ -40,6 +43,9 @@ module.exports = {
|
||||
filename: 'index.html',
|
||||
}),
|
||||
],
|
||||
resolve: {
|
||||
extensions: ['.ts', '.js'],
|
||||
},
|
||||
node: {
|
||||
fs: 'empty',
|
||||
},
|
||||
|
Reference in New Issue
Block a user