Open tomasz-szepczynski opened 4 years ago
would love to see an example with typescript as well
@tomasz-szepczynski you gotta use separate babel-loader
plugin to process TS before ts-loader
. Here is a sample from my code:
{
test: /\.ts|\.tsx$/,
use: [
{ loader: 'babel-loader' },
{ loader: 'ts-loader' },
],
},
Babel plugins are specified in .babelrc
in my case, but can be also set as babel-plugin
options (but not the ts-loader
ones).
I'm using it in boilerplates.js.org with React and TS I hope it will help you
1)Following the tutorial and modyfing .babelrc did not change 'stylename' to 'classname'. webpack.js:
const context = path.resolve(__dirname, '..');
.babelrc2)I tried config from demo example :
but it won't work with ts-loader
Error: ts-loader was supplied with an unexpected loader option: plugins
Can you please provide example how to use it with ts?