// Add this loaders in your webpack.config.js// You should not exclude node_modules directory from it.// This is just an example.
module: {loaders: [{test: /\.jsx?$/,loader: 'babel-loader',query: {cacheDirectory: true,presets: ['es2015','react'],},},{test: /\.scss$/,use: [{loader: 'style-loader'},{loader: 'css-loader',options: {modules:true,localIdentName: '[local]-[hash:base64:5]'}},{loader: 'sass-loader',options: {plugins: ()=>[require('autoprefixer')]}}]},]}
Import individual component from your application
import{Button}from'@codespec/react-toolset/src'
If you are using create-react-app, use need to follow this.
Eject your predefined configuration
yarn eject
Configure the Webpack like as follow
// Process JS with Babel.{test: /\.(js|jsx)$/,include: [paths.appSrc,/node_modules\/@codespec/],// add @codespec module to includeloader: require.resolve('babel-loader'),options: {// This is a feature of `babel-loader` for webpack (not Babel itself).// It enables caching results in ./node_modules/.cache/babel-loader/// directory for faster rebuilds.cacheDirectory: true,},},
The Tidelift Subscription provides access to a continuously curated stream of human-researched and maintainer-verified data on open source packages and their licenses, releases, vulnerabilities, and development practices.