This repository has been archived by the owner on Jun 3, 2020. It is now read-only.
Releases: jriecken/asset-smasher
Releases · jriecken/asset-smasher
0.3.2
0.3.1
Enhanced AMD support
- Make AMD support opt-in - must specify 'amd: true', or 'amd: {....}' in asset-smasher config
- Allow a 'baseLogicalPath' option to be in the amd option object that will be stripped off the front of all module ids (useful for shortening module names if for example, they are all inside a 'js' folder in their logical path
- Give anonymous/simple commonjs wrapped define calls module ids (and dependency arrays for simple commonjs wrapper)
0.3.0
Functional Changes
- The JSX transformer now can transform
.js
files (without the additional.jsx
extension) as long as the/** @jsx React.DOM */
comment is present in the file. - For
.jsx
files, the JSX transformer will add the/** @jsx React.DOM */
comment to the file if it is missing. - CommonJS-style
.js
files can now be automatically wrapped with AMDdefine
calls if a/** @amd */
comment is present in the file. See the "AMD Support" section of the README for more info.
API Changes (this should only affect you if you've written custom transformers)
- The
shouldTransform
andtransformedFileName
methods in transformers now receive the asset object as a second parameter - The asset object now has a
transformInfo
property (that is an object) that transformers can use to put information in when they are processing. This can be used, for example, to prevent a file from being processed more than once (seejsx_transform.js
for an example) - Post-transform operations now must be a constructor function rather than just a function(asset, cb). This is to allow options to be passed into the post-transformer (see
end_js_semicolon.js
or the newamd_wrapper.js
for examples)