Skip to content

brochington/declarity-loader

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

declarity-loader

a webpack loader for Declarity

npm install --save-dev declarity-loader

Currently only webpack > 4 is supported.

Babel > 7 and Babel React Preset are currently dependencies used in the parsing of JSX syntax.

Example

/* In .babelrc */
{
  "presets": ["react"]
}

/* In webpack.config.js */
module.exports = {
    ...
    module: {
        rules: [{
            test: /\.js$/,
            use: ['babel-loader'],
            include: path.join(__dirname, 'src')
        }, {
            test: /\.dsx$/,
            use: ['babel-loader', 'declarity-loader'],
            include: path.join(__dirname, 'src/entities')
        }]
    },
    ...
}

In this example a new filetype, .dsx, is used to help distinguish how the different JSX should be parsed.

About

a webpack loader for declarity

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published