Skip to content

bulatshafigullin/sweetjs-loader

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

sweetjs-loader

Use it like any other loader.

It takes a query string that contains sweetjs compiler options. The only one you need to care about is modules which lets you specify where your macros are defined. Usually you will have a common macro library you apply to everything.

example webpack.config.js

Applies the macros in macros.sjs to all .js files.

module.exports = {
  cache: true,
  entry: 'app.js',
  output: {
    filename: 'bundle.js'
  },
  module: {
    loaders: [{test: /\.js$/, loader: 'sweetjs?modules[]=./macros.sjs'}]
  }
};

About

webpack loader for sweet.js

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 100.0%